Skip to content

Abort compile tasks and associated subprocesses when a client disconnects#2761

Open
trxcllnt wants to merge 1 commit into
mozilla:mainfrom
trxcllnt:fix/kill-task-subprocs
Open

Abort compile tasks and associated subprocesses when a client disconnects#2761
trxcllnt wants to merge 1 commit into
mozilla:mainfrom
trxcllnt:fix/kill-task-subprocs

Conversation

@trxcllnt

@trxcllnt trxcllnt commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

If an sccache client disconnects from the server before the request completes, abort the tokio tasks spawned to handle the request. Uses tokio::process::Command::kill_on_drop() to ensure the task's pending subprocesses are also killed.

I've added an extra level of nesting and allowed clippy::redundant_async_block to aid in review, otherwise the diff is dominated by whitespace changes related to un-indenting the body of start_compile_task. I can push a new commit with the redundant async block removed once this PR is approved.

Fixes #2759

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.55556% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.15%. Comparing base (68cd330) to head (27a7542).

Files with missing lines Patch % Lines
src/server.rs 74.07% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2761      +/-   ##
==========================================
- Coverage   74.18%   74.15%   -0.03%     
==========================================
  Files          71       71              
  Lines       40491    40537      +46     
==========================================
+ Hits        30037    30062      +25     
- Misses      10454    10475      +21     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Ctrl-C leaving sccache compilations running

2 participants