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-10955] Flink Java Runner test flake: Could not find Flink job #15127

Closed
wants to merge 8 commits into from

Conversation

benWize
Copy link
Contributor

@benWize benWize commented Jul 5, 2021

A different approach from #15107 to fix this flaky test, FlinkSavepointTest in Java PreCommit


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • 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.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

6 similar comments
@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

Run Java PreCommit

@benWize benWize marked this pull request as ready for review July 5, 2021 17:57
@benWize benWize changed the title [WIP] [BEAM-10955] Flink Java Runner test flake: Could not find Flink job [BEAM-10955] Flink Java Runner test flake: Could not find Flink job Jul 5, 2021
@benWize
Copy link
Contributor Author

benWize commented Jul 5, 2021

R: @ibzib
R: @tvalentyn
Would you help me to review this?

Copy link
Contributor

@ibzib ibzib left a comment

Choose a reason for hiding this comment

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

Please fix checkstyle (:runners:flink:1.13:checkstyleTest)

@@ -159,6 +157,9 @@ private void runSavepointAndRestore(boolean isPortablePipeline) throws Exception
// Initial parallelism
options.setParallelism(2);
options.setRunner(FlinkRunner.class);
// Enable checkpointing interval for streaming non portable pipeline to avoid
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this not a problem for portable pipelines?

Copy link
Contributor Author

@benWize benWize Jul 7, 2021

Choose a reason for hiding this comment

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

I'm not sure about this, but when I set a checkpointing interval for a portable pipeline, it shows a timeout error like in https://ci-beam.apache.org/job/beam_PreCommit_Java_Phrase/3819/testReport/org.apache.beam.runners.flink/FlinkSavepointTest/testSavepointRestorePortable_2/.
The reason behind this fix is to enable restart after some job failure.
When this test fails, continuously shows the error: "Recovery is suppressed by NoRestartBackoffTimeStrategy" like in https://scans.gradle.com/s/n2coqujl4jc7i/tests/:runners:flink:1.13:test/org.apache.beam.runners.flink.FlinkSavepointTest/testSavepointRestoreLegacy?top-execution=1.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this, but when I set a checkpointing interval for a portable pipeline, it shows a timeout error like in https://ci-beam.apache.org/job/beam_PreCommit_Java_Phrase/3819/testReport/org.apache.beam.runners.flink/FlinkSavepointTest/testSavepointRestorePortable/.

I'm not sure which error you are talking about? If the test passed, it's likely it's benign.

The reason behind this fix is to enable restart after some job failure.
When this test fails, continuously shows the error: "Recovery is suppressed by NoRestartBackoffTimeStrategy" like in https://scans.gradle.com/s/n2coqujl4jc7i/tests/:runners:flink:1.13:test/org.apache.beam.runners.flink.FlinkSavepointTest/testSavepointRestoreLegacy?top-execution=1.

Thanks for getting the build scan. It looks like something is going wrong while taking the savepoint. It looks like it could be a real bug, so let's wait to merge this until we are sure that's not the case.

Caused by: java.lang.Exception: Could not materialize checkpoint 2 for operator VerificationStage/ParMultiDo(Anonymous) (1/2)#0. |  
  | at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.handleExecutionException(AsyncCheckpointRunnable.java:257) |  
  | ... 4 more |  
  | Caused by: java.lang.IllegalArgumentException |  
  | at org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:122) |  
  | at org.apache.flink.runtime.checkpoint.CheckpointMetrics.<init>(CheckpointMetrics.java:74) |  
  | at org.apache.flink.runtime.checkpoint.CheckpointMetricsBuilder.build(CheckpointMetricsBuilder.java:135) |  
  | at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.reportCompletedSnapshotStates(AsyncCheckpointRunnable.java:206) |  
  | at org.apache.flink.streaming.runtime.tasks.AsyncCheckpointRunnable.run(AsyncCheckpointRunnable.java:158) |  
  | ... 3 more

It looks like the failed precondition is checking alignmentDurationNanos. I'm not sure however what the unacceptable value is, nor where it is coming from. https://github.com/apache/flink/blob/3909c9f0a11e8b38b264db9e7716fb41e75cc524/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointMetrics.java#L74

@benWize
Copy link
Contributor Author

benWize commented Jul 7, 2021

Please fix checkstyle (:runners:flink:1.13:checkstyleTest)

Fixed

@@ -194,7 +196,7 @@ private void runSavepointAndRestore(boolean isPortablePipeline) throws Exception
private JobID executeLegacy(Pipeline pipeline) throws Exception {
JobGraph jobGraph = getJobGraph(pipeline);
flinkCluster.submitJob(jobGraph).get();
return jobGraph.getJobID();
return waitForJobToBeReady();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this line here, maybe if this PR is accepted and merged we can close #15119

@aaltay
Copy link
Member

aaltay commented Jul 16, 2021

What is the next step on this PR?

@ibzib
Copy link
Contributor

ibzib commented Jul 20, 2021

What is the next step on this PR?

I'm pretty sure the true cause of the flake is a Flink issue (FLINK-23201), so it is fine to ignore the test until we upgrade to the Flink patch releases containing the fix.

@benWize
Copy link
Contributor Author

benWize commented Jul 20, 2021

What is the next step on this PR?

I'm pretty sure the true cause of the flake is a Flink issue (FLINK-23201), so it is fine to ignore the test until we upgrade to the Flink patch releases containing the fix.

Is it ok to close this PR then?

@ibzib
Copy link
Contributor

ibzib commented Jul 20, 2021

What is the next step on this PR?

I'm pretty sure the true cause of the flake is a Flink issue (FLINK-23201), so it is fine to ignore the test until we upgrade to the Flink patch releases containing the fix.

Is it ok to close this PR then?

Yes.

@benWize benWize closed this Jul 20, 2021
@benWize benWize deleted the BEAM-10955-checkpointing-fix branch August 5, 2021 22:03
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