Skip to content

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

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#732
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
Copilot AI review requested due to automatic review settings April 9, 2026 18:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces noisy uv runtime output when the Action runs with the cache and .venv on different filesystems by setting UV_LINK_MODE=copy in the Docker image environment.

Changes:

  • Set UV_LINK_MODE=copy in the Dockerfile to prevent uv from attempting hardlinks and emitting warnings in cross-filesystem scenarios.
Show a summary per file
File Description
Dockerfile Adds UV_LINK_MODE=copy to suppress uv hardlink fallback warnings during Action runs.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@zkoppert zkoppert merged commit 4eebd57 into main Apr 10, 2026
42 checks passed
@zkoppert zkoppert deleted the fix/uv-link-mode-warning branch April 10, 2026 19:26
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.

3 participants