Repository navigation
ci: post CI reports to a Discussions thread per job (#2030) - #2033
Conversation
2166b7c to
0eb3be1
Compare
|
GOOD TO GO at
|
0eb3be1 to
e3cb18c
Compare
|
Rebased onto |
|
Coverage: 91.54% (unit tier, Python 3.15,
Per-file detail: the |
|
Ordering check on |
|
resolve conflicts |
e3cb18c to
045c3af
Compare
|
Rebased onto |
|
Ordering check on |
|
resolve conflicts |
- util/discussion_report.py: finds the category and the job's thread by name through `gh api graphql` and opens the thread on first use. `--mode scheduled` posts every run; `--mode push` posts a run that warned or failed, and a green run only after a non-green one, read from a hidden report-status marker. Every failure is one warning and exit 0. - ci-timing.yml, cron-vendor.yml: a `discussion` job, alone holding `discussions: write`, downloads the reporting job's artifact and posts it to the `CI reports` category (workflow-level REPORT_CATEGORY). ci-timing is `scheduled`; cron-vendor is `push` on `workflow_run`. vendor-update writes and uploads a run report and a `warning` status; a failed or cancelled gate posts a report of its own. Other jobs keep their permissions. - tests/project/test_discussion_report_2030.py: the script against a stand-in gh, both modes, the workflow pins, and the vendor report and post steps; test_ci_timing.py's permission and job pins follow. - workflows.rst: the script joins Workflow Scripts; CI Reports section.
045c3af to
5636a26
Compare
|
Rebase only, no new changes: CI on the previous head |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
#2030, PR 1.
util/discussion_report.pyposts a report to its job's thread in theCI reportscategory. It creates the thread on first use, found by exact title, and ends each comment with the run, the commit and a hiddenreport-statusmarker.--mode scheduledposts every run.--mode pushposts every non-success run, plus a success only when the thread's last marker was not a success.ci-timingandcron-vendoreach gain adiscussionjob. It is the only job holdingdiscussions: write, and it iscontinue-on-error.cron-vendorpickspushmode onworkflow_runandscheduledotherwise. Itsdiscussionjob also runs when theheadgate failed or was cancelled, and posts a generated report that says so. Its report marks failed targets or a failed test gate aswarning.workflows.rstgains a CI Reports section and a script row.The pins fail on
main's workflows (28 failed) and pass here (110 passed). The 63 test files that read these workflows orworkflows.rstgive1268 passed. Theghstub fakes every API call.Open: it is unverified whether
GITHUB_TOKENcan open a thread in an Announcement-format category. If it cannot, the job warns, and I'll create the two threads by hand once this lands.