ci: weekly grouped pip auto-bump-and-merge (docker OS/base image excluded) - #348
ci: weekly grouped pip auto-bump-and-merge (docker OS/base image excluded)#348amd-vivekag wants to merge 6 commits into
Conversation
Pin requirements*.txt to == so Dependabot's daily pip run produces a real diff, and enable auto-merge for those grouped bumps so they land without human review once required checks are green. - requirements.txt / requirements-dev.txt: convert >= floors to == at the current latest release (pyproject.toml keeps >= library floors on purpose; the TraceLens git+ VCS dep is left untouched). - .github/dependabot.yml: pip -> interval daily, open-pull-requests-limit 1, grouped python-deps (patterns ["*"]); remove the docker package-ecosystem block so the ROCm/Ubuntu OS/base image is never auto-bumped; github-actions stays weekly + human-merged. - .github/workflows/dependabot-auto-merge.yml: on green, enable GitHub auto-merge (squash) for dependabot[bot] PRs, but only when package-ecosystem == pip. - docs/ci-nightly-eval.md: document the daily grouped pip auto-merge, the one-open-PR rule, the exact files a bump PR touches (and never touches), and the manual docker OS/base-image bump flow. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Adds nightly grouped pip dependency updates with automatic squash merging while excluding Docker base-image updates.
Changes:
- Exact-pins Python dependencies.
- Configures daily grouped Dependabot updates and pip-only auto-merge.
- Documents automated and manual dependency-update procedures.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
requirements.txt |
Pins runtime and analysis dependencies. |
requirements-dev.txt |
Pins development dependencies. |
.github/dependabot.yml |
Configures grouped daily pip updates. |
.github/workflows/dependabot-auto-merge.yml |
Enables pip Dependabot auto-merge. |
docs/ci-nightly-eval.md |
Documents dependency-update operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Switch the grouped pip auto-bump cadence from daily to weekly for now (revisit later). Auto-merge behavior, the one-open-PR limit, grouping, the == pins, and the docker OS/base-image exclusion are unchanged. Docs updated to match. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/dependabot-auto-merge.yml:19
- This enables auto-merge without any required check validating the files being bumped. The CPU matrix explicitly installs
.[tests,hw-queue]frompyproject.tomlrather thanrequirements*.txt(cpu-tests.yml:227-255), pre-commit installs only pre-commit, and the GPU evaluation installs wheel extras. Thus an incompatible exact pin can pass every stated gate and merge automatically. Add a required supported-Python matrix that installs these requirement files (and ideally exercises their scripts) before enabling auto-merge.
- if: steps.meta.outputs.package-ecosystem == 'pip'
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --squash "$PR_URL"
docs/ci-nightly-eval.md:141
- This is not true while
.github/workflows/bump-validate.yml:11-32remains in the base: that workflow explicitly triggers on both requirements files and runs the reusable GPU evaluation for same-repository PRs, which includes Dependabot branches. Either account for that GPU run here or make this PR depend on/remediate the separate deletion; as written, the claimed behavior is not independent of #345.
required checks are green (`pytest (CPU, py3.10/3.11/3.12)` and `pre-commit`;
GPU checks auto-skip to Success for a requirements-only change). Only
Copilot review on PR #348: - Add a validate-requirements matrix job (py3.10-3.12) that installs requirements.txt + requirements-dev.txt and gate auto-merge on it, since no other required check exercises those files (an incompatible pin could otherwise merge green). - That check surfaced real breakage: matplotlib==3.11.1 / numpy==2.5.1 / pandas==3.0.5 require Python >=3.11, so they cannot install on 3.10 (a supported version). Re-pin to the latest 3.10-compatible releases (matplotlib==3.10.9, numpy==2.2.6, pandas==2.3.3). - Pin dependabot/fetch-metadata to a commit SHA (mutable v2 tag on a merge-capable, write-permission workflow). - Make the pip group explicit (applies-to: version-updates) and document the security-update exception to the one-PR/grouped contract. - Update docker/Dockerfile.ci-gpu comment: base image is bumped manually, not tracked by Dependabot. - docs: correct the required-check names (aggregate `CPU tests` + `pre-commit`, not per-version pytest legs) and the GPU/bump-validate relationship (this relies on #345 removing bump-validate.yml). Refs #303. Closes #346. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
.github/workflows/dependabot-auto-merge.yml:56
- Waiting for this job only protects the first call that enables auto-merge; it does not make validation a merge requirement. Auto-merge can remain enabled while an open Dependabot PR is rebased (an explicitly expected weekly path), so a later revision can merge as soon as the configured required checks pass even if its new
validate-requirementsrun is still pending or fails. Expose an always-present validation aggregate and require it in branch protection, or use a merge mechanism that reevaluates this validation for the current head SHA before merging.
needs: [meta, validate-requirements]
if: needs.meta.outputs.ecosystem == 'pip'
…kflow Scope GITHUB_TOKEN per job instead of workflow-wide write: meta is pull-requests:read, validate-requirements is contents:read with persist-credentials:false (it installs newly published PR packages before human review, so no write token in the git config), and only the auto-merge job holds contents/pull-requests:write. Co-authored-by: Cursor <cursoragent@cursor.com>
…gate Add an always-present `Requirements validation` aggregator job (same pattern as cpu-tests.yml's `required` check) that collapses the validate-requirements matrix into one fixed status context. Requiring it in branch protection enforces the install gate on the current head SHA, closing the rebase race where auto-merge (enabled once) could merge a rebased Dependabot PR before its re-validation completed. Document the branch-protection requirement in docs/ci-nightly-eval.md. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Follow-up on the latest review's note that Added an always-present |
A Dependabot PR can emit synchronize/reopened events triggered by a maintainer or other automation after auto-merge is enabled. Keying the meta job on github.actor skipped meta + the validate matrix on those events, and the always-on `Requirements validation` aggregate scored both skips as a pass -- so an updated head could merge without installing its pins. Guard on github.event.pull_request.user.login (stable across every revision) so validation covers all of them. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (2)
docs/ci-nightly-eval.md:148
- This check is mandatory for the rebase safety described here, but both the PR's “Required repo settings” section and linked #346 list only
CPU testsandpre-commit. Following those prerequisites would leaveRequirements validationoptional and permit the exact unvalidated-head merge race documented below. Add this check to the rollout prerequisites in the PR and reference issue.
check and `pre-commit`) are green. **`Requirements validation` must be a
required status check on `main`** (branch protection): it is the stable
aggregate over the `validate-requirements` matrix (the per-version legs can't
be required — a skipped matrix never emits their contexts, actions/runner#952),
and requiring it is what enforces the install gate on the *current head SHA*.
.github/workflows/dependabot-auto-merge.yml:37
- This guard still lets a GitHub Actions Dependabot PR execute the newly proposed
fetch-metadataSHA from its own branch. Because that action's output is the sole condition for the write-capable job, a compromised update could reportpipand auto-merge itself, bypassing the stated human-review policy for action bumps. Gate metadata on the expected pip branch namespace before executing the action.
if: github.event.pull_request.user.login == 'dependabot[bot]'
…7.2.4 / Ubuntu 24.04 / py3.12 / PyTorch 2.10) (#380) * chore(docker): move CI + default dev image to latest ROCm 7.14 (#379) GPU CI ran on ROCm 7.2 / PyTorch 2.9.1, several production releases behind the current 7.14 / 2.12.0. That one image backs the nightly eval, the GPU pytest gate, the sanitizer nightly and bump-validate, so all of them were reporting against a stale stack. Bump Dockerfile.ci-gpu to the latest production release, keeping the tag@digest form so Dependabot stays anchored to the intended stream while the digest keeps builds reproducible. Add Dockerfile.rocm-latest as the general-purpose dev image and make it the compose default. Existing images are untouched, so an .env that names one keeps working. The older pins stay deliberately: for those images the ROCm version is the experiment (a customer's stack, a specific amdgpu build, a bisect point), and that reasoning is now written down next to the table so new tooling lands on the latest image instead of a reproducer. Note the ROCm versioning discontinuity in the pin comments: 7.9-7.13 are the technology preview stream, so a higher number is not automatically newer-production and such a bump must be rejected. Co-authored-by: Cursor <cursoragent@cursor.com> * address self-review: keep the ROCm-stream notes valid across #348 (#379) The pin comment asserted that the tag "anchors Dependabot", and the CI plan said a preview-stream bump must be rejected specifically as a Dependabot proposal. Open PR #348 excludes docker from the Dependabot ecosystems, which would leave both statements stale on merge. Reword so each stays correct either way: the tag records the intended ROCm stream (anchoring Dependabot only for as long as dependabot.yml enables that ecosystem), and the preview-stream rejection applies to any bump, automated or manual. Co-authored-by: Cursor <cursoragent@cursor.com> * docker: fail closed unless the base image is a classic /opt/rocm install (#379) TheRock ships ROCm both as a system install rooted at /opt/rocm and as a Python wheel rooted at ROCM_PATH under site-packages with no /opt/rocm (rocm/pytorch:latest is already the latter). Every ROCm lookup here is bound to /opt/rocm: the env probe's version plus its hipBLASLt-commit and rocBLAS capture, scripts/audit_env_knobs.py, and the sanitizer GEMM fixtures. All of those fail soft. On a wheel image the probe reports null and the audit finds no libraries, so a future digest bump onto such an image would quietly gut the evidence the NaN escalations rely on while CI still looked green. Assert the layout at build time in both images that hardcode ROCM_HOME=/opt/rocm, mirroring the files nightly_eval.py actually reads so the guard tracks the real dependency. Verified against a classic image (passes, reports 7.0.2.1) and a wheel-based one (exits 1 with a pointer to the follow-up). Record the decision in docs/ci-testing-plan.md: classic is chosen for fidelity, since customers run system installs. Path-agnostic discovery is #381 and the wheel/:latest canary is #382; neither gates this PR. Co-authored-by: Cursor <cursoragent@cursor.com> * address review: report each image's real ROCm stack, bound the preview range (#380) Copilot raised three points on this PR, all correct. The preview-stream warning in Dockerfile.ci-gpu said "ROCm 7.9+" while the next sentence called 7.14+ production, so the guardrail contradicted itself and could have been read as grounds to reject a valid production bump. Bounded it to 7.9-7.13, matching the wording already used in Dockerfile.rocm-latest and docs/ci-testing-plan.md. The image labels claimed versions the images do not install: rocm70_9-1 starts from ROCm 7.2 / PyTorch 2.9.1, and the Shampoo variant repoints amdgpu-repo at the ROCm 7.0 meta build #19 -- "7.0_9-1" is the amdgpu installer package revision (amdgpu-install-internal-7.0_9-1), not a ROCm version. That matters now that these entries are presented as the way to select an older stack for reproduction. Corrected the labels to the userspace each image really installs and swept all four surfaces that carry them, not just the two lines quoted: the setup-env.sh menu, the README image table, the README file-structure block, and the .env.example option list. Each surface now also says not to read the version off the filename, since the filenames are staying put (renaming would break existing .env files). Co-authored-by: Cursor <cursoragent@cursor.com> * docker: retarget CI base to classic ROCm 7.2.4 / PyTorch 2.10 (#379) The 7.14 base does not work here, and CI proved it: the classic-layout guard added earlier failed both GPU jobs in 7 seconds with "no /opt/rocm/.info/version {,-dev}". Inspecting the image confirms why -- rocm/pytorch 7.14 installs ROCm from a wheel index into a venv (INDEX_URL=repo.amd.com/rocm/whl-multi-arch, PATH=/opt/venv/bin, npi.* labels) with no /opt/rocm at all, while everything here reads ROCm from /opt/rocm. Retarget to 7.2.4 / PyTorch 2.10.0, the newest ROCm *production* release that still ships the classic layout (verified: /opt/rocm/bin on PATH, no npi.* labels). This is the same base #376 proposed, so that PR is fully absorbed. Everything else in this PR stands unchanged: the new default dev image, the corrected per-image stack labels, and the guard -- which now passes and is what will verify the 7.14 flip later. 7.14 is not abandoned, just sequenced. Making ROCm discovery layout-agnostic is #381, and it is worth doing on its own merits rather than as a prerequisite: a wheel install carries the FULL 40-char rocm-libraries commit in share/therock/therock_manifest.json, where the classic header only exposes its first 8 as *_VERSION_TWEAK, plus the build's github_run_id and applied patches. Docs now record how to tell the two layouts apart without pulling an image. Co-authored-by: Cursor <cursoragent@cursor.com> * address self-review: make the layout pre-flight snippet actually show the tell (#379) The snippet claimed to reveal whether an image is classic or wheel-based but only printed the digest, which shows neither. Replace it with the imagetools --format invocations that do surface PATH and the npi.* labels without pulling, and record the expected output for both layouts so the reader can compare. Co-authored-by: Cursor <cursoragent@cursor.com> * docker: move the CI lane to Ubuntu 24.04 / Python 3.12 (#379) Same ROCm build, newer OS and Python. Both 7.2.4 variants carry +rocm7.2.4.lw.git3d3aa833 in their ref name and both are classic (/opt/rocm/bin on PATH, no npi.* labels), so this changes only the Ubuntu and Python axes -- there is no ROCm-level risk in the swap. Three reasons to take it now rather than later: * It is the newest published combination on every axis at once. 24.04 / py3.12 / torch 2.10.0 are the newest Ubuntu, Python and PyTorch on the 7.2.4 line; nothing newer exists outside the wheel-based 7.14 line. * It isolates variables for the eventual 7.14 flip. That image is 24.04/py3.12, so moving the OS and Python here leaves the flip as a ROCm-and-layout-only change instead of four simultaneous jumps. * The GPU gate was testing the OLDEST supported Python while the CPU matrix covers 3.10-3.12. It now exercises the version most users run, and 3.10 stays covered on CPU. Python stops at 3.12 by our own packaging, not by image availability: pyproject's classifiers end there and the CPU matrix tests 3.10-3.12. Going further means declaring support and extending that matrix first, so 3.13/3.14 plus torch 2.11/2.12 are tracked in #383 and arrive with the #381 flip. Ubuntu 22.04 standard support also ends April 2027 against 2029 for 24.04. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Set up a weekly, grouped,
==-pinned pip auto-bump-and-merge so Pythondependencies are raised to their latest releases every week and land without
human review once required checks are green — while the docker OS/base image is
never auto-bumped.
requirements*.txtto==at the latest release that still supportsthe project's minimum Python (3.10) so Dependabot's weekly pip run produces a
real diff (
>=floors never move).pyproject.tomlkeeps its>=libraryfloors; the TraceLens
git+VCS dep is left untouched..github/dependabot.yml: pip →interval: weekly,open-pull-requests-limit: 1, groupedpython-deps(
applies-to: version-updates,patterns: ["*"]); remove thedockerpackage-ecosystem block so the ROCm/Ubuntu OS/base image is never
auto-bumped;
github-actionsstays weekly + human-merged..github/workflows/dependabot-auto-merge.yml: fordependabot[bot]pipPRs, a
validate-requirementsmatrix job installsrequirements.txt+requirements-dev.txtacross Python 3.10/3.11/3.12, then the merge step(
needs:that job) enables GitHub auto-merge (squash).fetch-metadatais pinned to a commit SHA (this workflow has write perms + merges).
docs/ci-nightly-eval.md/docker/Dockerfile.ci-gpu: document theweekly grouped pip auto-merge, the one-open-PR rule, the security-update
exception, the files a bump PR touches / never touches, and the manual docker
OS/base-image bump flow.
Behavior
install job passes on 3.10/3.11/3.12 and the repo's other required checks
(the aggregate
CPU testscheck andpre-commit) are green. No human review.requirements*.txt(the CPU gate installs
pyproject.tomlextras, pre-commit installs onlypre-commit), so an incompatible exact pin could otherwise merge green.
outside
open-pull-requests-limitand the version-update group, so more thanone pip PR can be open; those also auto-merge on green. Only version updates
obey the one-PR/grouped contract.
each week.
requirements.txt(pyyaml,matplotlib,numpy,pandas,openpyxl,seaborn,beautifulsoup4,click) andrequirements-dev.txt(pytest,pytest-cov,pre-commit,pytest-timeout,pytest-xdist,pytest-forked). It never editspyproject.tomlfloors,docker/**, orconfig/ci/ci-constraints.txt.docker buildx imagetools inspect rocm/pytorch:<tag>→ update theFROM ...@sha256:...indocker/Dockerfile.ci-gpu→ run Refresh baselines.Relationship to #345
Not fully independent:
bump-validate.yml(deleted by #345) triggers theself-hosted GPU eval on any
requirements*.txtchange for same-repo PRs —including Dependabot's — and can't run on a Dependabot PR (no
ROCM_SHARED_KEY),which would block auto-merge. Merge #345 first (or together).
gpu-tests.ymlitself skips to Success since
requirements*.txtisn't a GPU-relevant path.Required repo settings (prerequisites)
and approve pull requests (Settings → Actions → General).
main: required status checks configured (CPU tests,pre-commit) with no blocking human review for pip bump PRs (or aRuleset bypass for Dependabot). If approvals are still required with no bypass,
auto-merge waits.
Review updates (f092769, addressing Copilot)
validate-requirementsmatrix job gating auto-merge.matplotlib 3.11.1→3.10.9,numpy 2.5.1→2.2.6,pandas 3.0.5→2.3.3(3.11/2.3+/3.0 require ≥3.11).dependabot/fetch-metadata; explicitapplies-to: version-updatesDockerfile.ci-gpucomment; corrected the required-check names and the ci: validate stack bumps nightly instead of on every PR raise #345 relationship.
Closes #346
Refs #303