Skip to content

fix(ci): stop smoke-boot.sh false-positive on jOOQ "tip of the day"#6336

Open
mengw15 wants to merge 8 commits into
apache:mainfrom
mengw15:fix/6332-smoke-boot-jooq-false-positive
Open

fix(ci): stop smoke-boot.sh false-positive on jOOQ "tip of the day"#6336
mengw15 wants to merge 8 commits into
apache:mainfrom
mengw15:fix/6332-smoke-boot-jooq-false-positive

Conversation

@mengw15

@mengw15 mengw15 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The boot smoke check (.github/scripts/smoke-boot.sh, from #6220) decided a service had crashed on boot by grepping its whole log for exception class names (NoClassDefFoundError, ClassNotFoundException, …). jOOQ prints a random "tip of the day" banner naming those exceptions in prose, so whenever it drew that tip the check reported a crash even though the service booted fine — a random failure on any jOOQ-using service, on any PR (e.g. config-service on #6331). Closes #6332.

  • Decide from the process, not the log. smoke-boot.sh now bases its verdict on process behaviour: reaching LISTEN is a healthy boot; exiting before LISTEN is a crash (it reports the process's exit code); neither within the timeout is a hang. This is what actually distinguishes a boot crash and can't be fooled by log text — no more grepping for exception-name strings.
  • Rework the regression test end-to-end. .github/scripts/test_smoke_boot.sh drives smoke-boot.sh with fake launchers: a healthy service that logs the jOOQ tip must pass, a crasher must fail, a hang must time out. The infra job's shell-test discovery is broadened to .github/scripts/ so it runs.

Any related issues, documentation, discussions?

Closes #6332. Boot check from #6220; the false positive surfaced through the platform-integration boot checks (#6274). Per review feedback, the fragile log scan is replaced by a process-exit check.

How was this PR tested?

  • .github/scripts/test_smoke_boot.sh passes locally and is deterministic across repeated runs: a healthy service that prints the jOOQ tip → OK; a service that exits on boot → FAIL (with its exit code); a service that never listens → FAIL (timeout).
  • Confirmed smoke-boot.sh reports the crash's exit code, e.g. exited on boot (exit code 3) before listening on :<port>.
  • The infra job discovers the test via find bin .github/scripts -name 'test_*.sh'; smoke-boot.sh keeps its executable bit.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-8)

@github-actions github-actions Bot added fix ci changes related to CI labels Jul 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@codecov-commenter

codecov-commenter commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.06%. Comparing base (afa8af2) to head (f466541).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6336      +/-   ##
============================================
+ Coverage     66.04%   66.06%   +0.01%     
- Complexity     3380     3382       +2     
============================================
  Files          1142     1142              
  Lines         44980    44980              
  Branches       4948     4948              
============================================
+ Hits          29709    29715       +6     
+ Misses        13631    13626       -5     
+ Partials       1640     1639       -1     
Flag Coverage Δ
access-control-service 70.00% <ø> (ø)
agent-service 51.90% <ø> (ø)
amber 66.58% <ø> (+<0.01%) ⬆️
computing-unit-managing-service 9.97% <ø> (ø)
config-service 52.30% <ø> (ø)
file-service 63.97% <ø> (ø)
frontend 63.53% <ø> (+0.02%) ⬆️
notebook-migration-service 78.94% <ø> (ø)
pyamber 91.18% <ø> (ø)
workflow-compiling-service 55.14% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 2 better · 🔴 5 worse · ⚪ 8 noise (<±5%) · 0 without baseline

Compared against main afa8af2 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 386 0.236 25,734/33,734/33,734 us 🔴 +23.6% / 🔴 +132.5%
bs=100 sw=10 sl=64 822 0.502 118,195/142,161/142,161 us ⚪ within ±5% / 🔴 +41.7%
🔴 bs=1000 sw=10 sl=64 940 0.573 1,063,025/1,142,245/1,142,245 us 🔴 +6.3% / 🔴 +18.0%
Baseline details

Latest main afa8af2 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 386 tuples/sec 432 tuples/sec 831.69 tuples/sec -10.6% -53.6%
bs=10 sw=10 sl=64 MB/s 0.236 MB/s 0.264 MB/s 0.508 MB/s -10.6% -53.5%
bs=10 sw=10 sl=64 p50 25,734 us 20,821 us 11,870 us +23.6% +116.8%
bs=10 sw=10 sl=64 p95 33,734 us 41,642 us 14,509 us -19.0% +132.5%
bs=10 sw=10 sl=64 p99 33,734 us 41,642 us 17,863 us -19.0% +88.9%
bs=100 sw=10 sl=64 throughput 822 tuples/sec 848 tuples/sec 1,078 tuples/sec -3.1% -23.7%
bs=100 sw=10 sl=64 MB/s 0.502 MB/s 0.517 MB/s 0.658 MB/s -2.9% -23.7%
bs=100 sw=10 sl=64 p50 118,195 us 117,196 us 93,851 us +0.9% +25.9%
bs=100 sw=10 sl=64 p95 142,161 us 139,814 us 100,335 us +1.7% +41.7%
bs=100 sw=10 sl=64 p99 142,161 us 139,814 us 109,028 us +1.7% +30.4%
bs=1000 sw=10 sl=64 throughput 940 tuples/sec 956 tuples/sec 1,100 tuples/sec -1.7% -14.5%
bs=1000 sw=10 sl=64 MB/s 0.573 MB/s 0.583 MB/s 0.671 MB/s -1.7% -14.7%
bs=1000 sw=10 sl=64 p50 1,063,025 us 1,046,062 us 927,449 us +1.6% +14.6%
bs=1000 sw=10 sl=64 p95 1,142,245 us 1,074,196 us 968,203 us +6.3% +18.0%
bs=1000 sw=10 sl=64 p99 1,142,245 us 1,074,196 us 998,749 us +6.3% +14.4%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,517.91,200,128000,386,0.236,25734.42,33733.99,33733.99
1,100,10,64,20,2432.72,2000,1280000,822,0.502,118194.58,142160.53,142160.53
2,1000,10,64,20,21287.62,20000,12800000,940,0.573,1063024.78,1142245.40,1142245.40

smoke-boot.sh grepped the whole boot log for bare linkage-error class
names, so jOOQ's random "tip of the day" banner -- which names
NoClassDefFoundError / ClassNotFoundException in prose -- was read as a
boot crash, failing the check at random for any jOOQ-using service on
any PR even when the service booted fine.

Match the exception as an actual thrown type instead (a fully-qualified
java.lang.* name or an "Exception in thread" header), which real linkage
failures produce but informational prose does not.

Add a regression test (.github/scripts/test_smoke_boot.sh, discovered by
the infra job) that reads crash_re out of smoke-boot.sh and asserts the
jOOQ tip is not flagged while real thrown errors still are.

Closes apache#6332.
@mengw15 mengw15 force-pushed the fix/6332-smoke-boot-jooq-false-positive branch from 3f6e16a to 92dced6 Compare July 11, 2026 07:56
@mengw15 mengw15 requested a review from Copilot July 11, 2026 08:21
@mengw15 mengw15 requested a review from Yicong-Huang July 11, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to eliminate flaky CI failures in the boot smoke checks caused by jOOQ’s random “tip of the day” mentioning exception class names in prose, by tightening the crash-detection grep pattern and adding a shell regression test to prevent reintroducing the false-positive.

Changes:

  • Tighten .github/scripts/smoke-boot.sh crash detection regex to match thrown linkage errors (and keep the Jackson Databind conflict sentinel) without matching prose mentions.
  • Add .github/scripts/test_smoke_boot.sh regression tests for the crash-detection regex.
  • Expand shell test discovery in .github/workflows/build.yml to include .github/scripts/.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/build.yml Runs shell test_*.sh suites from both bin/ and .github/scripts/ so the new regression test executes in CI.
.github/scripts/test_smoke_boot.sh Adds regression coverage for smoke-boot.sh crash regex (including the jOOQ tip false-positive case).
.github/scripts/smoke-boot.sh Updates crash_re to avoid matching bare exception names in informational logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/scripts/test_smoke_boot.sh Outdated
Comment thread .github/scripts/smoke-boot.sh Outdated
@mengw15 mengw15 marked this pull request as draft July 11, 2026 08:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Meng Wang <mengw15@uci.edu>
@mengw15 mengw15 marked this pull request as ready for review July 11, 2026 10:24
Comment thread .github/scripts/smoke-boot.sh Outdated
Comment on lines +59 to +65
# check exists to catch. Match the exception as an actual *thrown* type -- a
# fully-qualified java.lang.* name, or an "Exception in thread" header -- not the
# bare class name, which also shows up in harmless informational log prose (e.g.
# jOOQ prints a random "tip of the day" banner naming NoClassDefFoundError /
# ClassNotFoundException). Regression test: .github/scripts/test_smoke_boot.sh.
# See https://github.com/apache/texera/issues/6332.
crash_re='java\.lang\.(NoClassDefFoundError|ClassNotFoundException|LinkageError|NoSuchMethodError|AbstractMethodError|ExceptionInInitializerError|IncompatibleClassChangeError)|Exception in thread|requires Jackson Databind'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we in addition also check the return code from the process? if the process crashed, we get non 0 return code right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The way to check exception names in stdout/stderr is too fragile. it could easily be flaky if in the future we print out some of the exception name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in cf1da71 — reworked to exactly this. smoke-boot.sh now decides from the process: reaching LISTEN is a healthy boot; exiting before LISTEN is a crash, and it reports the exit code; timeout is a hang. The crash_re stdout/stderr scan is gone, so log text — the jOOQ tip, or any future exception-name prose — can't trip it.

The one case this intentionally gives up is a service that logs a linkage error but still reaches LISTEN; I don't think that's worth a fragile string match — a health-check on the admin endpoint would be a more robust signal if we ever want it.

The regression test now drives smoke-boot.sh end-to-end (a healthy service that logs the jOOQ tip passes; a crasher and a hang fail).

Deciding a boot crash by grepping the service log for exception class
names was fragile: any library that merely prints an exception name in
prose (jOOQ's random "tip of the day" names NoClassDefFoundError /
ClassNotFoundException) tripped it, failing the check at random.

Drop the log scan. Base the verdict on the process itself: reaching
LISTEN is a healthy boot; exiting before LISTEN is a crash (report its
exit code); neither within the timeout is a hang. That is what actually
distinguishes a boot crash and can't be fooled by log text.

Rework the regression test to drive smoke-boot.sh end-to-end with fake
launchers: a healthy service that logs the jOOQ tip must pass, a crasher
must fail, a hang must time out.

Closes apache#6332.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Comment thread .github/scripts/smoke-boot.sh
Comment thread .github/scripts/smoke-boot.sh
Comment thread .github/scripts/test_smoke_boot.sh Outdated
Comment thread .github/scripts/smoke-boot.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Meng Wang <mengw15@uci.edu>
@mengw15 mengw15 marked this pull request as draft July 11, 2026 19:51
@mengw15 mengw15 marked this pull request as ready for review July 11, 2026 20:04
mengw15 and others added 3 commits July 11, 2026 13:07
Two robustness fixes from review of the process-based boot check:

- Port ownership: the wait loop treats any LISTENer on the port as a
  healthy boot, so a leftover/unrelated listener could mask a crashed
  service. Fail fast if the port is already in use before launching, so
  a listener detected afterwards is the service we started.
- Reap on early exit: stop_service returned without `wait` when the
  service exited during the SIGTERM grace period, leaving a short-lived
  zombie. wait it before returning.

The regression test adds a case for the busy-port guard.
… cleanup

Resolve the launcher glob to exactly one match and error otherwise, so a
dist dir that accumulates multiple versions can't silently smoke-test the
wrong (lexicographically-first) binary.

Probe 127.0.0.1 instead of "localhost", so an IPv6-first name resolution
can't report a service that binds IPv4 0.0.0.0 as "not listening".

Add an EXIT trap that stops the service and removes the log on any exit,
so an aborted run can't orphan the JVM or leak temp files.
@mengw15 mengw15 requested a review from Yicong-Huang July 11, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

smoke-boot.sh false positive: jOOQ "tip of the day" text matches the crash regex and fails boot checks at random

4 participants