Skip to content

Commit 65cda64

Browse files
authored
feat: enable asan build in quartz (#110)
## Motivation Closes #108. Merge only after rockrel/TheRock are wired ASAN releases currently have nowhere to land. Since #77 they are recognised and then deliberately dropped, so an ASAN nightly produces no published status at all. PR depends and is based on top of #102 This gives every build variant its own document and its own pointers, so ASAN results are published without a release build and an ASAN build ever being able to overwrite one another. ## Technical Details **Per-variant documents.** `_StatusDocumentKind` keys a document by build variant, with the member value doubling as the filename suffix (`""` for `release`, `"-asan"` for ASAN). **Per-variant pointers.** `_pointer_filename` applies the same suffix to every `latest` / `latest_good` pointer, across nightly, nightly-bkc (including the top-level cross-version pointers) and prerelease. The resulting tree is the one in the issue. **Finalization.** `FINALIZING_PHASES` now includes `release-asan`, so the ASAN orchestrator owns and finalizes its own document. **Tracking id.** `quartz_tracking_id` is extended to `<run_id>;<release_type>;<build_variant>`. `build_pytorch: false` and `build_jax: false` *are* passed to the setup job, so PyTorch and JAX alreadyrender `skipped` and will not hold the ASAN rollup at `in_progress`. ## Test Plan - 16 new tests covering document selection per variant, pointer naming across all three release tiers, independent finalization of the release and ASAN documents, rejection of unregistered sanitizer families, rejection of ASAN leaves against a normally-owned document, and the publication gate. ## Test Result 580 passed ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
1 parent e30a78c commit 65cda64

19 files changed

Lines changed: 1560 additions & 331 deletions

‎docs/status-json/README.md‎

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ directly to keys in the document:
5252
| **architecture** | A GPU target, for example `gfx942` or `gfx1201` (the same identifiers ROCm uses). |
5353
| **pipeline** | One product built from a release: `rocm` (the ROCm stack itself), `pytorch`, `jax`, and `native_packages`. A release can produce several. |
5454
| **phase** | A stage of a pipeline: `build` and `test`. For `native_packages`, `rpm` or `deb` instead. |
55+
| **build variant** | The release flavor, `release` or `asan-debug`. It selects the document: `status.json` for `release`, `status_<build_variant>.json` otherwise. |
5556
| **variant** | For PyTorch/JAX, one cell of the version matrix (for example Python 3.12 with a given Torch branch). Relevant only to consumers of PyTorch/JAX detail. |
5657

5758
Not every pipeline runs on every platform, and `native_packages` is a special
@@ -70,36 +71,53 @@ below.
7071

7172
## Endpoints
7273

73-
Quartz publishes one `status.json` per release build (nightly/nightly-bkc/prerelease), plus stable pointers to the
74-
most recent builds.
75-
76-
| Endpoint | Points to |
77-
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
78-
| `nightly/<date>/status.json` | A specific nightly, for example `nightly/20260707/status.json` |
79-
| `nightly/latest.json` | The most recent nightly (any result, including still in progress) |
80-
| `nightly/latest_good.json` | The most recent fully-passing nightly |
81-
| `nightly-bkc/<nightly-version>/<bkc-date>/status.json` | A specific bkc nightly, for example `nightly-bkc/10.1.0a20260825/20260831/status.json` |
82-
| `nightly-bkc/<nightly-version>/latest.json` | The most recent bkc nightly for that nightly version (any result, including still in progress) |
83-
| `nightly-bkc/<nightly-version>/latest_good.json` | The most recent fully-passing bkc nightly for that nightly version |
84-
| `nightly-bkc/latest.json` | The most recent build of the highest bkc nightly version (by version number, not build date) |
85-
| `nightly-bkc/latest_good.json` | The highest-versioned fully-passing bkc build (may trail `latest.json` when the highest nightly version is not green) |
86-
| `prerelease/<major.minor>/<full>/status.json` | A specific prerelease, for example `prerelease/7.14/7.14.0rc1/status.json` |
87-
| `prerelease/latest.json` | The highest-versioned prerelease across all release lines (by version number, not build date) |
88-
| `prerelease/<major.minor>/latest.json` | The highest-versioned prerelease in one release line, e.g. `prerelease/7.14/latest.json` |
74+
Quartz publishes one document per build variant, all sharing the same schema:
75+
`status.json` for the release build and `status_asan-debug.json` for the ASAN
76+
build. Each variant has its own `latest` / `latest_good` pointers (for example
77+
`latest.json` and `latest_asan-debug.json`) to its most recent runs, so a build
78+
of one never moves the other's.
79+
80+
Below, `<v>` stands for the variant suffix: empty for the release build,
81+
`_asan-debug` for ASAN. So `status<v>.json` is either `status.json` or
82+
`status_asan-debug.json`.
83+
84+
The ASAN build is filed under the same version and date as the release build
85+
it was cut alongside, but its `rocm_version` keeps the `.asan` / `+asan` marker
86+
its packages carry (for example `10.2.0a20261005+asan` in
87+
`nightly/20261005/status_asan-debug.json`).
88+
89+
> **Note:** ASAN documents are not produced yet. Until the ASAN `rocm_version`
90+
> scheme is settled, only `status.json` and its `latest.json` /
91+
> `latest_good.json` pointers are written; the `_asan-debug` files described
92+
> here do not exist.
93+
94+
| Endpoint | Points to |
95+
| --------------------------------------------------------- | ------------------------------------------------------------------------------- |
96+
| `nightly/<date>/status<v>.json` | A specific nightly build of that variant |
97+
| `nightly/latest<v>.json` | The most recent build of that variant (including still in progress) |
98+
| `nightly/latest_good<v>.json` | The most recent fully-passing build of that variant |
99+
| `nightly-bkc/<nightly-version>/<bkc-date>/status<v>.json` | A specific BKC nightly build of that variant |
100+
| `nightly-bkc/<nightly-version>/latest<v>.json` | The most recent BKC build of that variant for the nightly version |
101+
| `nightly-bkc/<nightly-version>/latest_good<v>.json` | The most recent fully-passing BKC build of that variant for the nightly version |
102+
| `nightly-bkc/latest<v>.json` | The most recent build of that variant for the highest BKC nightly version |
103+
| `nightly-bkc/latest_good<v>.json` | The highest-versioned fully-passing BKC build of that variant |
104+
| `prerelease/<major.minor>/<full>/status<v>.json` | A specific prerelease build of that variant |
105+
| `prerelease/latest<v>.json` | The highest-versioned prerelease of that variant across all release lines |
106+
| `prerelease/<major.minor>/latest<v>.json` | The highest-versioned prerelease of that variant in one release line |
89107

90108
Each is served as raw content. The raw URL form is:
91109

92110
```text
93111
https://raw.githubusercontent.com/ROCm/quartz/main/nightly/latest.json
94112
```
95113

96-
> **Note on the pointer files:** Every `latest.json` and `latest_good.json` pointer
97-
> is a git symlink to the dated `status.json` it currently points at. Raw GitHub
98-
> serves a symlink as its target path (a one-line body like `20260707/status.json`),
99-
> not the file it points to, so a plain fetch returns that path rather than JSON. The
100-
> Python helper `load_status` follows this pointer for you transparently; if you
101-
> fetch it yourself, resolve the returned path against the pointer URL and fetch
102-
> again.
114+
> **Note on the pointer files:** Every `latest<v>.json` and `latest_good<v>.json`
115+
> pointer is a git symlink to the concrete `status<v>.json` it currently points
116+
> at. Raw GitHub serves a symlink as its target path (a one-line body like
117+
> `20260707/status_asan-debug.json`), not the file it points to, so a plain fetch
118+
> returns that path rather than JSON. The Python helper `read_status_json.load_status()` follows
119+
> this pointer for you transparently; if you fetch it yourself, resolve the
120+
> returned path against the pointer URL and fetch again.
103121
104122
> **Note on `latest_good.json`:** "Fully passing" means the build's
105123
> `summary.overall_status` is `success` (a worst-of rollup, so this implies the
@@ -108,9 +126,10 @@ https://raw.githubusercontent.com/ROCm/quartz/main/nightly/latest.json
108126
> regresses to an in-progress or failed build. Because it points at the live
109127
> document rather than a copy of it, a build can stop being green after the
110128
> pointer was written (a re-run re-opens it, or a late leaf fails it); the pointer
111-
> is then withdrawn until some build is green again, so treat a missing
112-
> `latest_good.json` as "nothing good to offer right now". Prerelease has no
113-
> `latest_good.json` pointer yet.
129+
> then falls back to the newest build of that variant still passing, and is
130+
> dropped entirely when none is left, so treat a missing pointer as "nothing good
131+
> to offer right now". Prerelease has no `latest_good.json` pointer yet, for
132+
> any build variant.
114133
115134
> These endpoints go live as TheRock release workflows are instrumented to report
116135
> to Quartz. Until a given release type is instrumented, its files may be absent.

‎docs/status-json/status_json_reference.jsonc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
{
2222
"schema_version": "2.1",
2323
"release_type": "nightly", // "nightly" | "rc" | "dev"
24-
"rocm_version": "7.13.0a20260408",
24+
"rocm_version": "7.13.0a20260408", // the release version; an ASAN document keeps its `.asan` / `+asan` package marker (e.g. "7.13.0a20260408+asan") but is filed under the same folder as the release build
2525
"build_date": "20260408", // the date this build is filed under; for nightly-bkc it is the bkc run date from the version's `+bkc.<date>` suffix, not the nightly date the build was cut from
26-
"build_variant": "release", // (schema 2.1) build flavor: "release" | "asan" | ... ; "" when present but no signal yet (before the setup run reports); key absent entirely in pre-2.1 documents
26+
"build_variant": "release", // (schema 2.1) build flavor: "release" (status.json) | "asan-debug" (status_asan-debug.json); "" when present but no signal yet (before the setup run reports); key absent entirely in pre-2.1 documents
2727
"therock_commit": "db2fd412ed7fcadf306cdcf19f09cdd998544197", // (schema 2.1) 40-hex TheRock commit the release was built from; "" until the setup run resolves it; key absent entirely in pre-2.1 documents
2828
"trigger_workflow_run_id": 12340000, // run_id of the orchestrator (multi_arch_ci)
2929
"trigger_run_attempt": 1, // attempt of the owning orchestrator run; ownership is the (trigger_workflow_run_id, trigger_run_attempt) pair, so a GitHub re-run (same run id, higher attempt) supersedes the run before it

‎scripts/consumer/read_status_json.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ def release_type(self) -> str:
300300

301301
@property
302302
def build_variant(self) -> str | None:
303-
"""Build flavor this release was produced with: "release", or a
304-
sanitizer build such as "asan" (added in schema 2.1).
303+
"""Build flavor this release was produced with: "release", or
304+
"asan-debug" for the ASAN build (added in schema 2.1).
305305
306306
Three states, deliberately distinct: None means the key is absent -- a
307307
pre-2.1 document that predates the field, so the producer cannot tell

0 commit comments

Comments
 (0)