ci: set UV_LINK_MODE=copy in the Windows workflow - #529
Conversation
uv defaults to hardlink/clone link mode on Windows, which cannot replace _pydantic_core.*.pyd while the file is loaded by another process on the runner. That surfaces as "failed to remove file ...: Access is denied. (os error 5)" in the Install Dependencies step (comfy install --fast-deps shells out to python -m uv pip install), followed by a half-removed .pyd and an ImportError on pydantic_core. Copy mode writes a fresh file instead of hardlinking, sidestepping the in-use-file replacement failure.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
✅ No high-signal findings.
Panel: 6/8 reviewers contributed findings.
Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)
|
Reviews-resolver pass: no changes needed on this PR — no unresolved review threads, no merge conflict (`MERGEABLE`), and the diff is still exactly the intended 3 lines in `.github/workflows/test-windows.yml`. Verified `jobs.test.env` resolves to `{PYTHONIOENCODING: utf8, UV_LINK_MODE: copy}`. The red
|
|
Correction to my previous comment: the tomlkit fix is already in flight as #533 ("fix(registry): emit pyproject hint blocks as single-line tomlkit comments", BE-3285), so no new follow-up ticket is needed and I have not filed one. #533 covers the same root cause and is in fact broader than what I sketched — it fixes both multi-line So the state of this PR is unchanged: nothing to fix here. Once #533 merges to |
bigcat88
left a comment
There was a problem hiding this comment.
Approving, with one correction: the failure this fixes is no longer happening, so this lands as hardening rather than a fix.
The description says the Windows job "fails on every recent PR across all branches." That was true when you opened this (2026-07-17), but the last 12 test-windows.yml runs are 12/12 success, including branches from this morning:
2026-07-30T07:33 success matt/be-4357-git-utils-cwd
2026-07-30T07:13 success matt/be-3275-dedupe-auth-header-selection
2026-07-30T06:27 success matt/be-3266-cloud-http-error-envelope
… (9 more, all success)
The pydantic_core Access is denied (os error 5) breakage was resolved by #572's mixpanel<5 pin (2026-07-22), which stopped the version churn that had uv replacing a loaded .pyd mid-install.
I'm still approving because the underlying condition hasn't gone away — uv's default link mode on Windows remains hardlink/clone, and it still cannot replace a .pyd another process holds open. The pin removed today's trigger, not the mechanism. UV_LINK_MODE: copy costs a little install time on a CI runner and removes that whole failure class. uv's hardlink fallback is live and visible even here on Linux:
warning: Failed to hardlink files; falling back to full copy.
If this is intentional, set `export UV_LINK_MODE=copy` … to suppress this warning.
Your job-level placement reasoning checks out. I verified the claim rather than assuming: comfy_cli/uv.py has zero env= arguments across its subprocess calls (_check_call is a bare subprocess.check_call(cmd, cwd=cwd)), so the uv child that comfy install --fast-deps spawns inherits the job environment. Putting it on the step instead would have missed exactly that subprocess.
Three lines, CI-only, no runtime code touched. Worth updating the description so the next reader doesn't go looking for a red Windows job that isn't there any more.
ELI-5
The Windows CI job installs packages with
uv, anduvsaves time by hardlinking files instead of copying them. On Windows it cannot overwrite a.pydthat some other process still has open, so the install blows up with "Access is denied" before any test runs. Tellinguvto just copy the files makes the problem go away.What
Adds
UV_LINK_MODE: copytojobs.test.envin.github/workflows/test-windows.yml, alongside the existingPYTHONIOENCODING.Why
The "Windows Specific Commands" workflow fails on every recent PR across all branches, in the
Install Dependenciesstep, before any test runs:uv then exits non-zero and the half-removed
.pydproduces a downstreamImportError: cannot import name '__version__' from 'pydantic_core'.comfy install --fast-depsshells out topython -m uv pip install(comfy_cli/uv.py), and uv's default link mode on Windows is hardlink/clone — it cannot replace a.pydthat is loaded/locked by another process on the runner. Copy mode writes a fresh file instead, which is the standard remediation for this error. Setting it at job level (rather than on the step) means it also reaches the uv subprocess thatcomfy installspawns;comfy_cli/uv.pynever passes an explicitenv=, so the child inherits it.Verification / judgment calls
paths: comfy_cli/**, so a workflow-only change does not run it. Verify by re-running "Windows Specific Commands" on any open PR that touchescomfy_cli/**(e.g. fix(generate): fetch spec from /openapi not /openapi.yml (BE-2982) #517) once this lands, and confirmInstall Dependenciesand the subsequentcomfy launch --quick-test-for-ciboth pass..github/workflows/test-windows.ymlto thepathsfilter (which would make the workflow self-testing) — that is a separate behavior change and out of scope here. Flagging it as a reasonable follow-up.jobs.test.envresolves to{PYTHONIOENCODING: utf8, UV_LINK_MODE: copy}.