Repository navigation
fix(helm): align provisioner state root for PVC mounts - #5625
Conversation
willem-bd
left a comment
There was a problem hiding this comment.
Verified the fix is correct and needed: the Gateway emits skill projection extra mounts rooted at its DEER_FLOW_HOST_BASE_DIR (/app/backend/.deer-flow in the chart), while the provisioner previously fell back to /.deer-flow, so _is_path_under_base rejected valid paths with HTTP 400 before any PVC subPath translation. With both roots aligned, _extra_mount_pvc_sub_path now yields deer-flow/<suffix>, which matches the Gateway's own subPath: deer-flow mount of the same home PVC. I executed scripts/check_chart_sandbox_storage.sh at this head with helm v3.16.4: all assertions pass, and reverting just the provisioner env from the template makes it fail with 2 assertion failures, so the regression tripwire works. One suggestion inline about pinning the remaining leg of the path contract.
Summary
DEER_FLOW_HOST_BASE_DIRvalues alignedpersistence.home.enabled=falseWhy
The Gateway emits sandbox skill projection mounts as host-path-shaped entries rooted at its
DEER_FLOW_HOST_BASE_DIR(/app/backend/.deer-flowin the chart).In
USERDATA_PVC_NAMEmode, the provisioner first validates those paths against its ownDEER_FLOW_HOST_BASE_DIR, then converts the relative suffix into adeer-flow/<suffix>PVC subPath.The chart currently sets the Gateway root but leaves the provisioner on the runtime default
/.deer-flow. As a result, valid Gateway projection paths such as:are outside the provisioner's allowed base and can be rejected before sandbox creation.
With the shared home PVC enabled, both components should use the same logical root so the path maps to:
on the PVC.
Testing
Added
scripts/check_chart_sandbox_storage.sh, wired into the chart workflow. It renders Gateway and provisioner deployments separately and asserts:DEER_FLOW_HOST_BASE_DIRwith the default shared home PVC/app/backend/.deer-flowUSERDATA_PVC_NAMEis present in the provisionerDEER_FLOW_HOST_BASE_DIRwhen home persistence is disabledRefs #4030