Skip to content

[CI] Parity: support sha=latest by resolving the latest green run on main#3393

Open
ethanwee1 wants to merge 1 commit into
ROCm:developfrom
ethanwee1:ethanwee/parity-latest-sha
Open

[CI] Parity: support sha=latest by resolving the latest green run on main#3393
ethanwee1 wants to merge 1 commit into
ROCm:developfrom
ethanwee1:ethanwee/parity-latest-sha

Conversation

@ethanwee1

Copy link
Copy Markdown

Summary

Dispatching a parity run with the sha input left empty / set to latest — the documented "latest green on main" option (e.g. the baseline_sha commit-vs-commit comparison in this failing run) — failed immediately with:

Running: python3 ./download_testlogs --arch mi200 ... --baseline_sha 4685e41c...
Error: Please provide either pr_id or sha!

download_testlogs required exactly one of --pr_id or --sha1 and rejected the "neither" case, so latest was never actually supported despite the input hint saying "Leave empty for latest green on main."

Fix

Treat an empty --sha1 (or the literal string latest) as "resolve the latest green run on main":

  • Look up the newest successful ROCm default-workflow run on main and use its head commit as the target sha. download_workflow_run() already does exactly this when called with no head_sha, so the change is small and self-contained.
  • The parity.yml side already omits --sha1 when the input is latest, so no workflow change is needed.
  • Also clarifies the both-provided error message (pr_id and a real sha).

Kept entirely in download_testlogs so the script still works standalone (./download_testlogs --arch mi300 now resolves latest instead of erroring).

Validation (on fork)

  • Reproduces the reported scenario (baseline_sha + empty sha, mi200): run 28811245419 — the guard no longer errors; the log now shows No sha or pr_id given; resolving latest green ROCm run on main... Resolved 'latest' to sha: a09b29e7.... (That run then stops later only because the arbitrary baseline commit's mi200 artifacts have expired — HTTP 410 Gone — which is unrelated to this change.)
  • Plain latest run (no baseline, mi300): run 28811384934 — end-to-end latest-green resolution + parity.

Test plan

  • sha=latest / empty no longer errors at the download step; resolves to a concrete head SHA.
  • pr_id path unchanged.
  • Confirm plain-latest run produces a summary.

…main


download_testlogs required exactly one of --pr_id or --sha1 and rejected
the "neither" case, so dispatching parity with an empty/"latest" sha (the
documented "latest green on main" option, e.g. a baseline_sha comparison)
failed with "Please provide either pr_id or sha!".

Treat an empty --sha1 or the literal "latest" as "resolve latest green run
on main": look up the newest successful ROCm default-workflow run on main
(download_workflow_run already does this when given no head_sha) and use
its head commit as the target sha. The parity.yml side already omits
--sha1 for "latest", so no workflow change is needed. Also clarifies the
both-provided error message.
@rocm-repo-management-api

rocm-repo-management-api Bot commented Jul 6, 2026

Copy link
Copy Markdown

Jenkins build for 3ec517c634d490e4e861552aa79118d6f12b06ea commit finished as FAILURE
Links: Pipeline Overview / Build artifacts / Test Results

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.

1 participant