Skip to content

Bound the CI test step and drop the unusable dispatch guard - #1449

Merged
suketa merged 1 commit into
mainfrom
ci/bound-test-step-and-drop-dispatch-guard
Aug 14, 2026
Merged

Bound the CI test step and drop the unusable dispatch guard#1449
suketa merged 1 commit into
mainfrom
ci/bound-test-step-and-drop-dispatch-guard

Conversation

@suketa

@suketa suketa commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Follow-up to #1448.

Problem

within_dispatch_timeout, added in #1448, cannot do what it claims. A stranded UDF dispatcher wedges the VM with the GVL held, so Thread#join(timeout) never returns and the flunk after it is unreachable — a regression hangs the run exactly as it would with no guard at all.

Verified against the unfixed build (main before #1448): the NUL-message query strands the dispatcher and the next query never returns, at threads=1 and at default threads, with a 10-row table and with 300k rows. The wedged process also ignores SIGTERM, so plain timeout cannot reclaim it — only timeout -s KILL.

So the guard is a bound that looks like a bound and isn't, which is worse than none: the next person to break this trusts it and CI hangs anyway.

Change

Put the bound where it can actually be enforced — timeout-minutes: 3 on the test step in test_on_ubuntu.yml and test_on_macos.yml — and delete the guard.

The step, not the job, because the test step is the only part that can wedge. Keeping it off the job clock leaves checkout, setup-ruby, the MySQL service health-checks, a possible cold duckdb download and rake build out of the budget; recent green main runs took 1m47s–3m30s end to end, so a 3-minute job cap would have failed two of the last five.

test_on_windows.yml needs nothing — it already bounds its test step through nick-fields/retry with timeout_minutes: 1.

Job-level timeout-minutes: 120 stays as the backstop, since a wedged VM ignoring SIGTERM means the step kill wants something behind it.

Verification

Against merged main (4a0b3ed), extension rebuilt:

  • test/duckdb_test/function_error_message_test.rb — 4 runs, 9 assertions, 0 failures, 0.21s
  • Full suite — 1383 runs, 2653 assertions, 0 failures, 2 skips, 52.6s wall
  • rubocop — no offenses

52s against a 3-minute step bound is ~3.5x headroom.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Simplified function error and recovery tests while preserving verification that subsequent function calls succeed after an error.
    • Improved test execution reliability by removing unnecessary thread-based timeout handling.
  • Chores

    • Added three-minute limits to Ruby test runs on macOS and Ubuntu to prevent stalled builds from running indefinitely.
    • Documented expected test duration and handling of potential callback-related hangs.

within_dispatch_timeout could never fire. A stranded UDF dispatcher wedges
the VM with the GVL held, so Thread#join's timeout never runs and flunk is
unreachable — a regression hung the run exactly as it would have with no
guard at all. Verified on the unfixed build: the wedged process also ignores
SIGTERM, so plain `timeout` cannot reclaim it either.

Put the bound where it can actually be enforced, as timeout-minutes on the
Ubuntu and macOS test steps. The step is the part that can wedge; keeping it
off the job clock leaves checkout, setup and the duckdb download out of the
budget. The suite runs in ~50s locally, so 3 minutes is ample. Windows
already bounds its test step through nick-fields/retry. Job-level
timeout-minutes stays as the backstop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 85034cfb-6637-4065-aa20-8a50bb239ac2

📥 Commits

Reviewing files that changed from the base of the PR and between 4a0b3ed and ba8cf2a.

📒 Files selected for processing (3)
  • .github/workflows/test_on_macos.yml
  • .github/workflows/test_on_ubuntu.yml
  • test/duckdb_test/function_error_message_test.rb

📝 Walkthrough

Walkthrough

The UDF error tests no longer use thread-based dispatch timeouts. The macOS and Ubuntu Ruby test steps now have three-minute CI timeouts with comments about potential callback hangs.

Changes

UDF timeout handling

Layer / File(s) Summary
Direct UDF error test execution
test/duckdb_test/function_error_message_test.rb
Removed within_dispatch_timeout. Scalar and aggregate error queries now execute directly. The recovery test still checks that a later UDF call succeeds.
CI timeout safeguards
.github/workflows/test_on_macos.yml, .github/workflows/test_on_ubuntu.yml
Added three-minute timeouts to the Ruby test steps and documented the potential UDF callback hang.
Estimated code review effort: 2 (Simple) ~10 minutes

Merge Risk: ⚪ Minimal · up to ba8cf

The change bounds the CI test step and removes an ineffective test guard without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both main changes: adding CI step timeouts and removing the ineffective dispatch guard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/bound-test-step-and-drop-dispatch-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@suketa
suketa merged commit 974bf84 into main Aug 14, 2026
39 checks passed
@suketa
suketa deleted the ci/bound-test-step-and-drop-dispatch-guard branch August 14, 2026 23:16
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.

1 participant