`run_uv` gives the `env_constraints` advice for a path/git-source build failure
- Dominant language
- Python
- Stars
- 1
- Forks
- 4
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 24
Description
## What
`campaign_init.run_uv` streams uv's output and, on a non-zero exit, greps it for uv's own ``Failed to build `` `` line (`UV_BUILD_FAILURE_RE`).
A match is translated into `missing_wheel_message`: "no wheel for `` on this system, add it to the cluster config's `env_constraints` and rerun".
That is the right diagnosis for a registry package with no wheel for this platform (old glibc, a new interpreter), where uv fell back to an sdist.
It is the wrong diagnosis when the package that failed to build is a path or git source: a campaign's `mechababs` pin is one by construction (PEP 610 self-pin of a dev checkout, or `git+…@ref`), and `babs` usually is.
A broken local mechababs checkout, a bad ref, or a build-backend error in babs produces the same `Failed to build` line and sends the developer to edit the cluster config, which cannot help.
## Where the signal already is
uv names the source in the same line for non-registry packages, e.g. ``Failed to build `mechababs @ file:///home/…` `` or ``` `babs @ git+https://github.com/PennLINC/babs.git@abc123` ```.
The regex stops at the first non-name character, so today it captures only `mechababs` and drops the `@ file://` / `@ git+` part that says which case this is.
## Fix
Widen the capture to take the source suffix when present, and branch:
- registry (no `@`): `missing_wheel_message` as today;
- path or git (`@ file://`, `@ git+`): a message saying the pinned source itself failed to build, naming the source, and pointing at the checkout or ref rather than at `env_constraints`.
Two unit tests, one per branch, feeding a canned uv transcript to the parser.
No change to the streaming or the retry text.
## Context
Found at chunk review of the env_constraints work (2026-08-22).
The env_constraints mechanism and its message were built for CentOS 7 / glibc 2.17 (slurm-docker-ci, Sherlock); this is only about which failures that message is attached to.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in campaign_init.run_uv and inspect UV_BUILD_FAILURE_RE and the parser that produces missing_wheel_message. Feed it canned uv transcripts for a registry failure and for path/git sources, then add the two unit tests requested. Done means registry failures keep the env_constraints advice while path and git failures identify the pinned source and direct attention to its checkout or ref.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100