`run_uv` gives the `env_constraints` advice for a path/git-source build failure

Open Beginner friendly
#149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
tooling

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.

Description

automation

What

campaign_init.run_uv streams uv's output and, on a non-zero exit, greps it for uv's own Failed to build `<name>` line (UV_BUILD_FAILURE_RE).
A match is translated into missing_wheel_message: "no wheel for <name> 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.

Dominant language
Python
Stars
1
Forks
4
Avg merge
15h 39m
Merged PRs (30d)
24

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from con/mechababs

All issues in con/mechababs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.