ci: standardize the reusable-workflow caller job id (it is the branch-protection prefix)#5
Open
ywatanabe1989 wants to merge 1 commit into
Open
ci: standardize the reusable-workflow caller job id (it is the branch-protection prefix)#5ywatanabe1989 wants to merge 1 commit into
ywatanabe1989 wants to merge 1 commit into
Conversation
…-protection prefix) The caller's job id is not cosmetic: GitHub names a reusable-workflow call's status check '<caller job id> / <job name in the reusable>'. So the job id IS the required-status-check prefix. Repos that pick their own emit check names no other repo emits, and one protection list can no longer serve the ecosystem — each repo needs a bespoke list, hand-read off a real PR, forever. This README was the source of the divergence: its example told every caller to name the job 'call'. Repos duly invented their own (scitex-writer's open migration uses 'test' -> 'test / pytest-matrix-on-ubuntu-py3.11', while scitex-config and scitex-dict emit 'pytest-matrix / ...'). - Fix the README example and pin the canonical job id per reusable workflow, with the exact resulting check name (read off the reusables, not guessed). - Add workflow-templates/pytest-matrix.yml as the canonical caller stub, so the shape is copied rather than invented (it also appears under Actions -> New workflow in every repo). - State the rule in pytest-matrix.yml itself, where an editor will see it. - Document the migration rule as RECONCILE, not blanket-flip: 33 repos already have protection set to the post-migration names and need no change; others still carry the pre-migration names and do. Note scitex-dev by name — its protection was deliberately reverted to the bare names as an interim, so it must be flipped back to the prefixed names when it migrates.
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.
Do this before any further migrations, or we mint a problem that gets expensive fast.
The problem
The caller job id is not cosmetic. GitHub names a reusable-workflow calls status check:
So the caller job id IS the required-status-check prefix. A repo that names the job
testemitstest / pytest-matrix-on-ubuntu-py3.11; one that names itpytest-matrixemitspytest-matrix / pytest-matrix-on-ubuntu-py3.11. Different names in different repos means one protection list can never serve the ecosystem — every repo needs a bespoke list, hand-read off a real PR, forever.This README was the source of the divergence
Its example told every caller to name the job
call:Repos duly invented their own.
scitex-writers open migration (scitex-ai/scitex-writer#284) usestestandinstall-check.The good news — measured, not assumed
I checked the caller job id of every repo that already calls
pytest-matrix.yml. 12 of 13 already usepytest-matrix(scitex-plt, scitex-ssh, scitex-dict, scitex-ui, socialia, scitex-repro, scitex-os, scitex-io, scitex-genai, scitex-dsp, crossref-local, scitex-gists). So this PR ratifies the de-facto convention rather than imposing a new one — it is a no-op for every migrated repo. The only outlier is scitex-writer#284, which is still unmerged, so fixing it costs nothing now.I also corrected my own first draft here: I had proposed
auditas the canonical id forquality-audit.yml, but the repos already migrated usequality-audit. Canonizing my invention would have forced pointless churn. The table below is what is actually deployed.Changes
workflow-templates/pytest-matrix.yml: canonical caller stub, so the shape is copied, not invented. Also surfaces under Actions → New workflow in every org repo.pytest-matrix.yml: state the rule in the reusable itself, where an editor will see it.pytest-matrix.ymlpytest-matrixpytest-matrix / pytest-matrix-on-ubuntu-py3.{11,12,13}import-smoke.ymlimport-smokeimport-smoke / import-smoke-on-ubuntu-py3-12quality-audit.ymlquality-auditquality-audit / auditrtd-sphinx-build.ymldocs-sphinxdocs-sphinx / docs-sphinxReconcile, do not blanket-flip
Migrating renames a repos checks, so protection must be reconciled in the same change or the repo goes green-but-unmergeable (
mergeStateStatus: BLOCKED, every check passing, no error anywhere — verified on scitex-config#23 and scitex-dict#24). But it is not always a flip: an audit of all 71 repos found 33 already have protection set to the post-migration names and need no change at all. Read the emitted names off a real PR, compare against each protected branch (mainanddevelop— they drift), and make them agree.scitex-devis called out by name in the README: its protection was deliberately reverted to the bare names as an interim to unblock merges, so it must be flipped to the prefixed names when it migrates. That cost is written down so nobody rediscovers it the hard way.Relationship to #4
Independent — #4 touches only
auto-merge-to-develop.ymlandcla.yml. No conflict. #4s dispatch gate is cleared (the org pool now dispatches;scitex-citoo).