Skip to content

fix: wire UV_CACHE_DIR for plugin_daemon (Fixes #42433) - #42481

Merged
wylswz merged 4 commits into
langgenius:mainfrom
Souravrajvi0:feat/fix-plugin-uv-cache-42433-39f6
Sep 18, 2026
Merged

wylswz merged 4 commits into
langgenius:mainfrom
Souravrajvi0:feat/fix-plugin-uv-cache-42433-39f6

Conversation

@Souravrajvi0

@Souravrajvi0 Souravrajvi0 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #42433

When installing local plugins in Docker (especially on WSL), uv uses a cache under the bind-mounted PLUGIN_WORKING_PATH (/app/storage/cwd/.uv-cache). Mixed host/container ownership causes Permission denied (os error 13) during cache renames.

This PR wires UV_CACHE_DIR=/tmp/.uv-cache into the plugin_daemon service in Docker Compose and documents it in env examples.

Related change

The plugin daemon must honor UV_CACHE_DIR instead of hardcoding PLUGIN_WORKING_PATH/.uv-cache. Companion change: Souravrajvi0/dify-plugin-daemon#1

Checklist

  • Docker Compose + env example updates
  • Requires a matching dify-plugin-daemon release for full effect

Pass UV_CACHE_DIR=/tmp/.uv-cache to plugin_daemon so uv dependency installs
avoid the bind-mounted plugin working directory, matching shared.env guidance
and fixing permission denied errors on local plugin installs.

Fixes langgenius#42433
@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.52%. Comparing base (48189fe) to head (45c1c1f).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #42481      +/-   ##
==========================================
+ Coverage   87.47%   87.52%   +0.04%     
==========================================
  Files        5468     5462       -6     
  Lines      316809   316828      +19     
  Branches    63506    63477      -29     
==========================================
+ Hits       277127   277290     +163     
+ Misses      34300    34169     -131     
+ Partials     5382     5369      -13     
Flag Coverage Δ
api 87.18% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread docker/.env.example Resolved
Comment thread docker/docker-compose-template.yaml Resolved
Address review on langgenius#42481: do not default UV_CACHE_DIR in Compose or the
root .env.example; document the optional override in
plugin-daemon.env.example for Docker/WSL bind-mount cases.
Drop baked-in UV_CACHE_DIR from docker/.env.example and shared.env.example
so plugin_daemon keeps PLUGIN_WORKING_PATH/.uv-cache unless operators opt in
via docker/.env (documented in plugin-daemon.env.example).
@Souravrajvi0

Souravrajvi0 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @wylswz's I've made these changes:

  • Removed default UV_CACHE_DIR from docker/.env.example and docker/envs/core-services/shared.env.example (including the duplicate entry at the bottom of shared).
  • PR scope is now: comment-only docs in plugin-daemon.env.example + no baked-in cache path in Compose or essential env templates.

WSL/bind-mount workaround remains: add UV_CACHE_DIR=/tmp/.uv-cache to docker/.env after langgenius/dify-plugin-daemon#819 is released.

@wylswz
wylswz enabled auto-merge September 18, 2026 09:39
@wylswz
wylswz added this pull request to the merge queue Sep 18, 2026
Merged via the queue into langgenius:main with commit d39d9dd Sep 18, 2026
43 checks passed
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.

Local plugin installation fails with Permission Denied (os error 13) on .uv-cache

2 participants