Repository navigation
Add trigger_repository to status.json (schema bump to 2.3, consumer bump to v1.4.0) - #138
Merged
Merged
Conversation
…n.py + schema bump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A GitHub Actions run ID alone is not enough to look up a run or fetch its
artifacts; TheRock's tools also need the repository (
--run-github-repo,which defaults to
$GITHUB_REPOSITORYorROCm/TheRock). Since #137,consumers can read the run ID of a nightly from Quartz, but they still have to
know that nightlies run in
ROCm/rockrel. This PR records the repository nextto the run ID in
status.jsonand exposes it through the consumer reader, soconsumers no longer need to hardcode it.
Closes #136
Technical Details
status.json (schema 2.2 -> 2.3):
trigger_repository(for exampleROCm/rockrel). Thesetup run and the top-level orchestrator set it together with
trigger_workflow_run_id, so a newer run replaces both and a stale runchanges neither.
upgrades a 2.2 document, the producer also fills in
trigger_repositoryfromthe incoming run. Therefore every 2.3 document carries the key.
Producer:
(
Classification.repository).classify(wr, repository)copies it from thedispatch envelope, so the status writer and future database ingest read it
from the same place.
Consumer reader (v1.4.0):
StatusDocument.trigger_repositoryreturns the recordedowner/repo. Schema2.0 - 2.2 documents do not record it; for them it returns
ROCm/rockrel,where all of those workflows ran. From 2.3 on, a missing or malformed value
raises
ValueError.--get-repoCLI option prints the repository. It takes no platform,since the repository belongs to the whole document, and it is mutually
exclusive with
--get-run-id.Docs:
nightly/latest.jsonto its datedstatus document once, reads the run ID and the repository from it, and
passes both to TheRock's tools.
Test Plan
python -m pytest scripts docsnightly/20261124/status.jsonand return run ID45293646167andrepository
ROCm/rockrel(via the pre-2.3 fallback).Test Result
NotifyQuartzWiringTestfails locally because it reads alocal TheRock checkout; it fails the same way on
mainand is unrelated tothis change.
owner from a different repository, rejection of a stale re-run, the 2.2 ->
2.3 upgrade through both leaf and owner events, and the consumer fallback
and error cases.
Submission Checklist
https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
Generated with Claude Code