-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add option to skip RW mode check #2133
base: main
Are you sure you want to change the base?
Conversation
docs/Configuration.md
Outdated
@@ -3,6 +3,9 @@ | |||
## file | |||
|
|||
```toml | |||
# If specified, wait this long for the server to start up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't hesitate to do this into a different PR as it is unrelated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing: #2134
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2133 +/- ##
===========================================
+ Coverage 30.91% 42.28% +11.37%
===========================================
Files 53 53
Lines 20112 20653 +541
Branches 9755 9962 +207
===========================================
+ Hits 6217 8734 +2517
+ Misses 7922 7911 -11
+ Partials 5973 4008 -1965 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, thanks a lot for your work! It's better to find a way to test it. Maybe we can add a new workflow with assume mode enabled?
indeed, it will need some tests before merging this PR! |
In the config, `cache.assume_rw_mode`; in the environment, `SCCACHE_ASSUME_RW_MODE`. The "winning" value, if any is specified, will cause the server to skip the read/write `check` of the remote backend and assume that it operates in the given mode.
WIP: I've not tested this yet.
Adds a config / env option,
cache.assume_rw_mode
orSCCACHE_ASSUME_RW_MODE
. If present, the server skips the startup check of the cache's mode, and assumes it is the one specified. If not present, the server attempts to read and write from the server, and uses the results to determine the mode.Fixes #2132 (I think - again, I need to work out how to test this properly before sending forward).