Skip to content

feat(webdav): skip_health_check and disable_create_dir#2591

Closed
weihanglo wants to merge 2 commits intomozilla:mainfrom
weihanglo:webdav
Closed

feat(webdav): skip_health_check and disable_create_dir#2591
weihanglo wants to merge 2 commits intomozilla:mainfrom
weihanglo:webdav

Conversation

@weihanglo
Copy link

‼️ This can't be merged until opendal cuts a new release including the feature we want.


On startup, sccache verifies storage connectivity by reading/writing
a .sccache_check file. Some WebDAV servers reject this path format.
For example, bazel-remote requires SHA256 hash paths and returns 400
for arbitrary paths like .sccache_check.

Additionally, some servers don't support PROPFIND/MKCOL methods used
during directory creation. For example, bazel-remote returns 405.

This adds two independent options:

  • skip_health_check: bypasses the probe and assumes read-write access
  • disable_create_dir: skips PROPFIND/MKCOL calls during writes

Users can enable these via config or environment variables:

  • SCCACHE_WEBDAV_SKIP_HEALTH_CHECK=true
  • SCCACHE_WEBDAV_DISABLE_CREATE_DIR=true

Fixes: #2278

Update opendal dependency to use the git version
which includes the `disable_create_dir` option for WebDAV.
On startup, sccache verifies storage connectivity by reading/writing
a `.sccache_check` file. Some WebDAV servers reject this path format.
For example, bazel-remote requires SHA256 hash paths and returns 400
for arbitrary paths like `.sccache_check`.

Additionally, some servers don't support PROPFIND/MKCOL methods used
during directory creation. For example, bazel-remote returns 405.

This adds two independent options:

- `skip_health_check`: bypasses the probe and assumes read-write access
- `disable_create_dir`: skips PROPFIND/MKCOL calls during writes

Users can enable these via config or environment variables:

- `SCCACHE_WEBDAV_SKIP_HEALTH_CHECK=true`
- `SCCACHE_WEBDAV_DISABLE_CREATE_DIR=true`

Fixes: mozilla#2278
@weihanglo
Copy link
Author

@Xuanwo sorry for bothering you again. This is a way to fix bazel-remote support. With this, people can easily spin up a bazel-remote or nginx with minimal configuration to use as sccache backend. See https://bazel.build/remote/caching.

This would attract more usage of sccache and OpenDAL, since WebDAV is more a lightweight backend than others.

@weihanglo weihanglo marked this pull request as draft February 3, 2026 19:05
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 27.58621% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.26%. Comparing base (9f6cba4) to head (d79e3cd).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/cache/cache.rs 37.50% 10 Missing ⚠️
src/config.rs 25.00% 6 Missing ⚠️
src/cache/webdav.rs 0.00% 5 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (9f6cba4) and HEAD (d79e3cd). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (9f6cba4) HEAD (d79e3cd)
12 8
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2591      +/-   ##
==========================================
- Coverage   72.03%   65.26%   -6.78%     
==========================================
  Files          66       66              
  Lines       36953    32261    -4692     
==========================================
- Hits        26619    21054    -5565     
- Misses      10334    11207     +873     

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

@weihanglo
Copy link
Author

Found more blocker in bazel-remote as webdav backend. Will post in the original issue. Closing as this won't go any farther

@weihanglo weihanglo closed this Feb 6, 2026
@weihanglo weihanglo deleted the webdav branch February 6, 2026 11:33
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.

Using bazel-remote as cache backend is not working

2 participants