Skip to content

feat(quartz): notify_quartz reusable workflow + dispatcher#75

Closed
cgoea wants to merge 1 commit into
mainfrom
users/cgoea/notify_quartz
Closed

feat(quartz): notify_quartz reusable workflow + dispatcher#75
cgoea wants to merge 1 commit into
mainfrom
users/cgoea/notify_quartz

Conversation

@cgoea

@cgoea cgoea commented Jul 15, 2026

Copy link
Copy Markdown

Cherry-pick of ROCm/TheRock@60c2a4f

Summary

First step of porting the Quartz CI-reporting scripts from ROCm/Quartz-Tester
into TheRock. This adds the self-report bridge that lets a TheRock workflow
push its run status to Quartz for ingestion.

  • .github/workflows/notify_quartz.yml (new): reusable workflow_call
    workflow. Mints a Quartz Hauly GitHub App token and invokes the dispatcher.
    continue-on-error: true so reporting never fails the calling workflow.
  • build_tools/github_actions/notify_quartz.py (new): stdlib-only
    dispatcher. Builds a payload for the current run (resolved via
    GITHUB_RUN_ID + the Actions API) and dispatches it to a Quartz ingest
    workflow via workflow_dispatch, at run start (run_phase=started) and
    end (run_phase=completed). Derives the run conclusion from a
    toJSON(needs) blob when no explicit conclusion is passed, and strips the
    inline jobs array (setting fetch_jobs) when the payload would exceed
    GitHub's 65,535-char dispatch-inputs cap. Targets ROCm/Quartz by default
    (override with --quartz-repo / QUARTZ_REPO).
  • build_tools/github_actions/tests/notify_quartz_test.py (new): stdlib
    unittest coverage for the dispatcher's pure logic: reporting-path
    normalization (_normalize_reporting_path) and payload path overrides
    (_build_payload). Runs standalone, no network or GitHub API needed.

Copied from Quartz-Tester main except the pinned action SHAs, which were
bumped to match TheRock's current pins (actions/checkout v6.0.3,
actions/create-github-app-token v3.2.0), and the default ingest target,
which was switched from ROCm/Quartz-Tester to ROCm/Quartz.

References

Notes

  • These files are standalone; they only become active once
    notify_quartz jobs are actually added to the workflows (a follow-up).
  • Requires repo secrets GH_APP_HAULY_ID / GH_APP_HAULY_PRIVATE_KEY
    (Quartz Hauly GitHub App), already installed in TheRock.

Co-authored-by: Laura Promberger Laura.Promberger@amd.com

@cgoea
cgoea requested a review from HereThereBeDragons July 15, 2026 09:45
# Summary

First step of porting the Quartz CI-reporting scripts from
ROCm/Quartz-Tester
into TheRock. This adds the self-report bridge that lets a TheRock
workflow
push its run status to Quartz for ingestion.

- **`.github/workflows/notify_quartz.yml`** (new): reusable
`workflow_call`
workflow. Mints a Quartz Hauly GitHub App token and invokes the
dispatcher.
`continue-on-error: true` so reporting never fails the calling workflow.
- **`build_tools/github_actions/notify_quartz.py`** (new): stdlib-only
  dispatcher. Builds a payload for the current run (resolved via
`GITHUB_RUN_ID` + the Actions API) and dispatches it to a Quartz ingest
workflow via `workflow_dispatch`, at run start (`run_phase=started`) and
  end (`run_phase=completed`). Derives the run conclusion from a
`toJSON(needs)` blob when no explicit conclusion is passed, and strips
the
inline `jobs` array (setting `fetch_jobs`) when the payload would exceed
GitHub's 65,535-char dispatch-inputs cap. Targets `ROCm/Quartz` by
default
  (override with `--quartz-repo` / `QUARTZ_REPO`).
- **`build_tools/github_actions/tests/notify_quartz_test.py`** (new):
stdlib
  `unittest` coverage for the dispatcher's pure logic: reporting-path
  normalization (`_normalize_reporting_path`) and payload path overrides
  (`_build_payload`). Runs standalone, no network or GitHub API needed.

Copied from Quartz-Tester `main` except the pinned action SHAs, which
were
bumped to match TheRock's current pins (`actions/checkout` v6.0.3,
`actions/create-github-app-token` v3.2.0), and the default ingest
target,
which was switched from ROCm/Quartz-Tester to ROCm/Quartz.

## References
- ROCm/Quartz#17
- RFC:
[RFC0011-Quartz-CICD-Datahub.md](https://github.com/ROCm/TheRock/blob/main/docs/rfcs/RFC0011-Quartz-CICD-Datahub.md),
  background on what Quartz is and why we report CI/CD data to it.
- [Quartz Implementation
Plan](https://github.com/orgs/ROCm/projects/156), the issue tracker.
Note: it's not fully up to
  date. 

## Notes

- These files are **standalone**; they only become active once
`notify_quartz` jobs are actually added to the workflows (a follow-up).
- Requires repo secrets `GH_APP_HAULY_ID` / `GH_APP_HAULY_PRIVATE_KEY`
  (Quartz Hauly GitHub App), already installed in TheRock.

---------

Co-authored-by: Ciprian Goea <ciprian.goea@amd.com>
@HereThereBeDragons
HereThereBeDragons force-pushed the users/cgoea/notify_quartz branch from b08c4b0 to 7497277 Compare July 16, 2026 10:07
@HereThereBeDragons

Copy link
Copy Markdown
Contributor

just a plain cherry pick of ROCm/TheRock@60c2a4f

):
return _build_payload(
token="t",
repo="ROCm/rockrel",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this have been ROCm/TheRock in our TheRock repository? Here rockrel is fine for sure, just noticed as you said it is a 1:1 port.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this is a copy and also duplicates notify_quartz.py as well as the test, why don't we call into ROCm/TheRock/.github/workflows/notify_quartz.yml@main instead of duplicating?

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.

right let me rework. might have been too naive to just cherry pick it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, please re-request a review once you have it. Should be a quite little PR in the end.

@HereThereBeDragons

Copy link
Copy Markdown
Contributor

closing. will reuse the notify_quartz code from therock

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.

3 participants