Skip to content

ci: weekly grouped pip auto-bump-and-merge (docker OS/base image excluded) - #348

Open
amd-vivekag wants to merge 6 commits into
mainfrom
ci/nightly-pip-auto-bump
Open

ci: weekly grouped pip auto-bump-and-merge (docker OS/base image excluded)#348
amd-vivekag wants to merge 6 commits into
mainfrom
ci/nightly-pip-auto-bump

Conversation

@amd-vivekag

@amd-vivekag amd-vivekag commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Set up a weekly, grouped, ==-pinned pip auto-bump-and-merge so Python
dependencies 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
.

  • Pin requirements*.txt to == at the latest release that still supports
    the project's minimum Python (3.10) so Dependabot's weekly pip run produces a
    real diff (>= floors never move). pyproject.toml keeps its >= library
    floors; the TraceLens git+ VCS dep is left untouched.
  • .github/dependabot.yml: pip → interval: weekly,
    open-pull-requests-limit: 1, grouped python-deps
    (applies-to: version-updates, 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: for dependabot[bot] pip
    PRs, a validate-requirements matrix job installs requirements.txt +
    requirements-dev.txt across Python 3.10/3.11/3.12, then the merge step
    (needs: that job) enables GitHub auto-merge (squash). fetch-metadata
    is pinned to a commit SHA (this workflow has write perms + merges).
  • docs/ci-nightly-eval.md / docker/Dockerfile.ci-gpu: document the
    weekly 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

  • One grouped pip PR weekly; auto-merges (squash) after the requirements
    install job passes on 3.10/3.11/3.12 and the repo's other required checks
    (the aggregate CPU tests check and pre-commit) are green. No human review.
  • Why the extra install job: no existing gate exercises requirements*.txt
    (the CPU gate installs pyproject.toml extras, pre-commit installs only
    pre-commit), so an incompatible exact pin could otherwise merge green.
  • Security updates are the exception: Dependabot opens security-update PRs
    outside open-pull-requests-limit and the version-update group, so more than
    one pip PR can be open; those also auto-merge on green. Only version updates
    obey the one-PR/grouped contract.
  • Only one version-update bump PR open at a time; Dependabot rebases it upward
    each week.
  • A bump PR edits exactly requirements.txt (pyyaml, matplotlib,
    numpy, pandas, openpyxl, seaborn, beautifulsoup4, click) and
    requirements-dev.txt (pytest, pytest-cov, pre-commit,
    pytest-timeout, pytest-xdist, pytest-forked). It never edits
    pyproject.toml floors, docker/**, or config/ci/ci-constraints.txt.
  • docker OS/base image: bump manually via
    docker buildx imagetools inspect rocm/pytorch:<tag> → update the FROM ...@sha256:... in docker/Dockerfile.ci-gpu → run Refresh baselines.

Relationship to #345

Not fully independent: bump-validate.yml (deleted by #345) triggers the
self-hosted GPU eval on any requirements*.txt change 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.yml
itself skips to Success since requirements*.txt isn't a GPU-relevant path.

Required repo settings (prerequisites)

  • Allow auto-merge (Settings → General → Pull Requests).
  • Actions: Read and write permissions + Allow GitHub Actions to create
    and approve pull requests
    (Settings → Actions → General).
  • Branch protection on main: required status checks configured (CPU tests, pre-commit) with no blocking human review for pip bump PRs (or a
    Ruleset bypass for Dependabot). If approvals are still required with no bypass,
    auto-merge waits.

Review updates (f092769, addressing Copilot)

  • Added the validate-requirements matrix job gating auto-merge.
  • Fixed pins that broke Python 3.10: matplotlib 3.11.13.10.9,
    numpy 2.5.12.2.6, pandas 3.0.52.3.3 (3.11/2.3+/3.0 require ≥3.11).
  • SHA-pinned dependabot/fetch-metadata; explicit applies-to: version-updates

Closes #346
Refs #303

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>
Copilot AI balanced review requested due to automatic review settings August 7, 2026 16:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/dependabot-auto-merge.yml
Comment thread .github/workflows/dependabot-auto-merge.yml Outdated
Comment thread .github/dependabot.yml Outdated
Comment thread .github/dependabot.yml
Comment thread docs/ci-nightly-eval.md Outdated
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>
Copilot AI review requested due to automatic review settings August 7, 2026 16:16
@amd-vivekag amd-vivekag changed the title ci: nightly grouped pip auto-bump-and-merge (docker OS/base image excluded) ci: weekly grouped pip auto-bump-and-merge (docker OS/base image excluded) Aug 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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] from pyproject.toml rather than requirements*.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-32 remains 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>
Copilot AI review requested due to automatic review settings August 10, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-requirements run 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'

Comment thread .github/workflows/dependabot-auto-merge.yml Outdated
amd-vivekag and others added 2 commits August 10, 2026 09:35
…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>
Copilot AI review requested due to automatic review settings August 10, 2026 09:39
@amd-vivekag

Copy link
Copy Markdown
Collaborator Author

Follow-up on the latest review's note that validate-requirements only gates enabling auto-merge (via needs:) and isn't a merge requirement across a rebase -- so a rebased Dependabot PR could merge once the other required checks pass while its re-validation is still pending: fixed in 737252f.

Added an always-present Requirements validation aggregate job (same pattern as cpu-tests.yml's required / "CPU tests" check, per actions/runner#952 -- the per-version matrix legs can't be required because a skipped matrix never emits their contexts). Branch protection on main should require this one stable context; since gh pr merge --auto waits on required checks on the current head SHA, a rebased bump is re-validated on its merge commit rather than only when auto-merge was first enabled. The aggregate reports a pass on non-pip / non-Dependabot PRs, so it's safe to require globally. Documented the branch-protection requirement in docs/ci-nightly-eval.md.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/dependabot-auto-merge.yml Outdated
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>
Copilot AI review requested due to automatic review settings August 10, 2026 09:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 tests and pre-commit. Following those prerequisites would leave Requirements validation optional 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-metadata SHA from its own branch. Because that action's output is the sole condition for the write-capable job, a compromised update could report pip and 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]'

amd-vivekag added a commit that referenced this pull request Aug 15, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: weekly grouped pip auto-bump-and-merge (docker OS/base image excluded)

2 participants