-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-12767] Improve PipelineOption parsing UX #15338
Conversation
sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java
Outdated
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #15338 +/- ##
==========================================
+ Coverage 83.79% 83.83% +0.03%
==========================================
Files 440 440
Lines 59804 59886 +82
==========================================
+ Hits 50115 50207 +92
+ Misses 9689 9679 -10
Continue to review full report at Codecov.
|
183b6d8
to
1c80016
Compare
hm, this says there's changes requested still but I can't actually find them in the review... @lukecwik I think I addressed all your comments. |
1c80016
to
62d2909
Compare
Run Java PreCommit |
Thats just what the UI will say forever until another review happens by the person who requested changes. |
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.
Is this ready to review yet since I don't see any logic around @JsonSerialize/@JsonIgnore
as we discussed. Everything else looks pretty good.
* | ||
* <p>If the getter method is annotated with {@link | ||
* com.fasterxml.jackson.databind.annotation.JsonDeserialize} the specified deserializer will be | ||
* used, otherwise the default ObjectMapper deserialization strategy. |
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.
* used, otherwise the default ObjectMapper deserialization strategy. | |
* used, otherwise the default ObjectMapper deserialization strategy is used. |
PipelineOptionsFactory.fromArgs("--complexType=test").as(OptionsWithJsonDeserialize1.class); | ||
|
||
expectedException.expect(IllegalArgumentException.class); | ||
expectedException.expectMessage( |
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.
ExpectedException
is deprecated, please use assertThrows(..., lambda that throws exception);
@@ -1572,6 +1601,80 @@ public int compare(Method o1, Method o2) { | |||
return builder.build(); | |||
} | |||
|
|||
private static JsonDeserializer<Object> deserializerForMethod(Method method, JavaType type) |
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.
nit: method 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.
See my earlier review #15338 (review)
never mind I see what you mean now, I didn't realize the PipelineOptions had a custom serializer/deserializer as well. Will update that. |
13807ab
to
c45ce17
Compare
Great, thanks. |
7afc8c6
to
9e0c248
Compare
alright, all hooked up and I added some more tests to ProxyInvocationHandlerTest as well to test the round-trip. |
9e0c248
to
554b1ac
Compare
Run Java PreCommit |
Run Java_Examples_Dataflow PreCommit |
554b1ac
to
bd17b09
Compare
edit: nm there wasn't an issue, I was just using an out-of-date build on my tests =/ |
Run Java_Examples_Dataflow PreCommit |
Run Java PreCommit |
bd17b09
to
87f2c72
Compare
@lukecwik should be good to review now. |
Run Java PreCommit |
1 similar comment
Run Java PreCommit |
Run Java_Examples_Dataflow PreCommit |
f374523
to
f9b9959
Compare
Run Java_Examples_Dataflow PreCommit |
Run Java PreCommit |
Run Java_Examples_Dataflow_Java11 PreCommit |
lol one day these tests will succeed... |
Run Java PreCommit |
Run Java_Examples_Dataflow PreCommit |
f9b9959
to
16224d3
Compare
Run Java PreCommit |
@lukecwik finally jammed all the tests through! |
Thanks, if you have some time and can look at why the test is flaking it would be greatly appreciated. |
@steveniemitz @lukecwik This commit seems to be causing bunch of post commit tests to failure: https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Samza/172/ Should we revert this PR for now? |
hm, weird. Yeah feel free to revert, I can look into the failures |
I am not 100% sure if this is the RC but looks like it.
This is the stacktrace in Samza runner that failed these tests, where a similar stacktrace in Flink and Sparker Runner, what do you think? |
I think the patch is actually really simple, I can get another PR going right now, or we can revert and re-apply with it fixed. I'm fine with either.
|
You can get both PRs out (forward fix and rollback) and run the additional failing tests in the forward fix. |
Forgive the noob question, is there a way to run these post-commit tests on a PR? |
I am testing out the rollback at #15438 where you can see how these tests are being triggered. |
Thanks! |
roll-forward PR up as well: #15439 , I'm not sure if the trigger phrase worked for that one though, maybe I don't have permissions? I'd love to figure out how to reproduce this in a unit test as well, it seems like we're missing coverage over something pretty fundamental. |
looks like the failing tests are fixed in #15439 now, so we can either roll forward with that or roll back w/ the revert. I'd prefer to roll forward but I'll leave that up to you :) |
+1, let's fix forward. |
There is a link in PR template: See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs. |
This adds two improvements to the PipelineOptionFactory command line parser:
R: @lukecwik @kennknowles since you two are the last to make any changes here.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunner
compliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.