Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions scripts/receive_therock/tests/therock_classify_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,29 @@ def test_test_multi_arch_linux_jax_wheels_is_jax_test_leaf(self):
self.assertEqual(derive_platform_and_pipeline(rec), ("linux", "jax", "test"))
self.assertEqual(derive_architectures(rec), ["gfx94X-dcgpu"])

def test_workflows_without_status_json_leaf_are_registered(self):
# None of these has a status.json slot yet: the XLA test and the MSI build
# are in `_SKIP_WORKFLOW_NAMES`, the MSI install test is skipped like the
# linux native install test. They still need a spec, or classification
# raises and the receive workflow fails once they report.
cases = {
"test_multi_arch_linux_xla.yml": ("linux", "xla", "test"),
"multi_arch_build_native_windows_packages.yml": (
"windows",
"native_packages",
"msi",
),
"test_native_windows_packages_install.yml": (
"windows",
"native_packages",
"test",
),
}
for wf, expected in cases.items():
with self.subTest(wf=wf):
rec = _path_record(f".github/workflows/{wf}")
self.assertEqual(derive_platform_and_pipeline(rec), expected)


def _leaf_run() -> WorkflowRunRecord:
rec = _make_record()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"_comment": "Source-of-truth snapshot of workflow filenames and their notify_quartz calls in the rock repos. Refresh with: python scripts/receive_therock/tests/therock_data/refresh_rock_workflow_inventory.py",
"_generated_at": "2026-09-07T16:08:45Z",
"_generated_at": "2026-11-11T10:16:06Z",
"repos": {
"ROCm/TheRock": [
"build_portable_linux_python_packages.yml",
"build_windows_python_packages.yml",
"bump_submodules.yml",
"codeql.yml",
"cherry-pick-to-release.yml",
"compiler_bump.yml",
"copy_release.yml",
"gitleaks.yml",
"gitleaks_main.yml",
"hip_tagging_automation.yml",
"manifest-diff.yml",
"multi_arch_build_linux_jax_wheels.yml",
"multi_arch_build_linux_jax_wheels_ci.yml",
"multi_arch_build_native_linux_packages.yml",
"multi_arch_build_native_windows_packages.yml",
"multi_arch_build_portable_linux.yml",
"multi_arch_build_portable_linux_artifacts.yml",
"multi_arch_build_portable_linux_pytorch_wheels.yml",
Expand All @@ -37,29 +37,33 @@
"multi_arch_release_windows.yml",
"multi_arch_release_windows_pytorch_wheels.yml",
"pre-commit.yml",
"pre_commit_security.yml",
"publish_build_manylinux_x86_64.yml",
"publish_dockerfile.yml",
"publish_no_rocm_image_ubi10.yml",
"publish_no_rocm_image_ubuntu24_04.yml",
"publish_no_rocm_image_ubuntu24_04_ocl_rt.yml",
"publish_no_rocm_image_ubuntu24_04_rocgdb.yml",
"rccl_coco.yml",
"security_scan_pr.yml",
"security_scan_weekly.yml",
"setup_multi_arch.yml",
"test_artifacts.yml",
"test_artifacts_structure.yml",
"test_code_coverage_component.yml",
"test_component.yml",
"test_consumer_graph_drift.yml",
"test_jax_dockerfile.yml",
"test_linux_jax_wheels.yml",
"test_multi_arch_linux_jax_wheels.yml",
"test_multi_arch_linux_xla.yml",
"test_native_linux_packages_install.yml",
"test_native_windows_packages_install.yml",
"test_pytorch_wheels.yml",
"test_pytorch_wheels_full.yml",
"test_rocm_wheels.yml",
"therock-pr-bot.yml",
"unit_tests.yml"
],
"ROCm/rockrel": [
"mirror_python_dependencies.yml",
"multi_arch_release.yml",
"multi_arch_release_asan.yml",
"multi_arch_release_linux_jax_wheels.yml",
Expand All @@ -69,8 +73,11 @@
"multi_arch_repackage_linux.yml",
"multi_arch_repackage_windows.yml",
"pre-commit.yml",
"security-scan-pr.yml",
"security-scan-weekly.yml",
"test_artifacts.yml",
"test_native_linux_packages_install.yml",
"test_native_windows_packages_install.yml",
"test_pytorch_wheels_full.yml",
"unit_tests.yml"
]
Expand Down Expand Up @@ -131,6 +138,13 @@
}
],
"multi_arch_build_native_linux_packages.yml": [
{
"run_phase": "started",
"reporting_workflow": "multi_arch_build_native_linux_packages.yml",
"workflow_inputs": "${{ toJSON(inputs) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
},
{
"run_phase": "started",
"reporting_workflow": "multi_arch_build_native_linux_packages.yml",
Expand All @@ -146,6 +160,14 @@
"workflow_step_outputs": "${{ toJSON(steps) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
},
{
"run_phase": "completed",
"reporting_workflow": "multi_arch_build_native_linux_packages.yml",
"workflow_inputs": "${{ toJSON(inputs) }}",
"workflow_captured_outputs": "${{ toJSON(needs) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
}
],
"multi_arch_build_portable_linux.yml": [
Expand Down Expand Up @@ -461,6 +483,24 @@
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
}
],
"test_multi_arch_linux_xla.yml": [
{
"run_phase": "started",
"reporting_workflow": "test_multi_arch_linux_xla.yml",
"workflow_inputs": "${{ toJSON(inputs) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
},
{
"run_phase": "completed",
"run_conclusion": "${{ job.status }}",
"reporting_workflow": "test_multi_arch_linux_xla.yml",
"workflow_inputs": "${{ toJSON(inputs) }}",
"workflow_step_outputs": "${{ toJSON(steps) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
}
],
"test_native_linux_packages_install.yml": [
{
"run_phase": "started",
Expand Down Expand Up @@ -617,6 +657,23 @@
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
}
],
"test_native_windows_packages_install.yml": [
{
"run_phase": "started",
"reporting_workflow": "test_native_windows_packages_install.yml",
"workflow_inputs": "${{ toJSON(inputs) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
},
{
"run_phase": "completed",
"reporting_workflow": "test_native_windows_packages_install.yml",
"workflow_inputs": "${{ toJSON(inputs) }}",
"workflow_captured_outputs": "${{ toJSON(needs) }}",
"gh_app_client_id": "${{ secrets.GH_APP_HAULY_CID }}",
"gh_app_private_key": "${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}"
}
],
"test_pytorch_wheels_full.yml": [
{
"run_phase": "started",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,21 @@ def test_version_less_in_progress_test_event_does_not_crash(tmp_path: Path) -> N
assert out == _nightly_status_path(tmp_path)


def test_native_install_test_event_is_skipped(tmp_path: Path) -> None:
@pytest.mark.parametrize(
("workflow", "platform"),
[
("test_native_linux_packages_install.yml", "linux"),
("test_native_windows_packages_install.yml", "windows"),
],
)
def test_native_install_test_event_is_skipped(
tmp_path: Path, workflow: str, platform: str
) -> None:
# Native install tests are async sanity checks with no per-arch payload and
# no native_packages test slot; they must be skipped, not raise.
native_test = _run(
path=".github/workflows/test_native_linux_packages_install.yml",
platform="linux",
path=f".github/workflows/{workflow}",
platform=platform,
pipeline_type="native_packages",
pipeline_phase="test",
architectures=[],
Expand Down Expand Up @@ -4036,6 +4045,44 @@ def test_skip_workflow_names_are_all_disregarded(tmp_path: Path) -> None:
assert not any(tmp_path.rglob("status.json"))


@pytest.mark.parametrize(
("workflow", "platform", "pipeline_type", "pipeline_phase"),
[
("test_multi_arch_linux_xla.yml", "linux", "xla", "test"),
(
"multi_arch_build_native_windows_packages.yml",
"windows",
"native_packages",
"msi",
),
],
)
def test_completion_without_status_json_slot_leaves_document_unchanged(
tmp_path: Path,
workflow: str,
platform: str,
pipeline_type: str,
pipeline_phase: str,
) -> None:
# These classify to a slot status.json does not have (`xla`,
# `native_packages.msi`). A tracked run reaching an existing, owned document
# must be skipped before `upsert_leaf` (which would fail on the missing slot)
# and must leave the document unchanged.
_establish_owner(tmp_path)
status_path = _nightly_status_path(tmp_path)
before = status_path.read_text(encoding="utf-8")
run = _run(
path=f".github/workflows/{workflow}",
platform=platform,
pipeline_type=pipeline_type,
pipeline_phase=pipeline_phase,
architectures=["gfx950"],
)
out = tusj.update_status_json(_event(run), repo_dir=tmp_path, commit_and_push=False)
assert out is None
assert status_path.read_text(encoding="utf-8") == before


def _test_component_run(
*,
job_name: str,
Expand Down
64 changes: 45 additions & 19 deletions scripts/receive_therock/tests/therock_workflow_registry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@
)

_ALLOWED_PIPELINE_TYPES = frozenset(
{"rocm", "pytorch", "jax", "native_packages", "setup", "orchestrator"}
{
"rocm",
"pytorch",
"jax",
"xla",
"native_packages",
"setup",
"orchestrator",
}
)

# Workflows (across all repos) that deliberately do NOT report to Quartz:
Expand All @@ -51,16 +59,17 @@
_EXCLUDED_WORKFLOWS = frozenset(
{
# Security scanners (upstream).
"codeql.yml",
"gitleaks.yml",
"gitleaks_main.yml",
"pre-commit.yml",
"pre_commit_security.yml",
"security-scan-pr.yml",
"security-scan-weekly.yml",
# Internal plumbing / automation (upstream).
"bump_submodules.yml",
"cherry-pick-to-release.yml",
"compiler_bump.yml",
"copy_release.yml",
"hip_tagging_automation.yml",
"manifest-diff.yml",
"mirror_python_dependencies.yml",
"receive_therock_data.yml",
"therock-pr-bot.yml",
"unit_tests.yml",
Expand All @@ -80,12 +89,12 @@
"publish_no_rocm_image_ubuntu24_04_ocl_rt.yml",
"publish_no_rocm_image_ubuntu24_04_rocgdb.yml",
# Upstream test scaffolding (not Quartz-reported).
"rccl_coco.yml",
"test_artifacts_structure.yml",
"test_code_coverage_component.yml",
"test_consumer_graph_drift.yml",
"test_jax_dockerfile.yml",
# CI-only wheel tests not reached by the multi-arch release pipeline;
# they emit no notify_quartz, so nothing reaches the receiver.
"test_linux_jax_wheels.yml",
"test_rocm_wheels.yml",
# Quartz's own local plumbing (not a rock producer workflow).
"bender.yml",
Expand All @@ -97,20 +106,36 @@
)


# Registered workflows whose upstream notify_quartz wiring is not (yet) in place.
# Registered workflows whose upstream notify_quartz wiring is not (yet) in place,
# keyed by repo: the same filename can be wired in one repo and not the other.
# The wiring check skips these so the suite can gate PRs while the gap stays
# documented here rather than silently passing. Drop an entry once upstream lands
# its notify_quartz call.
_UNWIRED_UPSTREAM = frozenset(
{
# Fan-out release orchestrators: they only dispatch reporting
# sub-workflows and emit no notify_quartz of their own.
"multi_arch_release_asan.yml",
"multi_arch_repackage.yml",
"multi_arch_repackage_linux.yml",
"multi_arch_repackage_windows.yml",
}
)
_UNWIRED_UPSTREAM: dict[str, frozenset[str]] = {
"ROCm/TheRock": frozenset(
{
# Fan-out release orchestrator: it only dispatches reporting
# sub-workflows and emits no notify_quartz of its own.
"multi_arch_release_asan.yml",
# Reusable workflow called by rockrel's wrapper of the same name;
# only the rockrel wrapper self-reports.
"test_native_windows_packages_install.yml",
# Release MSI build (multi_arch_release_windows.yml
# `build_native_msi_packages`); emits no notify_quartz yet.
"multi_arch_build_native_windows_packages.yml",
}
),
"ROCm/rockrel": frozenset(
{
# Fan-out release orchestrators: they only dispatch reporting
# sub-workflows and emit no notify_quartz of their own.
"multi_arch_release_asan.yml",
"multi_arch_repackage.yml",
"multi_arch_repackage_linux.yml",
"multi_arch_repackage_windows.yml",
}
),
}


def _load_doc() -> dict:
Expand Down Expand Up @@ -173,8 +198,9 @@ def _notify_quartz_offenders(
filename.
"""
registered = _registered_keys()
unwired = _UNWIRED_UPSTREAM.get(label, frozenset())
problems: list[str] = []
for filename in sorted((set(inventory) & registered) - _UNWIRED_UPSTREAM):
for filename in sorted((set(inventory) & registered) - unwired):
calls = calls_by_workflow.get(filename, [])
phases = sorted(c.get("run_phase", "") for c in calls)
if phases != ["completed", "started"]:
Expand Down
Loading
Loading