feat: Add UV_LINK_MODE=copy - #1452
Conversation
bepri
left a comment
There was a problem hiding this comment.
Thanks! Could you make a changelog entry for this and update the reference docs for the plugin with a sentence or two explaining why it's set by us?
Added in 4f5e86c—feel free to commit directly to this branch if you'd like to make any changes |
Companion to canonical/craft-providers#900 When the cache dir is mounted from the LXD host, hardlinking from the global cache (uv's default behavior) is not possible e.g. ``` :: 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. ```
614b320 to
4f5e86c
Compare
|
(rebased on main) |
bepri
left a comment
There was a problem hiding this comment.
Thanks - just minor nitpicks on the docs entries now.
Co-authored-by: Imani Pelton <imani.pelton@canonical.com> Signed-off-by: Carl Csaposs <carl.csaposs@canonical.com>
Signed-off-by: Michael DuBelko <michael.dubelko@gmail.com>
Signed-off-by: Imani Pelton <imani.pelton@canonical.com>
|
|
||
| **Type:** ``clone``, ``copy``, ``hardlink``, or ``symlink`` | ||
|
|
||
| **Default:** "copy" |
There was a problem hiding this comment.
Setting this to copy by default will slow down the default case where the cache isn't mounted from the outer machine. While I think it's a good idea to document this here and provide a motivation for using copy, I don't think we should change the default value.
There was a problem hiding this comment.
Once canonical/craft-providers#900 is merged, would that not become the default (similar to how pip's cache is mounted from the host by default)?
lengau
left a comment
There was a problem hiding this comment.
Let's leave the default value unset still.
Companion to canonical/craft-providers#900
When the cache dir is mounted from the LXD host, hardlinking from the global cache (uv's default behavior) is not possible
e.g.