Repository navigation
CI: a red full-tier run on main or in the nightly runs opens or updates one issue - #448
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It adds one small workflow,
.github/workflows/report-red-main.yml, so that a red full-tier run onmainor in the nightly runs does not go unnoticed now that a pull request runs only the fast tier (#443). WhenTest JVM (arcadedb-jvm),Test native (arcadedb)orTest Python Examplesends red onmain, 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
pushtomain, the nightly schedule (03:00, 03:40, 04:00 UTC),workflow_dispatchonmain; this repository onlyifof the job)workflow_runof its own)failure,timed_outorstartup_failurecancelledtest-native.ymland replaces a waiting run intest-jvm.yml, and a person can cancel by handcancelled, but a started job has the annotation "exceeded the maximum execution time"successand an open issue with the titlesuccess,skipped,neutral, no open issueThe 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_actionsandjvmornative, assigneetae898, no milestone (an issue opened with the workflow token starts no other workflow, soclassify-issue.yml,assign-maintainer.ymlandassign-milestone.ymldo not run on it).Permissions and security
issues: writeandcontents: readon the one job,permissions: {}for the workflow, no third-party action (ghandjqon 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 throughenv, never into the script text. Aconcurrencygroup 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 onlyProcess 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 isactions: readon the job and agrepof 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 -nfirst):bug,github_actions,jvm, assignee, no milestone, failing job and step, run link, sha, #409 sentencenativestartup_failure, no jobskipped,neutral,action_requiredThat is 32 checks, all passing.
actionlint1.7.12 withshellcheckis clean, anduvx pre-commit run --filespasses 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 asfailure, the first rule catches it, and if it reportscancelled, the annotation rule does, so either way it is reported, unless the message text differs.Not provable before the merge
A
workflow_runworkflow 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 onmain(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 onmain: that run opens the issue, and the run ofReport a red full run on mainin 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 forreport-red-main.ymlin "Repository automation".Checklist
uvx pre-commit run --files <changed files>passes