Skip to content

webdav: add SCCACHE_WEBDAV_DISABLE_CREATE_DIR option - #2872

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
ChriFo:webdav-disable-create-dir
Sep 26, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
ChriFo:webdav-disable-create-dir

Conversation

@ChriFo

@ChriFo ChriFo commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Picks up the disable_create_dir part of #2591 (closed), split out per
@weihanglo's suggestion there — see discussion on that PR.

Some WebDAV servers only implement GET/HEAD/PUT/DELETE and reject MKCOL
with 405 Method Not Allowed, which makes every cache write fail since the
webdav backend issues a MKCOL/PROPFIND before each write to ensure the
parent directory exists. Sonatype Nexus raw repositories (hosted, via
WebDAV) are one such server; I've been running this patch against one in
production.

opendal already supports skipping this (apache/opendal#7177), released in
0.56.0. sccache is already on opendal 0.58.1 (#2715), so this needs no git
dependency — just the config plumbing.

Comment thread src/cache/webdav.rs Outdated
Comment thread src/config.rs
Comment thread src/config.rs Outdated
@codecov-commenter

codecov-commenter commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.40%. Comparing base (8396f02) to head (ce20e23).

Files with missing lines Patch % Lines
src/config.rs 93.93% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2872      +/-   ##
==========================================
+ Coverage   76.35%   76.40%   +0.05%     
==========================================
  Files          72       72              
  Lines       40219    40250      +31     
==========================================
+ Hits        30709    30754      +45     
+ Misses       9510     9496      -14     

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

@ChriFo
ChriFo force-pushed the webdav-disable-create-dir branch from 84a417f to 0ad20fe Compare September 25, 2026 19:19
Some WebDAV servers only implement GET/HEAD/PUT/DELETE and reject
MKCOL with 405 Method Not Allowed, which makes every cache write fail
since the webdav backend issues a MKCOL/PROPFIND before each write to
ensure the parent directory exists. Sonatype Nexus raw repositories
are one such server.

opendal already supports skipping this (apache/opendal#7177, released
in 0.56.0). Set SCCACHE_WEBDAV_DISABLE_CREATE_DIR=true to use it.

This carries forward just the disable_create_dir part of #2591, which
was closed over the git dependency on opendal that PR needed at the
time; opendal 0.58.1, already used here, ships the option on
crates.io, so no such dependency is needed anymore.
@ChriFo
ChriFo force-pushed the webdav-disable-create-dir branch from 0ad20fe to ce20e23 Compare September 25, 2026 19:24
@sylvestre

Copy link
Copy Markdown
Collaborator

if the ci is green i will merge it

@sylvestre
sylvestre merged commit b6c2cb2 into mozilla:main Sep 26, 2026
51 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

Thanks for your 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