Repository navigation
[Spark] Run ValidatesRunner tests serially, runner metrics are JVM wide - #40428
Conversation
|
R: @Abacn |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
|
All eight Spark ValidatesRunner and PVR PostCommits are green on this PR, they were red on master since 2026-10-01: |
|
Thanks for identifying the issue and the fix. I didn't expect #40324 would affect Spark ValidateRunner tests, it should only affect Dataflow. I suggest we set "beam.validatesRunner.parallelThreads" as "1" by default (or treat as 1 if the property is absent), and set to "8" in Dataflow ValidateRunner tests that currently running on parallel (only batch tests?) only |
|
cc: @reuvenlax |
|
Do we know whether Flink has a similar issue, or is the Flink Runner better
behaved?
…On Tue, Oct 6, 2026 at 8:47 AM Yi Hu ***@***.***> wrote:
*Abacn* left a comment (apache/beam#40428)
<#40428 (comment)>
Thanks for identifying the issue and the fix. I didn't expect #40324
<#40324> would affect Spark
ValidateRunner tests, it should only affect Dataflow. I suggest we set
"beam.validatesRunner.parallelThreads" as "1" by default (or treat as 1 if
the property is absent), and set to "8" in Dataflow ValidateRunner tests
that currently running on parallel (only batch tests?) only
—
Reply to this email directly, view it on GitHub
<#40428?email_source=notifications&email_token=AFAYJVI3LZNP7JI2T4ROWQ35SUHXPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBRHE3DCMRTHEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6019612390>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAYJVK5SC2AIPBQGDFX3JD5SUHXPAVCNFSNUABEKJSXA33TNF2G64TZHM2TAOJQGQZDINJ3JFZXG5LFHM2TOMRWGI3DIMJXGWQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AFAYJVIRV6JY2PRFCJO335L5SUHXPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBRHE3DCMRTHEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AFAYJVJAXXYTESK3XD656E35SUHXPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBRHE3DCMRTHEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
lgtm |
|
Yeah Flink looks fine: Spark has a well known limitation that is only one active SparkContext is allowed / honored in a JVM at a time, and caused the cross-test contamination. |
|
Ok - then seems reasonable to just disable Spark. Do we still regularly run
any other runner ValidatesRunner suites?
…On Tue, Oct 6, 2026 at 10:41 AM Yi Hu ***@***.***> wrote:
*Abacn* left a comment (apache/beam#40428)
<#40428 (comment)>
Yeah Flink is fine:
https://github.com/apache/beam/actions/workflows/beam_PostCommit_Java_ValidatesRunner_Flink.yml?query=event%3Aschedule
Spark has a well known limitation that is only one active SparkContext is
allowed / honored in a JVM at a time, and caused the cross-test
contamination.
—
Reply to this email directly, view it on GitHub
<#40428?email_source=notifications&email_token=AFAYJVNI27EZYPWSZ3XX2KL5SUVDHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGE4TMOJQGIZ2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6021969023>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAYJVLQTVABDOZZNJZYMET5SUVDHAVCNFSNUABEKJSXA33TNF2G64TZHM2TAOJQGQZDINJ3JFZXG5LFHM2TOMRWGI3DIMJXGWQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AFAYJVMU2PL26QX74JMYFC35SUVDHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGE4TMOJQGIZ2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AFAYJVKJ6F6P4Q4KBNKQBED5SUVDHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGE4TMOJQGIZ2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Abacn
left a comment
There was a problem hiding this comment.
then seems reasonable to just disable Spark.
SGTM and will merge after test passing
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40428 +/- ##
============================================
- Coverage 59.04% 58.74% -0.30%
+ Complexity 15624 13903 -1721
============================================
Files 2797 2583 -214
Lines 280750 271419 -9331
Branches 12488 11226 -1262
============================================
- Hits 165764 159443 -6321
+ Misses 108540 105984 -2556
+ Partials 6446 5992 -454
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
But Flink is fine with the changes. Unless another runner is also failing,
I would leave the default as it is.
We definitely don't want to rollback DirectRunner, as Java PreSubmit has
historically been slow.
…On Tue, Oct 6, 2026 at 12:31 PM Tobias Kaymak ***@***.***> wrote:
*tkaymak* left a comment (apache/beam#40428)
<#40428 (comment)>
Done, beam.validatesRunner.parallelThreads now defaults to 1 in
BeamParallelJunit4Runner independent of beam.test.parallelThreads,
Dataflow keeps its explicit value and the Spark gradle changes are
reverted. One place this reaches beyond Spark is
:runners:direct-java:needsRunnerTests in PreCommit Java, where the
ValidatesRunner methods ran 8 wide since #40324
<#40324>, so I set 8 there and in the
Direct validatesRunner task to keep the PreSubmit speedup, happy to drop
it if you prefer Dataflow only. The 8 Spark PostCommits rerun on this push,
the Direct VR trigger file is bumped as well.
—
Reply to this email directly, view it on GitHub
<#40428?email_source=notifications&email_token=AFAYJVOOD3AV2VTEO5ICXT35SVCC5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGM4TGMZVGYY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6023933561>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAYJVN4XQYJ6XLTWSUXCMT5SVCC5AVCNFSNUABEKJSXA33TNF2G64TZHM2TAOJQGQZDINJ3JFZXG5LFHM2TOMRWGI3DIMJXGWQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AFAYJVNLFTQ64X4YRIZXKYL5SVCC5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGM4TGMZVGYY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AFAYJVMILUJDHTHZNFQHZMT5SVCC5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBSGM4TGMZVGYY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
The current PR was merged with only overriding Spark validate runner test to be sequential and we are good for now. PreCommit Java doesn't run ValidateRunner test. There is a separate ValidateRunner Direct run at PostCommit time |
Fixes #40427.
Since #40324, ValidatesRunner methods run on 8 threads per test JVM. The Spark runners keep metrics in a JVM wide
MetricsAccumulatorand allow one SparkContext per JVM, so every Spark VR and PVR PostCommit is red since 2026-10-01.This sets
beam.validatesRunner.parallelThreads=1for the Spark runner and Spark job server test tasks, as the Dataflow runner sets its own value. The trigger files run the eight affected suites on this PR.Local check,
:runners:spark:4:validatesStructuredStreamingRunnerBatchon PAssertTest, FlattenTest and CreateTest: 37 failures on master, 46 tests and 0 failures with this change.R: @Abacn
cc @reuvenlax