Skip to content

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

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

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

Conversation

@zkoppert
Copy link
Copy Markdown
Contributor

@zkoppert zkoppert commented Apr 9, 2026

Pull Request

Proposed Changes

Resolves the remaining part of #27.

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 fail hardlinking and 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.

Before After
Hardlink warning Printed on every run Suppressed

Testing

  • make lint - all 5 linters pass, score 10.00/10
  • make test - 269 tests pass, 99% coverage
  • docker build - image builds successfully

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 fail hardlinking and emit a noisy warning on every run. Setting
UV_LINK_MODE=copy tells uv to use copy mode directly, suppressing the
warning.

Resolves the remaining part of #27.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert self-assigned this Apr 9, 2026
@github-actions github-actions bot added the fix Bug fix label Apr 9, 2026
@zkoppert zkoppert marked this pull request as ready for review April 9, 2026 05:31
@zkoppert zkoppert requested a review from jmeridth as a code owner April 9, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants