Repository navigation
[CI] Pin the nightly changelog to the repository uv and check uv pins in pre-commit - #9343
Conversation
…re-commit The nightly changelog compile ran uv 0.13.1 while every other pin and the current uv.lock use uv 0.12.9. After bumping package versions, uv 0.13.1 rewrites the lock's revision and the open3d dependency list, so the compile's lock check fails every night. Pin the nightly to 0.12.9. Add a check-uv-version pre-commit hook: every uv image and setup-uv version in the repository must name one version, and uv.lock must carry the revision that version writes. uv lock --check accepts locks written by either uv, so it cannot catch the drift.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (4). Other reviewed categories look good.
- PR description: Narrow “every uv pin” and “lockfile format” to scanned image/setup-uv pins and header revision; retain validation revisions and the documented #9344 dependency, preserve template sections, and remove repeated cause/fix prose; no benchmark is needed.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The hook describes a header-revision comparison as proof of lockfile authorship; state only the guarantee the code establishes.
- Test quality: Test quality looks good.
Minor fixes needed. Posted 4 inline findings.
Automated review; human maintainers own approval decisions.
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Pre-commit hook: every uv pin in the repository names one version, and ``uv.lock`` was written by it. |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Describe the header check accurately
The hook checks a revision number, not which uv wrote the lockfile. This overstates its guarantee; describe the pin and header-revision comparison instead.
| IMAGE_PIN = re.compile(r"ghcr\.io/astral-sh/uv:(\d+\.\d+\.\d+)") | ||
|
|
||
|
|
||
| def image_pins() -> list[tuple[str, str]]: |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Keep file-local scanners private
These scanners and lock_revision have no callers outside this file. Their public names contradict the repository's private-function convention; prefix them with underscores and place them after main.
|
|
||
|
|
||
| def main() -> int: | ||
| """Print every disagreement and return 1 if there is one.""" |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Correct the failure docstring
main returns on the first failed check, so it never prints every disagreement. Describe first-failure behavior or collect the errors before returning.
| versions = sorted({version for _, version in pins}) | ||
| if len(versions) != 1: | ||
| listing = "\n".join(f" {location}: {version}" for location, version in pins) | ||
| print(f"uv is pinned to {len(versions)} versions; pin one everywhere:\n{listing}", file=sys.stderr) |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Log CLI failures
All three failure branches print diagnostics, contrary to the contribution guide's CLI failure rule. Use a module-level logger.error for those messages.
Confidence Score: 4/5
[Medium impact] The changes affect nightly changelog releases and repository pin checks. The PR appears safe to merge, with a non-blocking gap in how the new hook checks Docker image tags. Findings
SummaryPins the nightly changelog job to uv
Acknowledged by hujc7: Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile |
| """The ``uv.lock`` revision each pinned uv writes. Add the new entry when changing the pin.""" | ||
|
|
||
| IMAGE_FILES = ("docker/Dockerfile.*", "docker/test/*.py", "source/isaaclab/test/install_ci/Dockerfile.installci") | ||
| IMAGE_PIN = re.compile(r"ghcr\.io/astral-sh/uv:(\d+\.\d+\.\d+)") |
There was a problem hiding this comment.
Moving image tags pass unchecked
IMAGE_PIN silently skips uv image references whose tags are not three-part versions. Changing one Dockerfile to ghcr.io/astral-sh/uv:latest removes that image from the check. The remaining pins still agree on 0.12.9, so the hook passes without checking the changed image.
Find every uv image reference first, then reject unsupported or unpinned tags.
…9344) ## Summary `release/3.0.0` pins uv 0.12.9 in its Docker images and workflows, but its `uv.lock` was last written by uv 0.13.1. The nightly changelog compile re-locks after a version bump and rejects any other lockfile change, so the next version bump on this branch fails once #9343 pins the nightly to 0.12.9. This PR re-locks the branch with uv 0.12.9; no package version changes. # Description Part of NVBug 7139341, together with #9343 (`main`). 1. **Cause.** The backport of #8584 (#8592) wrote `uv.lock` with uv 0.13.1, so the lock is at `revision = 5`, while the branch's other uv pins are 0.12.9, which writes revision 3. The scheduled nightly compiles `main`, `release/3.1.0` and `release/3.0.0` with one uv from `main`'s workflow. That uv is now 0.12.9 (#9343), and with it the compile on this branch rewrites the lock format and refuses the result. 2. **Fix.** Re-lock with uv 0.12.9 (`uv lock --upgrade-package isaaclab`). Only the lock revision changes, and open3d's dependency list drops `ipywidgets`, as uv 0.12.9 writes it on `main` and `release/3.1.0`: a default `uv sync` then installs 191 instead of 207 packages, without `ipywidgets` and its dependencies, which only the `mimic` extra requires. Open3D's Jupyter web visualizer needs it; Isaac Lab code does not import it outside `isaaclab_mimic`. Also pin this branch's own nightly workflow to 0.12.9. 3. **Test.** On this branch plus one changelog fragment, with uv 0.12.9: `python3 tools/changelog/cli.py compile` fails before this change (`uv lock changed more than package versions`) and passes after it, with only version lines moving in `uv.lock`. `uv lock --check` passes. Merge order: before the next backport that brings a changelog fragment to `release/3.0.0`; the branch has none pending today. Suggested reviewer: kellyguo11 (#8592, #8696). ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `main` Not applicable: this PR targets `release/3.0.0`. ## Screenshots Not applicable. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] No documentation change is needed: only the lockfile and a CI pin change - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md) to any test changes: no test changes; the nightly compile was run before and after - [x] No changelog fragment: no source package changes - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
… in pre-commit (#9343) ## Summary The nightly changelog compile has failed every night since 2026-11-20. It runs uv 0.13.1, while `uv.lock` and every other uv pin in the repository use uv 0.12.9. This PR pins the nightly to 0.12.9 and adds a pre-commit check that keeps every uv pin and the lockfile format on one version. # Description Fixes NVBug 7139341 1. **Cause.** After bumping package versions, `tools/changelog/cli.py compile` runs `uv lock` and rejects any lockfile change other than version lines. uv 0.13.1 rewrites a lock written by uv 0.12.9: `revision = 3` becomes `5` and the open3d dependency list changes, so the compile fails. #8695 pinned the nightly to 0.13.1 while the lock was at revision 5. Since then, contributors on different uv versions have flipped the lock between revisions 3 and 5 six times, most recently back to 3 in #9193. 2. **Fix.** Pin the nightly to 0.12.9, the version of the Docker images, the other workflows and the current `uv.lock`. Add a `check-uv-version` pre-commit hook (`tools/pre_commit/check_uv_version.py`): every uv image and `setup-uv` version must name one version, and `uv.lock` must carry the revision that version writes. `uv lock --check` accepts a lock written by either version, so it cannot catch this drift. 3. **Test.** With uv 0.12.9, `python3 tools/changelog/cli.py compile` passes on `main` (6b20eac) and `release/3.1.0` (31b11f2): 16 packages bump and `uv.lock` changes only version lines. The hook passes on this branch and fails on `main` (two uv versions), on a revision-5 lock, and with one Dockerfile at 0.13.1. The scheduled nightly also compiles `release/3.0.0`, whose lock is still at revision 5: #9344 re-locks it with uv 0.12.9 and should merge before the next changelog fragment reaches that branch. Suggested reviewer: kellyguo11 (#8695). ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `main` ## Screenshots Not applicable. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] No documentation change is needed: only CI and pre-commit change - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md) to any test changes: no test changes; the hook was run against passing and failing pin sets - [x] No changelog fragment: no source package changes - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there (cherry picked from commit 87d5f53)
|
Backported to |
Summary
The nightly changelog compile has failed every night since 2026-11-20. It runs uv 0.13.1, while
uv.lockand every other uv pin in the repository use uv 0.12.9. This PR pins the nightly to 0.12.9 and adds a pre-commit check that keeps every uv pin and the lockfile format on one version.Description
Fixes NVBug 7139341
tools/changelog/cli.py compilerunsuv lockand rejects any lockfile change other than version lines. uv 0.13.1 rewrites a lock written by uv 0.12.9:revision = 3becomes5and the open3d dependency list changes, so the compile fails. [CI] Fix nightly changelog compilation #8695 pinned the nightly to 0.13.1 while the lock was at revision 5. Since then, contributors on different uv versions have flipped the lock between revisions 3 and 5 six times, most recently back to 3 in Add RSL-RL SuperMimic motion tracking and G1 deployment #9193.uv.lock. Add acheck-uv-versionpre-commit hook (tools/pre_commit/check_uv_version.py): every uv image andsetup-uvversion must name one version, anduv.lockmust carry the revision that version writes.uv lock --checkaccepts a lock written by either version, so it cannot catch this drift.python3 tools/changelog/cli.py compilepasses onmain(6b20eac) andrelease/3.1.0(31b11f2): 16 packages bump anduv.lockchanges only version lines. The hook passes on this branch and fails onmain(two uv versions), on a revision-5 lock, and with one Dockerfile at 0.13.1.The scheduled nightly also compiles
release/3.0.0, whose lock is still at revision 5: #9344 re-locks it with uv 0.12.9 and should merge before the next changelog fragment reaches that branch.Suggested reviewer: kellyguo11 (#8695).
Type of change
Release backport
mainScreenshots
Not applicable.
Checklist
pre-commitchecks withuv run isaaclab --formatCONTRIBUTORS.mdor my name already exists there