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

[BEAM-4327] Fix ErrorProne violations in fn-harness #5647

Merged
merged 4 commits into from Jun 20, 2018

Conversation

swegner
Copy link
Contributor

@swegner swegner commented Jun 14, 2018

This makes future ErrorProne violations become compile-time errors.


Follow this checklist to help us incorporate your contribution quickly and easily:

  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.

@swegner
Copy link
Contributor Author

swegner commented Jun 14, 2018

R: @timrobertson100

@iemejia iemejia self-requested a review June 15, 2018 08:40
@iemejia
Copy link
Member

iemejia commented Jun 15, 2018

Seems this needs a rebase (added me as R just because a committer is needed.
Please go ahead with the review @timrobertson100).

@@ -81,6 +81,7 @@ private InProcessEnvironmentFactory(
}

@Override
@SuppressWarnings("FutureReturnValueIgnored")
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: suggest inline document as to why - something along the lines of.

// checked inline in an asynchronous task

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done; thanks for the suggestion.

@@ -296,6 +296,7 @@ public void close() throws Exception {
}

@Override
@SuppressWarnings("FutureReturnValueIgnored")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest in line comment as to why - perhaps:

// defer error handling on deregistering as that is the responsibility of the beamFnStateClient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Done

@timrobertson100
Copy link
Contributor

Looks good @swegner - thanks
2 small suggestions for inline comment and can you rebase please?

This makes future ErrorProne violations become compile-time errors.
Address PR comments: Add comments for FutureReturnValueIgnored
suppressions
@swegner
Copy link
Contributor Author

swegner commented Jun 15, 2018

Done; rebased and added comments for suppressions. This is ready for another round of review.

@timrobertson100 please take a look.

@timrobertson100
Copy link
Contributor

@swegner
Copy link
Contributor Author

swegner commented Jun 15, 2018

Thanks, looks like I missed some things in the merge. I apologize for not building locally first.

Compile errors fixed (and tested locally). @timrobertson100 please take a look.

@@ -152,6 +159,7 @@ public void tearDown() throws Exception {
controlClient.close();
sdkHarnessExecutor.shutdownNow();
serverExecutor.shutdownNow();
sdkHarnessExecutorFuture.get();
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is failing the tests due to an InterruptedException
https://scans.gradle.com/s/nihiogx5epq4i/tests/failed

I can reproduce this building your branch with

./gradlew :beam-runners-java-fn-execution:test

@swegner
Copy link
Contributor Author

swegner commented Jun 20, 2018

Ok, feedback addressed and tests are passing. @timrobertson100 please take a look

@timrobertson100
Copy link
Contributor

LGTM @swegner - thanks

@iemejia PTAL when you get a chance

Copy link
Member

@iemejia iemejia left a comment

Choose a reason for hiding this comment

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

LGTM

@iemejia iemejia merged commit 1b0f6d7 into apache:master Jun 20, 2018
@swegner swegner deleted the findbugs_fnharness branch October 26, 2018 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants