Skip to content

CI: a red full-tier run on main or in the nightly runs opens or updates one issue - #448

Merged
tae898 merged 1 commit into
mainfrom
ci/447-red-main-opens-an-issue
Nov 22, 2026
Merged

tae898 merged 1 commit into
mainfrom
ci/447-red-main-opens-an-issue

Conversation

@tae898

@tae898 tae898 commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

It adds one small workflow, .github/workflows/report-red-main.yml, so that a red full-tier run on main or in the nightly runs does not go unnoticed now that a pull request runs only the fast tier (#443). When Test JVM (arcadedb-jvm), Test native (arcadedb) or Test Python Examples ends red on main, it opens the issue "Full CI is red on main: ", or comments on it when it is already open. A later green run of the same workflow adds a comment "Green again". Nothing is closed by the workflow: I close the issue.

What triggers it and what does not

Run Result
push to main, the nightly schedule (03:00, 03:40, 04:00 UTC), workflow_dispatch on main; this repository only looked at
a pull request, any other branch or tag, a fork never starts the job (the if of the job)
the release workflows not watched (a workflow that another one calls has no workflow_run of its own)
ended as failure, timed_out or startup_failure red: issue or comment
ended as cancelled not red: a newer push cancels the run in progress in test-native.yml and replaces a waiting run in test-jvm.yml, and a person can cancel by hand
cancelled, but a started job has the annotation "exceeded the maximum execution time" red: that is a job that hit its time limit
success and an open issue with the title comment "Green again", only when more jobs passed than were skipped (the nightly native run that skips itself when nothing changed says nothing)
success, skipped, neutral, no open issue nothing

The issue has the run link, the commit, the failing jobs with the name of the failing step, and one sentence about a known flaky failure. Labels bug, github_actions and jvm or native, assignee tae898, no milestone (an issue opened with the workflow token starts no other workflow, so classify-issue.yml, assign-maintainer.yml and assign-milestone.yml do not run on it).

Permissions and security

issues: write and contents: read on the one job, permissions: {} for the workflow, no third-party action (gh and jq on the runner). It checks out nothing and runs no code of a pull request: it reads the event payload and the API. Every payload value goes through env, never into the script text. A concurrency group per workflow name makes two runs that end together report one after the other, so the issue is not opened twice.

Known flaky failure (#409)

Not automatic. The only place that names the failing test is the job log, and the log endpoint answers 403 without actions: read (I checked it without a token; the check-run annotations of a failed job say only Process completed with exit code 1.). So the issue text says that a known flaky failure goes under its own issue (#409 for the vector read-your-writes race) and the issue of the run is closed as a duplicate. If that turns out to be too much manual work, the fix is actions: read on the job and a grep of the failed job's log for the test name, about 12 lines.

What I did and did not verify

I ran the shell of the step against a stub gh (the step is extracted from the YAML, bash -n first):

Case Expected Result
new failure one issue with title, labels bug, github_actions, jvm, assignee, no milestone, failing job and step, run link, sha, #409 sentence pass
repeat failure, attempt 2, an open issue plus a pull request with the same title one comment "Still red" on the issue, none on the pull request pass
green again (3 passed, 1 skipped), open issue one comment "Green again", nothing closed pass
green, no open issue nothing pass
green nightly that skipped itself (1 passed, 8 skipped), open issue nothing pass
cancelled by a newer run and by a person, with a red summary job inside nothing, only started jobs looked at pass
cancelled with the annotation "exceeded the maximum execution time" issue with only the timed-out job, label native pass
startup_failure, no job issue that says no failed job is listed pass
18 failing jobs 15 listed and "and 3 more" pass
skipped, neutral, action_required nothing, no issue lookup pass
the jobs call fails still reports pass

That is 32 checks, all passing. actionlint 1.7.12 with shellcheck is clean, and uvx pre-commit run --files passes on the three changed files. The annotation texts were read from real runs here: "Canceling since a higher priority waiting request for ... exists" (a newer run), "The run was canceled by @tae898." (a person). The text for a job time limit I took from GitHub's message and did not see in this repository, because no job here timed out in the runs I looked at. If GitHub reports a timed-out job as failure, the first rule catches it, and if it reports cancelled, the annotation rule does, so either way it is reported, unless the message text differs.

Not provable before the merge

A workflow_run workflow runs only from the default branch, so this one cannot run on this pull request, and a run of a test workflow on a branch does not start it. After the merge, a manual run of one test workflow on main (gh workflow run test-jvm.yml --ref main) that does not fail proves the trigger and the "nothing to report" path only. The red path is proven by the stub run until the first real red run on main: that run opens the issue, and the run of Report a red full run on main in the Actions tab shows its log.

Related issues

Closes #447

Docs

  • CONTRIBUTING.md: three sentences in "What CI runs".
  • docs/modules/ROOT/pages/development/ci.adoc: a row for report-red-main.yml in "Repository automation".

Checklist

  • A regression test fails on the old code and passes on the new (a workflow: the stub run above stands in, it is not part of the repository)
  • The test suite that the change can affect passes (the checks of this pull request: the fast tier)
  • uvx pre-commit run --files <changed files> passes

…ates one issue (#447)

Since #443 a pull request runs only the fast tier, so a failure that only macOS, Windows, arm64 or an example leg shows is first seen on `main`, where only three README badges show it. A new workflow, report-red-main.yml, reacts to the end of the three test workflows (`workflow_run`), only for a push, the nightly schedule or a manual run on `main`, and opens "Full CI is red on main: <workflow name>" or comments on the open one. A green run of the same workflow adds "Green again" (it needs more passed than skipped jobs, so a nightly that skipped itself says nothing) and nothing is closed.

A cancelled run is not red: a newer push cancels the run in progress in test-native.yml, and a replaced run in test-jvm.yml never starts. The one cancelled run that is reported is the one where a job hit its time limit, found by the check-run annotation "exceeded the maximum execution time".

The job holds `issues: write` and `contents: read`, checks out nothing, and passes every payload value through `env`. It cannot name the failing test (the log endpoint needs `actions: read`), so a known flaky failure such as #409 is linked by a person; the issue text says so.

The shell was run against a stub `gh` for a new failure, a repeat failure, green again, a run cancelled by a newer run, a run cancelled by a time limit, a startup failure, more than 15 failing jobs and a failing job list call. actionlint (with shellcheck) and the repo's pre-commit hooks pass.
@tae898 tae898 added this to the 26.12.1 milestone Nov 22, 2026
@tae898 tae898 added the github_actions Pull requests that update GitHub Actions code label Nov 22, 2026
@tae898 tae898 self-assigned this Nov 22, 2026
@tae898
tae898 merged commit 1b00bd0 into main Nov 22, 2026
17 checks passed
@tae898
tae898 deleted the ci/447-red-main-opens-an-issue branch November 22, 2026 18:13
@tae898 tae898 mentioned this pull request Nov 30, 2026
1 of 10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: a red full-tier run on main or in the nightly runs opens an issue

1 participant