]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
releng: refactor audit workflow routing and decouple state management 70144/head
authorPatrick Donnelly <pdonnell@ibm.com>
Sun, 12 Jul 2026 18:54:28 +0000 (14:54 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 13 Jul 2026 17:17:25 +0000 (13:17 -0400)
commit6e5a1af9d87f3a96a6460ef8d0837511aafe3a84
treea400d9106500b98d86f0f60c622c506ba2790c6f
parent0156ce1be2ae581700fbc56e4c4bb0e601d1b342
releng: refactor audit workflow routing and decouple state management

Previously, workflow routing and PR state management were split between
the GitHub Actions workflow and the underlying PTL script, leading to
stale branch protection states, API pagination bugs, and blocked merges
during manual overrides.

This refactors the workflow into a centralized state machine and decouples
status reporting from the audit tool:

* Decouple State Management: Remove `--audit-label` from `ptl-tool.py` and
  move all commit status and label transitions (`releng-audit-pass`,
  `releng-audit-fail`) into a dedicated workflow reporter step.
* Non-Blocking Review Comments: Update `ptl-tool.py` in CI mode to post
  audit findings as `COMMENT` events rather than `REQUEST_CHANGES`,
  preventing stale review states from blocking PRs after an override.
* Add Step Summaries: Implement `write_ci_summary()` in `ptl-tool.py` to
  output rich Markdown diagnostic reports directly to `GITHUB_STEP_SUMMARY`.
* Atomic Override Handling: Add `setOverrideStatus()` and `executeOverride()`
  to push an immediate `success` commit status when `/audit override` or the
  override label is applied, unblocking required branch protection checks.
* Safe SHA & Label Lookup: Replace the unpaginated Bash `curl` request with
  a reusable `getPrSha()` helper and evaluate overrides directly within the
  JavaScript router.
* Handle Cancellations Safely: Map `cancelled` workflow outcomes to an
  `error` commit status rather than defaulting to `failure`.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
.github/workflows/releng-audit.yaml
src/script/ptl-tool.py