Skip to content

chore(ci): time out the Spark test jobs at 75 min - #19931

Open
voonhous wants to merge 7 commits into
apache:masterfrom
voonhous:ci-job-timeouts
Open

voonhous wants to merge 7 commits into
apache:masterfrom
voonhous:ci-job-timeouts

Conversation

@voonhous

@voonhous voonhous commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Describe the issue this Pull Request addresses

Part of #19524, stacked on #19919. The nine Java 17 Spark test jobs and the five engine jobs have no timeout-minutes, so a job whose test process stops answering runs to GitHub's six-hour default and holds a runner for that long. Both hangs below happened within one day.

Summary and Changelog

  • timeout-minutes: 75 on test-spark-java17-ut-functional, ut-other, ut-fat-and-ftc, fta, ftb, scala-dml-1, scala-dml-2, scala-other-1 and scala-other-2, the value test-spark-client-and-hadoop-common already uses. The other five test jobs of bot.yml already have one (40 to 90).
  • timeout-minutes: 75 on the five jobs of java_ci_engines.yml: test-flink-1, test-flink-2, validate-bundles, validate-bundle-spark4, integration-tests. They measure 23 to 34 minutes.

The longest of the fourteen measured 44 minutes on a slow runner under the resharded workflow, so the cap only fires on a hang.

The two hangs that motivated it

On attempt 3 of run 34711686507, ut-other (job 103611929617) finished all 184 hudi-common test classes green in 26 seconds, then printed nothing for 76 minutes: the surefire fork never reported completion, and the runner had to kill Maven and one fork JVM when the job was cancelled by hand. The same commit's two earlier attempts ran the job in 32 minutes. Surefire's forkedProcessExitTimeoutInSeconds did not fire because the fork never reached the exit path it guards.

The first run of this very branch then hung in test-flink-1's integration test step (job 103624267705) from 21:29Z until GitHub cancelled it at the six-hour mark, 03:29Z. That job takes 31 minutes on every other run of the stack.

Impact

CI configuration only.

Risk Level

low. A job that legitimately needs more than 75 minutes would fail; none of the fourteen has come within 30 minutes of that.

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

Part of apache#19524.

Remove the changes job and every needs and step-level if that
depended on it; the docs-only skip is a trigger-level paths filter,
evaluated before any job exists. validate-source and
validate-ci-baseline move verbatim to validate_source.yml, which is
never path filtered because both are required status checks. The
Flink, bundle-validation and integration-test jobs move verbatim to
java_ci_engines.yml so each workflow stays under the ASF target of
15 concurrent jobs. The concurrency group carries the workflow name
so the three workflows cancel only their own superseded runs.

