Skip to content

feat: all backends support making them as read-only#2705

Open
AJIOB wants to merge 1 commit into
mozilla:mainfrom
AJIOB:rw_mode_support_backends
Open

feat: all backends support making them as read-only#2705
AJIOB wants to merge 1 commit into
mozilla:mainfrom
AJIOB:rw_mode_support_backends

Conversation

@AJIOB

@AJIOB AJIOB commented May 11, 2026

Copy link
Copy Markdown
Contributor

For the local developers we want to provide the access to the remote cache server in read-only mode.

So, this PR allows read-only access to read-write storages via per-storage specific flag

@AJIOB AJIOB force-pushed the rw_mode_support_backends branch from 28a49ca to 1e6bacb Compare May 11, 2026 13:46
@codecov-commenter

codecov-commenter commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.54217% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.56%. Comparing base (5d52f91) to head (5e18212).

Files with missing lines Patch % Lines
src/config.rs 88.69% 13 Missing ⚠️
src/cache/cache.rs 78.43% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2705      +/-   ##
==========================================
+ Coverage   74.51%   74.56%   +0.04%     
==========================================
  Files          70       70              
  Lines       39652    39793     +141     
==========================================
+ Hits        29546    29670     +124     
- Misses      10106    10123      +17     

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

@AJIOB AJIOB force-pushed the rw_mode_support_backends branch 2 times, most recently from 56b0296 to aab1fa8 Compare May 17, 2026 14:30
@AJIOB AJIOB force-pushed the rw_mode_support_backends branch 3 times, most recently from 17b64d7 to b849dc1 Compare June 4, 2026 13:35
@AJIOB

AJIOB commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi @sylvestre . Is it ok to you?

Comment thread src/config.rs Outdated
Comment thread docs/Azure.md Outdated
@sylvestre

Copy link
Copy Markdown
Collaborator

please add more tests:

  • No test for the check() short-circuit returning ReadOnly when rw_mode is set
  • No test for cache_mode_from_env_var parsing

@AJIOB

AJIOB commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, will fix the PR.

Looks like the read-only short-circuit was tested via test_operator_storage_redis_with_read_only (was added in this PR)

@AJIOB AJIOB force-pushed the rw_mode_support_backends branch 3 times, most recently from 9646b21 to 884ca5d Compare June 5, 2026 19:49
@AJIOB AJIOB force-pushed the rw_mode_support_backends branch from 884ca5d to 5e18212 Compare June 5, 2026 19:52
@AJIOB

AJIOB commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

I've added 2 tests in that PR:

  • test_operator_storage_redis_with_read_only to check read-only short-curcuit via remote storage access.. The local storage logic wasn't changed, so not tested
  • test_cache_mode_from_env_var to check the logic of new function cache_mode_from_env_var

@AJIOB

AJIOB commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

@sylvestre , I've fixed all you suggested, thanks. Is it OK now?

@AJIOB AJIOB requested a review from sylvestre June 9, 2026 14:34
@AJIOB

AJIOB commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @sylvestre,

Graceful ping about the PR

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.

3 participants