Repository navigation
feat: enable asan build in quartz #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
b012ca9
e9baa7e
30e8226
6930ff8
a85b769
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,16 +43,17 @@ For example, to know if ROCm built successfully, check | |||||
| The tree uses a handful of terms that recur throughout this guide and map | ||||||
| directly to keys in the document: | ||||||
|
|
||||||
| | Term | Meaning | | ||||||
| | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||||||
| | **TheRock** | The build system that produces ROCm releases. Its CI is what Quartz reports on. | | ||||||
| | **nightly** | An automatic build produced once a day. | | ||||||
| | **nightly-bkc** | A nightly build, cut from a `release/bkc/...` branch | | ||||||
| | **prerelease** (`rc`) | A release candidate build for an upcoming ROCm release. | | ||||||
| | **architecture** | A GPU target, for example `gfx942` or `gfx1201` (the same identifiers ROCm uses). | | ||||||
| | **pipeline** | One product built from a release: `rocm` (the ROCm stack itself), `pytorch`, `jax`, and `native_packages`. A release can produce several. | | ||||||
| | **phase** | A stage of a pipeline: `build` and `test`. For `native_packages`, `rpm` or `deb` instead. | | ||||||
| | **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. | | ||||||
| | Term | Meaning | | ||||||
| | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||
| | **TheRock** | The build system that produces ROCm releases. Its CI is what Quartz reports on. | | ||||||
| | **nightly** | An automatic build produced once a day. | | ||||||
| | **nightly-bkc** | A nightly build, cut from a `release/bkc/...` branch | | ||||||
| | **prerelease** (`rc`) | A release candidate build for an upcoming ROCm release. | | ||||||
| | **architecture** | A GPU target, for example `gfx942` or `gfx1201` (the same identifiers ROCm uses). | | ||||||
| | **pipeline** | One product built from a release: `rocm` (the ROCm stack itself), `pytorch`, `jax`, and `native_packages`. A release can produce several. | | ||||||
| | **phase** | A stage of a pipeline: `build` and `test`. For `native_packages`, `rpm` or `deb` instead. | | ||||||
| | **build variant** | The release flavor, such as `release`, `asan`, or `asan-debug`. It selects the document: `status.json` for `release`, `status-asan.json` for either ASAN flavor. | | ||||||
| | **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. | | ||||||
|
|
||||||
| Not every pipeline runs on every platform, and `native_packages` is a special | ||||||
| case with no `build` / `test` phases: | ||||||
|
|
@@ -70,36 +71,50 @@ below. | |||||
|
|
||||||
| ## Endpoints | ||||||
|
|
||||||
| Quartz publishes one `status.json` per release build (nightly/nightly-bkc/prerelease), plus stable pointers to the | ||||||
| most recent builds. | ||||||
|
|
||||||
| | Endpoint | Points to | | ||||||
| | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | | ||||||
| | `nightly/<date>/status.json` | A specific nightly, for example `nightly/20260707/status.json` | | ||||||
| | `nightly/latest.json` | The most recent nightly (any result, including still in progress) | | ||||||
| | `nightly/latest_good.json` | The most recent fully-passing nightly | | ||||||
| | `nightly-bkc/<nightly-version>/<bkc-date>/status.json` | A specific bkc nightly, for example `nightly-bkc/10.1.0a20260825/20260831/status.json` | | ||||||
| | `nightly-bkc/<nightly-version>/latest.json` | The most recent bkc nightly for that nightly version (any result, including still in progress) | | ||||||
| | `nightly-bkc/<nightly-version>/latest_good.json` | The most recent fully-passing bkc nightly for that nightly version | | ||||||
| | `nightly-bkc/latest.json` | The most recent build of the highest bkc nightly version (by version number, not build date) | | ||||||
| | `nightly-bkc/latest_good.json` | The highest-versioned fully-passing bkc build (may trail `latest.json` when the highest nightly version is not green) | | ||||||
| | `prerelease/<major.minor>/<full>/status.json` | A specific prerelease, for example `prerelease/7.14/7.14.0rc1/status.json` | | ||||||
| | `prerelease/latest.json` | The highest-versioned prerelease across all release lines (by version number, not build date) | | ||||||
| | `prerelease/<major.minor>/latest.json` | The highest-versioned prerelease in one release line, e.g. `prerelease/7.14/latest.json` | | ||||||
| Quartz publishes one document per build-variant family, all sharing the same | ||||||
| schema. The normal release build gets the unsuffixed `status.json`; ASAN builds | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right now we only publish status.json and status-asan.json. not all buildvaraints
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, but ok, making it fit the current behaviour. |
||||||
| get `status-asan.json`. The suffix follows TheRock's own `build_variant_suffix`, | ||||||
| which folds the debug flavor onto its base family, so both `asan` and | ||||||
| `asan-debug` publish to `status-asan.json` and the document's `build_variant` | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as said before we probably want to limit this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
| field says which flavor produced it. Each family carries its own stable pointers, | ||||||
| so consumers can follow one without a build of the other ever moving it. | ||||||
|
|
||||||
| Below, `<v>` stands for that suffix: empty for the release build, `-asan` for the | ||||||
| ASAN family. So `status<v>.json` is either `status.json` or `status-asan.json`. | ||||||
|
|
||||||
| | Endpoint | Points to | | ||||||
| | --------------------------------------------------------- | ------------------------------------------------------------------------------- | | ||||||
| | `nightly/<date>/status<v>.json` | A specific nightly build of that variant | | ||||||
| | `nightly/latest<v>.json` | The most recent build of that variant (including still in progress) | | ||||||
| | `nightly/latest_good<v>.json` | The most recent fully-passing build of that variant | | ||||||
| | `nightly-bkc/<nightly-version>/<bkc-date>/status<v>.json` | A specific BKC nightly build of that variant | | ||||||
| | `nightly-bkc/<nightly-version>/latest<v>.json` | The most recent BKC build of that variant for the nightly version | | ||||||
| | `nightly-bkc/<nightly-version>/latest_good<v>.json` | The most recent fully-passing BKC build of that variant for the nightly version | | ||||||
| | `nightly-bkc/latest<v>.json` | The most recent build of that variant for the highest BKC nightly version | | ||||||
| | `nightly-bkc/latest_good<v>.json` | The highest-versioned fully-passing BKC build of that variant | | ||||||
| | `prerelease/<major.minor>/<full>/status<v>.json` | A specific prerelease build of that variant | | ||||||
| | `prerelease/latest<v>.json` | The highest-versioned prerelease of that variant across all release lines | | ||||||
| | `prerelease/<major.minor>/latest<v>.json` | The highest-versioned prerelease of that variant in one release line | | ||||||
|
|
||||||
| > **The sanitizer endpoints are not published yet.** TheRock's | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove that part. adding therock/rockrel to release it will be quick |
||||||
| > `multi_arch_release_asan.yml` does not report to Quartz, so an `asan` or | ||||||
| > `asan-debug` document written today could never be finalized. Quartz routes and | ||||||
| > tests these files but withholds them until that orchestrator is instrumented; | ||||||
| > expect them to be absent until then. | ||||||
|
|
||||||
| Each is served as raw content. The raw URL form is: | ||||||
|
|
||||||
| ```text | ||||||
| https://raw.githubusercontent.com/ROCm/quartz/main/nightly/latest.json | ||||||
| ``` | ||||||
|
|
||||||
| > **Note on the pointer files:** Every `latest.json` and `latest_good.json` pointer | ||||||
| > is a git symlink to the dated `status.json` it currently points at. Raw GitHub | ||||||
| > serves a symlink as its target path (a one-line body like `20260707/status.json`), | ||||||
| > not the file it points to, so a plain fetch returns that path rather than JSON. The | ||||||
| > Python helper `load_status` follows this pointer for you transparently; if you | ||||||
| > fetch it yourself, resolve the returned path against the pointer URL and fetch | ||||||
| > again. | ||||||
| > **Note on the pointer files:** Every `latest*.json` and `latest_good*.json` | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
| > pointer is a git symlink to the concrete `status*.json` it currently points | ||||||
| > at. Raw GitHub serves a symlink as its target path (a one-line body like | ||||||
| > `20260707/status-asan.json`), not the file it points to, so a plain fetch | ||||||
| > returns that path rather than JSON. The Python helper `load_status` follows | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
is this better?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. naming wise, I'll always take your solutions :) |
||||||
| > this pointer for you transparently; if you fetch it yourself, resolve the | ||||||
| > returned path against the pointer URL and fetch again. | ||||||
|
|
||||||
| > **Note on `latest_good.json`:** "Fully passing" means the build's | ||||||
| > `summary.overall_status` is `success` (a worst-of rollup, so this implies the | ||||||
|
|
@@ -108,9 +123,10 @@ https://raw.githubusercontent.com/ROCm/quartz/main/nightly/latest.json | |||||
| > regresses to an in-progress or failed build. Because it points at the live | ||||||
| > document rather than a copy of it, a build can stop being green after the | ||||||
| > pointer was written (a re-run re-opens it, or a late leaf fails it); the pointer | ||||||
| > is then withdrawn until some build is green again, so treat a missing | ||||||
| > `latest_good.json` as "nothing good to offer right now". Prerelease has no | ||||||
| > `latest_good.json` pointer yet. | ||||||
| > then falls back to the newest build of that variant still passing, and is | ||||||
| > dropped entirely when none is left, so treat a missing pointer as "nothing good | ||||||
| > to offer right now". Prerelease has no `latest_good.json` pointer yet, for | ||||||
| > either build flavor. | ||||||
|
|
||||||
| > These endpoints go live as TheRock release workflows are instrumented to report | ||||||
| > to Quartz. Until a given release type is instrumented, its files may be absent. | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // Reference layout for status.json v2. | ||
| // Reference layout for status.json and status-asan.json v2. | ||
| // NOTE: This file is a human-readable spec and contains `//` comments. The | ||
| // real status.json emitted by Quartz is strict JSON with comments stripped. | ||
| // | ||
|
|
@@ -23,7 +23,7 @@ | |
| "release_type": "nightly", // "nightly" | "rc" | "dev" | ||
| "rocm_version": "7.13.0a20260408", | ||
| "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 | ||
| "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 | ||
| "build_variant": "release", // (schema 2.1) build flavor: "release" | "asan" | "asan-debug" | ... ; in status-asan.json this is the one field distinguishing the ASAN flavors; "" when present but no signal yet (before the setup run reports); key absent entirely in pre-2.1 documents | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets remove asan-debug here |
||
| "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 | ||
| "trigger_workflow_run_id": 12340000, // run_id of the orchestrator (multi_arch_ci) | ||
| "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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
| from therock_classify import ( | ||
| classify, | ||
| derive_architectures, | ||
| derive_build_variant, | ||
| derive_deb_urls, | ||
| derive_effective_owner_run_id, | ||
| derive_platform_and_pipeline, | ||
|
|
@@ -763,6 +764,11 @@ def test_top_level_orchestrator_is_self(self): | |
| run.workflow_run_id = 29079513704 | ||
| self.assertEqual(derive_effective_owner_run_id(run), 29079513704) | ||
|
|
||
| def test_top_level_asan_orchestrator_is_self(self): | ||
| run = _orchestrator_run(".github/workflows/multi_arch_release_asan.yml") | ||
| run.workflow_run_id = 29079513705 | ||
| self.assertEqual(derive_effective_owner_run_id(run), 29079513705) | ||
|
|
||
| def test_descendant_uses_quartz_tracking_id(self): | ||
| # Every triggered workflow carries the top-level owner in the propagated | ||
| # id, regardless of its immediate GitHub parent. | ||
|
|
@@ -799,6 +805,29 @@ def test_empty_quartz_tracking_id_returns_none(self): | |
| self.assertIsNone(derive_effective_owner_run_id(run)) | ||
|
|
||
|
|
||
| class DeriveBuildVariantTest(unittest.TestCase): | ||
| def test_direct_input_wins_over_tracking_id(self): | ||
| run = _leaf_run() | ||
| run.inputs = { | ||
| "build_variant": "asan-debug", | ||
| "quartz_tracking_id": "123;nightly;asan", | ||
| } | ||
| self.assertEqual(derive_build_variant(run), "asan-debug") | ||
|
|
||
| def test_tracking_id_supplies_descendant_variant(self): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets also test too many elements or too little in the tracking id |
||
| run = _leaf_run() | ||
| run.inputs = {"quartz_tracking_id": "123;nightly;asan"} | ||
| self.assertEqual(derive_build_variant(run), "asan") | ||
|
|
||
| def test_asan_orchestrator_carries_no_variant_of_its_own(self): | ||
| # multi_arch_release_asan.yml takes no `build_variant` input and does not | ||
| # carry the tracking id it generates. Guessing a flavor here would stamp | ||
| # the document wrong (it dispatches "asan-debug", not "asan"), so the | ||
| # variant stays empty and the setup run supplies it. | ||
| run = _orchestrator_run(".github/workflows/multi_arch_release_asan.yml") | ||
| self.assertEqual(derive_build_variant(run), "") | ||
|
|
||
|
|
||
| class ClassifyOwnerNormalizationOrderingTest(unittest.TestCase): | ||
| """`classify()` must normalize the owner AFTER deriving source_run_id. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove asan-debug. we dont have this yet in therock. let also just say that "asan" goes in status-asan.json. maybe have status.json for release and anything else is
status-<buildvariant>.jsonThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thought it's good to have for the future. now it's status.json for release and status-<build_variant>.json for anything else.