Review follow-ups: .github/** added to the positive paths list, a
note in .asf.yaml on why only always-on workflows may contribute
required contexts, and a shorter Codecov range comment.
Part of apache#19524, on top of the flattened job graph.

- Surefire runs with hudi.surefire.forkCount=0.5C: two forks on a
  4-core GitHub runner, one on a 2-core Azure agent. The two fixed
  test ports, HiveServer2 and the test ZooKeeper, are picked per
  JVM so forks do not collide; forks share one JaCoCo exec file.
- TestHoodieDeltaStreamer is split into four classes by area, with
  bodies moved verbatim, so a second fork can help the utilities
  job. Three helpers move to HoodieDeltaStreamerTestBase.
- The bloom filter benchmark stays out of unit runs.
- The Spark workflow is resharded by measured time: Java UT split
  into the functional package and the rest, the three fat classes
  sharing a job with FTC, FTA and FTB one job each, Scala DML and
  Scala other split by package, utilities split into the
  DeltaStreamer classes and the rest. 14 jobs, under the ASF
  target of 15.

Measured: 615 to 577 runner-minutes per run, longest job 77 to
41 minutes.
Part of apache#19524. Workflow files only.

- flink-2's failsafe filter -Dit.test=!ITTestHoodieDataSource
  dropped failsafe's IT* include and ran 170 unit-test classes the
  docker job already runs. New filter: ITTest*,!ITTestHoodieDataSource.
- The docker job built the whole reactor, 7.8 minutes, of which the
  15 bundles and the examples are 6. The build, UT and FT reactors
  now skip the bundles, the examples and hudi-cli, each of which is
  built, tested or validated in the job that owns it.
- hudi-examples-spark is built only in the jobs that run its
  quickstart.

Measured over three runs: 577 to a mean of 548 runner-minutes,
flink-2 39 to 23 minutes, the docker job 37 to about 30.
Closes apache#19528. Part of apache#19524.

scripts/ci/test_timing_summary.py walks every surefire-reports
directory, which surefire and the scalatest plugin both fill with
JUnit XML, and prints the slowest classes and the slowest tests.
Every job that runs tests, 14 in bot.yml and 3 in
java_ci_engines.yml, gets one step after its test steps with
if: always(), so the tables appear on the run summary for green
and red jobs alike. Under a second of runner time per job.
Part of apache#19524.

IT_MODULES names the four modules with integration-test classes
outside hudi-flink: hudi-cli, hudi-integ-test, hudi-aws and
hudi-azure. The build passes them with -am, which Maven resolves to
30 modules; the IT step verifies just the four instead of the whole
reactor minus hudi-flink. Every module no longer built here is
built, and where a bundle shaded and run, in the job that owns it.

Measured: the job from 37 to 28 minutes, same 25 test classes.
The nine Java 17 Spark test jobs had no timeout-minutes, so a job
whose surefire fork stops answering runs to GitHub's six hour
default. That happened on a rerun of apache#19928: hudi-common finished
all 184 test classes in 26 seconds, the fork never reported
completion, and the job sat idle for 76 minutes until it was
cancelled by hand.

75 minutes is what test-spark-client-and-hadoop-common already
uses. The longest of these nine jobs measured 44 minutes on a
slow runner, so the cap only fires on a hang.
@github-actions github-actions Bot added the size:XL PR with lines of changes > 1000 label Sep 12, 2026
@codecov-commenter

codecov-commenter commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.19%. Comparing base (648996f) to head (53ef161).
⚠️ Report is 63 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19931      +/-   ##
============================================
- Coverage     80.20%   80.19%   -0.02%     
+ Complexity    34661    34660       -1     
============================================
  Files          2546     2546              
  Lines        142452   142608     +156     
  Branches      17330    17484     +154     
============================================
+ Hits         114260   114365     +105     
- Misses        20281    20285       +4     
- Partials       7911     7958      +47     
Components Coverage Δ
hudi-common 83.81% <ø> (-0.03%) ⬇️
hudi-client 83.30% <ø> (+0.01%) ⬆️
hudi-flink 85.50% <ø> (-0.07%) ⬇️
hudi-spark-datasource 73.21% <ø> (-0.07%) ⬇️
hudi-utilities 78.15% <ø> (-0.02%) ⬇️
hudi-cli 69.99% <ø> (ø)
hudi-hadoop 70.90% <ø> (+0.09%) ⬆️
hudi-sync 76.02% <ø> (+0.02%) ⬆️
hudi-io 81.61% <ø> (ø)
hudi-timeline-service 83.34% <ø> (ø)
hudi-cloud 80.99% <ø> (ø)
hudi-kafka-connect 53.20% <ø> (ø)
Flag Coverage Δ
common-and-other-modules 44.91% <ø> (-7.08%) ⬇️
flink-integration-tests 41.58% <ø> (-7.54%) ⬇️
hadoop-mr-java-client 43.88% <ø> (-0.04%) ⬇️
integration-tests 15.14% <ø> (+1.68%) ⬆️
spark-client-hadoop-common 38.54% <ø> (-0.01%) ⬇️
spark-java-tests 52.20% <ø> (+0.04%) ⬆️
spark-scala-tests 53.20% <ø> (+6.24%) ⬆️
utilities 41.13% <ø> (+4.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 84 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The first run of this branch hung in test-flink-1's integration
test step for the full six hour default before GitHub cancelled
it. The five jobs of the engines workflow (flink-1, flink-2, the
two bundle validations, integration-tests) had no timeout either;
they measure 23 to 34 minutes, so 75 only fires on a hang.
@hudi-bot

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL PR with lines of changes > 1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants