-
Notifications
You must be signed in to change notification settings - Fork 67
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
feat: Add toString methods to classes comprising WriteBatch #1281
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
https://github.com/googleapis/java-firestore/blob/main/CONTRIBUTING.md Code in this repo is formatted with google-java-format. To run formatting on your project, you can run:
|
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.
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. |
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.
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. |
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.
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 |
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.
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 ☕️