-
Notifications
You must be signed in to change notification settings - Fork 11
UV cache dir misplaced #1455
Copy link
Copy link
Open
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency filedeploymentStuff related to running in production containerStuff related to running in production containerhelm chartonboardingGood for newcomersGood for newcomerspriority low
Description
UV requires a cache, which is currently set to build in the scratch directory. As the scratch directory is almost always in on a separate filesystem to the container (ie. either in a PVC or on the shared filesystem) UV needs to make network calls to access said cache. This is inefficient, and likely the cause of the weird Failed to hardlink messages on scratch install:
...
2026-03-24 14:10:44,013 INFO blueapi.cli.scratch Installing /workspace/dodal
Using Python 3.11.15 environment at: /app/.venv
Resolved 1 package in 4.31s
Building dls-dodal @ file:///workspace/dodal
Built dls-dodal @ file:///workspace/dodal
Prepared 1 package in 920ms
Uninstalled 1 package in 8ms
warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
If the cache and target directories are on different filesystems, hardlinking may not be supported.
If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 1 package in 10ms
- dls-dodal==2.2.0
+ dls-dodal==2.2.1.dev4+g664403bb7 (from file:///workspace/dodal)
2026-03-24 14:10:49,840 INFO blueapi.cli.scratch Cloning https://github.com/bluesky/ophyd-async.git
...
Deployment would probably be faster if the UV cache was inside the actual container. However, we want each PVC to be re-usable (ie. if I update BlueAPI from 1.12.1->1.12.2, I want the 1.12.1 PV to stick around so I can re-use it.)
Acceptance Criteria
- Conclude whether the UV cache dir can be moved into a directory inside the container
- If the UV cache is moved from PVs / the shared filesystem, ensure that PVs are still reusable
- Either implement the change, or note and justify outcome in this ticket
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency filedeploymentStuff related to running in production containerStuff related to running in production containerhelm chartonboardingGood for newcomersGood for newcomerspriority low