-
-
Notifications
You must be signed in to change notification settings - Fork 287
Added ability to configure reporter class #1112
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
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
2bd427b to
28e744f
Compare
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
ittaiz
left a 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.
Thanks!
This change looks good in general.
I think there's value in adding a test that demonstrates this ability and more importantly covers regressions.
I'd hate for someone to change this in 3 months only to find out that twitter is broken when you try to update internally.
I know this makes this PR more complicated but I think the value of always covering features with tests is huge.
|
@viclovsky I don't think the test will break if I stop using the attribute and use the default value. Maybe have the custom reporter write to a custom file and then add an e2e test (bash) that checks this file with something like "hi from custom"? |
@ittaiz thanks a lot for the comment. I can write e2e test which checks output that Custom Reporter generates into stdout. But it would be great to find a way to do with file. |
|
Maybe by writing to
TEST_UNDECLARED_OUTPUTS_DIR?
https://docs.bazel.build/versions/master/test-encyclopedia.html
If I remember correctly it's available after execution
…On Tue, Sep 29, 2020 at 7:57 PM Victor Orlovsky ***@***.***> wrote:
@viclovsky <https://github.com/viclovsky> I don't think the test will
break if I stop using the attribute and use the default value. Maybe have
the custom reporter write to a custom file and then add an e2e test (bash)
that checks this file with something like "hi from custom"?
@ittaiz <https://github.com/ittaiz> thanks a lot for the comment.
I faced with problem that e2e test (Bash script) can't get the created
custom file from sandbox. Do you have any idea how to do it?
I can write e2e test which checks output that Custom Reporter generates
into stdout. But it would be great to find a way to do with file.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1112 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQQF4OBTAOCQ6EKK5RZNDSIIGXRANCNFSM4RV6JEYA>
.
--
*Ittai Zeidman*
40 Hanamal street, Tel Aviv, Israel
<http://www.wix.com>
|
ittaiz
left a 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.
Looks good.
Q- did you see the test fail and for the right reason? (for example by still using a hardcoded value)? We've had many times where bash tests didn't fail or worse, failed for the wrong reasons.
Yes, I've checked -- e2e test (bash script) fails on changing output file or even on removing reporter_class parameter from scala_test. The error looks like |
|
👍🏽
Linting fails.
Please run lint.sh with fix
|
|
restarting travis |
| "colors": attr.bool(default = True), | ||
| "full_stacktraces": attr.bool(default = True), | ||
| "jvm_flags": attr.string_list(), | ||
| "reporter_class": attr.string( |
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.
Looks amazing!
Sorry for post merge CR but I have a small comment!
I'd use Bazel's doc attribute to document this new attribute.
I'm guessing one day we would want to auto-generate full manual and I think reverse engineering and by git blame is not the best way to go.
* Added ability to configure reporter class * Added test for "reporter_class" option * Added e2e test (bash script) which checks output file from Custom report * Added test_custom_reporter_class.sh to test_rules_scala.sh * Fix lint
#1111