Repository navigation
Post testhub build and test statuses to GitHub commits - #163
Merged
Merged
Conversation
A PR now shows two testhub checks for its head commit, beside MESA's GitHub Actions checks, so reviewers can see whether it's ready to merge as far as testing goes (dispatcher Phase F). - testhub/build: success once a computer builds and none fails. Failures are judged per computer and toolchain, so a retried build that succeeded doesn't count against the commit. - testhub/tests: success once one computer has run every test with full inlists (plus any [ci fpe] / [ci converge] mode the commit asks for) and no matrix cell has failed on any computer. Mixed cells (one computer's repeat runs disagreeing in one configuration) are ignored. GithubStatus decides what the statuses say. GithubStatusJob posts them after CommitRefreshJob (once per burst of results) and after a push moves a branch head. It posts a context only when its state or description changes, recorded in the new github_commit_statuses table. It's off unless GITHUB_STATUSES_ENABLED=1. The rake tasks github_statuses:post and :heads post by hand. Commit#ci_coverage pulls out the single-computer coverage query that refresh_ci_satisfaction! already used, so both share it.
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
The testhub can now post two commit statuses to
MESAHub/mesa. A PR then shows them for its head commit, next to the GitHub Actions checks:testhub/buildtesthub/tests[ci fpe]/[ci converge]mode the commit asks for, and no matrix cell has failed on any computer.full inlists 412/530 (tycho).[ci skip]commits get no statuses. Full rules and rollout steps are indocs/github-status.md.Why
So a PR page shows whether its latest commit is ready to merge as far as testing goes. This is dispatcher Phase F; the design was settled in the roadmap's backlog entry.
How
GithubStatus(service) decides the states.test_computer_matrixfor failures.Commit#ci_coveragefor single-computer coverage. That query is pulled out ofrefresh_ci_satisfaction!, which now shares it.GithubStatusJobposts them withGIT_TOKEN. It's enqueued:CommitRefreshJob, which is already debounced per burst of results;BranchSyncJobmoves a branch head, so a new PR head shows "pending" right away.github_commit_statusestable records what was last posted.github_statuses:post(SHA=/BRANCH=,FORCE=1) andgithub_statuses:headspost statuses by hand.Rollout
The feature is off by default. Nothing is enqueued or posted until
GITHUB_STATUSES_ENABLED=1is set on the Railway service. After merging and deploying:rake github_statuses:headson the service.GIT_TOKEN'sreposcope already covers writing statuses. Statuses will appear as posted byMESA-testhub.Testing
spec/services/github_status_spec.rb) and for the job (posting, skip-if-unchanged, force,[ci skip], off switch, error handling, enqueue hooks).🤖 Generated with Claude Code