Skip to content

fix: record rocm test results for prerelease and nightly-bkc in status.json, drop legacy release-nightly/ routing - #131

Merged
HereThereBeDragons merged 2 commits into
developfrom
users/lpromber/fix_test_rocm_registration
Nov 4, 2026
Merged

HereThereBeDragons merged 2 commits into
developfrom
users/lpromber/fix_test_rocm_registration

Conversation

@HereThereBeDragons

Copy link
Copy Markdown
Collaborator

Fixes #130.

Summary

Prerelease and nightly-bkc status.json documents did not record any rocm artifact test results, even though the tests ran and notified Quartz. test_artifacts.yml is dispatched without a version input, so its events carry no release_version. The updater could only route such events for nightly, where it fell back to the run date (created_at). For prerelease and nightly-bkc, the routing raised ValueError: Cannot extract suffix from release_version '' and the receive job failed.

We now route every event that does not own a document to an existing one, and use the quartz_tracking_id owner for events without a version. While touching this path, we also fixed how build_date is stamped and removed the expired release-nightly/ routing workaround.

Changes

1. Routing of non-owner events (the fix for #130)

Only the owner events (setup run, top-level orchestrator) create a status document; they keep routing by version. Every other event now only updates an existing document:

  • With a release_version, the path follows from the version as before. If the document does not exist yet, the event is skipped instead of creating an ownerless document.
  • Without a release_version, the document is found through the owner run id from quartz_tracking_id (normalized into trigger_workflow_run_id by classify()). The lookup scans the release type's folder for the document whose trigger_workflow_run_id matches (about 90 small files on main today).

In both cases _gate_to_document_owner still rejects events that belong to a different run. The previous nightly fallback to created_at is removed: it routed a test that started after UTC midnight into the next day's folder.

_status_json_path now takes the release_version instead of the whole workflow run and raises explicitly on an empty version.

2. build_date is stamped by the owner only

Previously every event overwrote build_date with its own created_at date (except nightly-bkc, which took it from the version). A test finishing after midnight therefore moved the document's build_date to the next day. build_date is now set only in _apply_build_metadata, i.e. by the owner events, as the date the owning top-level orchestrator was created. A newer run taking over the document restamps it; a re-run attempt keeps it, since GitHub keeps created_at across attempts. This applies uniformly to all release types, which removes the bkc special case. For nightly-bkc the value is unchanged in practice, since the bkc date is the date the bkc run started.

3. Removal of the release-nightly/ routing workaround

The temporary bridge from the #93 folder rename (_nightly_root, planned for removal after 2026-09-11) is removed. The existing release-nightly/ data on main and its scanner excludes are untouched.

Testing

  • New tests for version-less prerelease and nightly-bkc test_artifacts events (Prerelease/nighlty-bkc status.json does not report on rocm artifact test results #130), a nightly test starting after UTC midnight, a leaf never creating a document, a version-less leaf whose owner has no document, an empty version in _status_json_path, and build_date staying on the owner's date for nightly-bkc.
  • Existing fixtures reused one owner run id across several documents (rc1/rc2, several bkc and nightly dates), which real releases never do. Each document now has its own owner run, and tests that sent leaves before any owner existed now establish one first.
  • pytest scripts docs: 646 passed. pre-commit clean.

Follow-ups

  • Removing the release-nightly/ data folder and its excludes in trivy.yml, bandit.yml and pre_commit.yml.

🤖 Generated with Claude Code

…s.json, drop legacy release-nightly/ routing
@HereThereBeDragons
HereThereBeDragons requested review from a team and cgoea October 30, 2026 21:08
repo_dir, release_type, c.release_version or "", build_variant
)
else:
leaf_path = _leaf_status_path(

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.

small race: _leaf_status_path() runs on the checkout from before _sync_to_upstream(). if the owner (setup) push lands after this receiver checked out main, the lookup finds no document and we return here without entering the fetch/retry loop, so a version-less event is dropped permanently.

Don't think will happen in practice, since test_artifacts starts long after setup is published but better have it covered.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

thanks for catching this! would have been a difficult surprise to catch live

@cgoea cgoea 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.

just one small comment, apart from that looks good. approving cause it's just a small change.

@HereThereBeDragons
HereThereBeDragons merged commit 33b1aa9 into develop Nov 4, 2026
14 checks passed
@HereThereBeDragons
HereThereBeDragons deleted the users/lpromber/fix_test_rocm_registration branch November 4, 2026 21:19
quartz-sync-github-app Bot pushed a commit that referenced this pull request Nov 4, 2026
33b1aa9, fix: record rocm test results for prerelease and nightly-bkc in status.json, drop legacy release-nightly/ routing (#131), Laura Promberger (laura.promberger@amd.com), Wed Nov 4 22:19:15 2026 +0100
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.

2 participants