Skip to content

Expose remote cache read errors and fail on server disconnects - #2779

Open
seungpyoson wants to merge 1 commit into
mozilla:mainfrom
seungpyoson:agent/fail-closed-cache-errors
Open

Expose remote cache read errors and fail on server disconnects#2779
seungpyoson wants to merge 1 commit into
mozilla:mainfrom
seungpyoson:agent/fail-closed-cache-errors

Conversation

@seungpyoson

@seungpyoson seungpyoson commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • in the direct single-cache daemon path, surface non-NotFound remote read failures through the existing cache-error statistics path instead of counting them as ordinary misses
  • make post-CompileStarted response I/O failures follow the documented default-fatal policy while preserving SCCACHE_IGNORE_SERVER_IO_ERROR=1

Deliberately unchanged

  • startup rate-limit tolerance
  • automatic read-only downgrade when a configured backend cannot write
  • explicit read-only and public-cache configurations
  • client-side IPC and multi-level cache fallback policies

Scope

One commit changes src/cache/cache.rs and src/commands.rs only. There are no documentation, protocol, cache-format, dependency, disk-cache, multi-level-cache, or client-side-storage changes. Existing documentation already describes the server-I/O policy.

Validation

Focused regression tests cover unexpected direct remote read errors, default-fatal post-start disconnects, and the existing opt-in local fallback. Upstream CI and maintainer review remain required before merge.

@seungpyoson seungpyoson reopened this Jul 23, 2026
@seungpyoson
seungpyoson force-pushed the agent/fail-closed-cache-errors branch from e14c22c to 5abf492 Compare July 24, 2026 08:11
@seungpyoson seungpyoson changed the title Fix cache and server error propagation Fail closed on remote cache and server I/O errors Jul 24, 2026
@seungpyoson
seungpyoson marked this pull request as ready for review July 24, 2026 08:22
@seungpyoson
seungpyoson force-pushed the agent/fail-closed-cache-errors branch from 5abf492 to 83b66fd Compare July 24, 2026 08:38
@seungpyoson
seungpyoson force-pushed the agent/fail-closed-cache-errors branch from 83b66fd to a35fe90 Compare July 24, 2026 08:59
@seungpyoson seungpyoson changed the title Fail closed on remote cache and server I/O errors Expose remote cache read errors and fail on server disconnects Jul 24, 2026
@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.94%. Comparing base (7cd4f2c) to head (a35fe90).

Files with missing lines Patch % Lines
src/commands.rs 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2779      +/-   ##
==========================================
+ Coverage   70.90%   70.94%   +0.03%     
==========================================
  Files          71       71              
  Lines       40393    40414      +21     
==========================================
+ Hits        28642    28673      +31     
+ Misses      11751    11741      -10     

☔ 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.

@codspeed-hq

codspeed-hq Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 45.99%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 10 regressed benchmarks
✅ 48 untouched benchmarks
⏩ 6 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory lru_sequential_scan_pattern 128 B 260 B -50.77%
Memory lru_hotcold_access_pattern 128 B 260 B -50.77%
Memory hash_multiple_files 128 B 260 B -50.77%
Memory time_macro_finder_chunked 128 B 260 B -50.77%
Memory lru_cache_get_hit 128 B 260 B -50.77%
Memory hash_large_data 192 B 324 B -40.74%
Memory hash_header_file 192 B 324 B -40.74%
Memory cache_key_generation 192 B 324 B -40.74%
Memory time_macro_finder_with_macros 192 B 324 B -40.74%
Memory time_macro_finder_no_macros 192 B 324 B -40.74%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing seungpyoson:agent/fail-closed-cache-errors (a35fe90) with main (7cd4f2c)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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.

2 participants