Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

fix: ignore any uv.toml file#1725

Open
tvanantwerp wants to merge 1 commit into
Comfy-Org:mainfrom
tvanantwerp:fix/ignore-uv-config
Open

fix: ignore any uv.toml file#1725
tvanantwerp wants to merge 1 commit into
Comfy-Org:mainfrom
tvanantwerp:fix/ignore-uv-config

Conversation

@tvanantwerp

@tvanantwerp tvanantwerp commented May 25, 2026

Copy link
Copy Markdown

Summary

  • Set UV_NO_CONFIG=1 in the bundled uv's environment so user/system uv.toml files (e.g. ~/.config/uv/uv.toml) cannot influence dependency resolution.
  • Add a regression test asserting uvEnv.UV_NO_CONFIG === '1'.

Closes #1722.

Root cause

The bundled uv binary still performs uv's normal config discovery — user config at ~/.config/uv/uv.toml, system config, and project-level uv.toml / [tool.uv]. Setting exclude-newer in my personal uv.toml applied that constraint every uv pip install and uv pip install --dry-run (the latter is what hasRequirements() runs to verify the venv), causing dependency resolution / verification to fail.

The desktop app already passes all needed configuration to uv via CLI args (--index-url, --python-preference, --index-strategy, etc.) and env vars (UV_PYTHON_INSTALL_MIRROR), so ignoring uv.toml config files shouldn't be an issue. Note: if a project-level uv config file is ever used instead of CLI args, then this fix would interfere with that.

Test plan

  • yarn lint
  • yarn typecheck
  • yarn test:unit (351 + 1 new test passing)
  • Built locally with yarn make and ran the app: venv creation and requirements installation completed cleanly while the offending user uv.toml was in place.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved dependency resolution consistency by ensuring the bundled package manager ignores user/system/project configuration files during dependency resolution.
  • Tests
    • Added a unit regression test to verify this behavior remains enabled.

@tvanantwerp tvanantwerp requested review from a team as code owners May 25, 2026 02:54
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 25, 2026
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 167a2abf-4fba-49ad-b342-e331b1ef4b00

📥 Commits

Reviewing files that changed from the base of the PR and between d5f2f31 and 833997a.

📒 Files selected for processing (2)
  • src/virtualEnvironment.ts
  • tests/unit/virtualEnvironment.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/unit/virtualEnvironment.test.ts
  • src/virtualEnvironment.ts

📝 Walkthrough

Walkthrough

The PR adds UV_NO_CONFIG: '1' to VirtualEnvironment.uvEnv to prevent the bundled uv binary from reading user or system configuration files during dependency resolution. A unit test validates this environment variable is always set.

Changes

UV Hermetic Configuration

Layer / File(s) Summary
UV_NO_CONFIG environment variable and test
src/virtualEnvironment.ts, tests/unit/virtualEnvironment.test.ts
VirtualEnvironment.uvEnv now sets UV_NO_CONFIG: '1' to isolate the bundled uv from user/system uv.toml configuration during dependency resolution. A regression test asserts this variable is always set.

🐰 A bundled uv, hermetic and free,
Now ignores all configs it won't see,
No user-level drift, no system surprise,
Just pure resolution beneath clear skies,
The test ensures it stays that way,
Safe from wayward exclude-newer today! 🌳

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: ignore any uv.toml file' directly describes the main change: setting UV_NO_CONFIG to prevent uv.toml files from being read.
Linked Issues check ✅ Passed The PR fully addresses issue #1722's primary objective by implementing UV_NO_CONFIG=1 to insulate the bundled uv from user/system configuration.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the primary objective of #1722: setting UV_NO_CONFIG in virtualEnvironment.ts and adding a regression test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Prevents user/system settings in a uv.toml file from interfering with installation and resolution of dependencies. See Comfy-Org#1722.
@tvanantwerp tvanantwerp force-pushed the fix/ignore-uv-config branch from d5f2f31 to 833997a Compare June 14, 2026 14:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: global uv setting exclude-newer causes install failure

1 participant