]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
script/ptl-tool, actions: introduce event-driven CI backport auditing
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 4 May 2026 22:12:26 +0000 (15:12 -0700)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 11 May 2026 12:23:25 +0000 (08:23 -0400)
commit489f70e8dff54ce8bb9a3fc705789715efc47b4d
tree44b4862def4247d2343b2239f24885e3aa52d3ec
parent922f0c62f5e3cb7a45c0fd1130389da78dbb712f
script/ptl-tool, actions: introduce event-driven CI backport auditing

This commit entirely restructures the `ptl-tool.py` script and introduces a new GitHub Actions workflow to enable event-driven, asynchronous execution of backport audits.

New GitHub Actions Workflow (`releng-audit.yaml`):
* Implements a state-machine workflow using the `pull_request_target` event for secure execution.
* Introduces an "anti-spam" push shield that halts automated checks and blocks merging if the PR already has a `releng-audit-fail` label.
* Allows developers to easily re-trigger audits by removing the failure label or commenting `/audit retest`.
* Provides an `/audit override` mechanism exclusively for the `ceph-release-manager` team to bypass checks on valid conflict resolutions.

Key Architectural Changes to `ptl-tool.py`:
* Strategy Pattern Refactor: Decoupled the monolithic `verify_pr_readiness` block into modular, extensible classes (`MergeConflictCheck`, `CommitParityCheck`, `ConflictSimulationCheck`, `RedmineLinkageCheck`) conforming to `BaseAuditCheck`.
* AuditContext & Shared State: Replaced the cumbersome 9-argument function signatures with a unified `AuditContext` dataclass.
* Consolidated Error Reporting: Introduced `AuditReport` to collect failures across all checks. In `--ci-mode`, it bundles these failures into a single, consolidated GitHub `REQUEST_CHANGES` review to prevent shadowing and PR comment spam.
* Automated Label Management: Added `--audit-label` parsing to dynamically swap queue/pass/fail labels via the GitHub API during CI runs.

Miscellaneous workflow enhancements:
* Added `--integration` switch for the "Daily Driver" workflow. It auto-detects the target base branch, sets standard release flags, skips conflict simulation, and enforces `--always-fetch`.
* Updated QA Tracker creation/update logic to set Redmine Custom Field IDs directly rather than relying solely on description text.
* Replaced `--release-merge` with `--final-merge` for clarity.
* Introduced `--dry-run` to safely preview GitHub API calls, Redmine updates, and Git operations without altering remote state.
* Added `--examples` flag detailing advanced CLI usage.
* Implemented a local HTML tab-launcher to bypass Firefox race conditions when opening multiple browser tabs via the command line.

Assisted-by: Gemini
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
.github/workflows/releng-audit.yaml [new file with mode: 0644]
doc/dev/release-checklists.rst
src/script/ptl-tool.py