Skip to content

fix: suppress uv hardlink warning with UV_LINK_MODE=copy#386

Merged
zkoppert merged 1 commit intomainfrom
fix/uv-link-mode-warning
Apr 10, 2026
Merged

fix: suppress uv hardlink warning with UV_LINK_MODE=copy#386
zkoppert merged 1 commit intomainfrom
fix/uv-link-mode-warning

Conversation

@zkoppert
Copy link
Copy Markdown
Collaborator

@zkoppert zkoppert commented Apr 9, 2026

Proposed Changes

When running as a GitHub Action, the uv cache and target .venv directory end up on different filesystems (container overlay vs host mount), causing uv to emit a noisy warning on every run:

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.

Adding ENV UV_LINK_MODE=copy to the Dockerfile tells uv to use copy mode directly, suppressing the warning.

This is the same fix applied in github-community-projects/pr-conflict-detector#65.

Before After
Hardlink warning Printed on every run Suppressed

Testing

  • docker build - image builds successfully with the new env var

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

When running as a GitHub Action, the uv cache and target .venv directory
end up on different filesystems (container overlay vs host mount), causing
uv to emit a noisy warning on every run. Setting UV_LINK_MODE=copy tells
uv to use copy mode directly, suppressing the warning.

Signed-off-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@zkoppert zkoppert self-assigned this Apr 9, 2026
@github-actions github-actions bot added the fix label Apr 9, 2026
@zkoppert zkoppert marked this pull request as ready for review April 9, 2026 18:29
@zkoppert zkoppert requested a review from jmeridth as a code owner April 9, 2026 18:29
@zkoppert zkoppert merged commit 186d965 into main Apr 10, 2026
35 checks passed
@zkoppert zkoppert deleted the fix/uv-link-mode-warning branch April 10, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants