Skip to content

fix(test): raise spawn-child join timeout in test_multi_process_visibility (main)#13589

Merged
erichare merged 1 commit into
mainfrom
fix/multiprocess-test-spawn-timeout-main
Jun 10, 2026
Merged

fix(test): raise spawn-child join timeout in test_multi_process_visibility (main)#13589
erichare merged 1 commit into
mainfrom
fix/multiprocess-test-spawn-timeout-main

Conversation

@erichare

@erichare erichare commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Forward-port of #13588 to main (clean cherry-pick of 443f1fd). See #13588 for details: the spawn-context child needs to cold-import the full langflow package and 10s is routinely exceeded on loaded CI runners; raised to 60s + kill-on-timeout.

Summary by CodeRabbit

  • Tests
    • Improved robustness of multi-process event appending test with enhanced timeout handling and cleanup procedures.

…ility

The test spawns a child via multiprocessing spawn context, which
cold-imports the full langflow package (plus coverage's multiprocessing
hooks in CI) before appending a single event. The 10s join timeout is
routinely exceeded on a loaded CI runner sharing 4 vCPUs with a second
xdist worker: in nightly run 27253229568 (Unit Tests - Python 3.12 -
Group 5) the test failed all 12 executions (5 reruns x 2 step attempts),
each rerun exactly 10s apart - the join deadline, not a product bug.

Raise the liveness bound to 60s (join returns immediately when the
child exits, so the passing case is unaffected) and kill the child on
timeout so a hung spawn can't leak into later tests.
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 00b149be-f818-49c4-83cd-ae8e8735d614

📥 Commits

Reviewing files that changed from the base of the PR and between 3fc644f and 916b88c.

📒 Files selected for processing (1)
  • src/backend/tests/unit/test_flow_events_service.py

Walkthrough

Updated test_multi_process_visibility to improve robustness of multi-process event appending by extending the child process join timeout and adding a forced termination fallback that kills the process if it exceeds the timeout, then rejoins to ensure cleanup completes.

Changes

Test Process Cleanup Robustness

Layer / File(s) Summary
Multi-process visibility test timeout and cleanup
src/backend/tests/unit/test_flow_events_service.py
Extended join timeout for spawned process and added forced termination with kill fallback to ensure cleanup completes reliably instead of hanging.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

ignore-for-release

✨ 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 fix/multiprocess-test-spawn-timeout-main

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 and usage tips.

@erichare erichare merged commit d27e88e into main Jun 10, 2026
20 of 40 checks passed
@erichare erichare deleted the fix/multiprocess-test-spawn-timeout-main branch June 10, 2026 06:14
@github-actions github-actions Bot added the bug Something isn't working label Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant