Skip to content

fix: handle disabled cache backend features in multilevel chain#2695

Open
cryptomilk wants to merge 1 commit into
mozilla:mainfrom
cryptomilk:asn-fix
Open

fix: handle disabled cache backend features in multilevel chain#2695
cryptomilk wants to merge 1 commit into
mozilla:mainfrom
cryptomilk:asn-fix

Conversation

@cryptomilk
Copy link
Copy Markdown
Contributor

When a backend feature (e.g. redis or s3) is not compiled in but another remote backend feature is, the match arm for that backend was inactive and fell through to the wildcard, returning "Unknown cache level: 'X'" instead of a meaningful error.

Found while building Fedora package:

failures:

---- cache::multilevel::test::test_config_level_not_configured stdout ----

thread 'cache::multilevel::test::test_config_level_not_configured' (3797) panicked at src/cache/multilevel_test.rs:621:9:
Expected error about missing config or feature, got: Unknown cache level: 'redis'
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    cache::multilevel::test::test_config_level_not_configured

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.33%. Comparing base (c0db872) to head (c78c8a7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2695      +/-   ##
==========================================
- Coverage   74.34%   74.33%   -0.02%     
==========================================
  Files          70       70              
  Lines       39373    39373              
==========================================
- Hits        29271    29266       -5     
- Misses      10102    10107       +5     

☔ View full report in Codecov by Sentry.
📢 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.

When a backend feature (e.g. redis) is not compiled in but another
remote backend feature is, the match arm for that backend was inactive
and fell through to the wildcard, returning "Unknown cache level: 'X'"
instead of a meaningful error.
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