The publishing chain calls its own siblings by local path - #44
Merged
Merged
Conversation
reusable-publish-release-packages pinned its four sibling workflows by tag, so a publishing-vN tag did not contain the workflows it ran. publishing-v7 shipped a macOS wheel matrix that never executed and audioif v0.1.0 burned its tag on the resulting wheel-count failure. The class is live right now: publishing-v9 exists and is in use, and its own copy of this file still names @publishing-v8, so a consumer on v9 gets v8's builders. A local `./` reference resolves against the repository and ref of the file that contains it, so the siblings now come from whatever tag the consumer called, and cutting publishing-vN+1 is a tag with no ref edits. Verified against real runs before making the change, because the repository's own CI only lints YAML and would go green either way. A probe reusable workflow in this repository, tagged, calling a sibling by `./`, was called from PyDevices.github.io -- which has no workflows of its own, so a reference resolving against the caller could not have found the file. The nested job ran, from this repository's tag, with secrets: inherit on the call. Closes #26
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.
Fixes #26 (option 1, nested local references).
The four internal
PyDevices/.github/.github/workflows/X.yml@publishing-v8calls in
reusable-publish-release-packages.ymlbecome./.github/workflows/X.yml.The failure class is live, not historical.
publishing-v9exists and isalready in use (
audiodspcallsreusable-synchronize-mip-package.yml@publishing-v9),and v9's own copy of this file still names
@publishing-v8. So a consumercalling the chain at v9 today gets v8's builders. What that currently costs is
only a
setup-java@v5→v6bump that never takes effect — benign this time.publishing-v7 was the same mistake with teeth: a macOS wheel matrix that never
ran, and
audioifv0.1.0's burned tag.What I verified before changing anything
The issue asks to "verify GitHub's nested-local support" first, and this
repository's CI only lints YAML — it would go green whether or not the chain
still works. Published guidance is contradictory: several community threads
state that a
./reference inside a reusable workflow resolves against thecalling repository, which would make this change break every release in
the org, silently, at the next tag.
So I ran it. A throwaway probe reusable workflow in this repository, tagged,
calling a sibling by
./; called fromPyDevices.github.io, which has noworkflows of its own — so a reference resolving against the caller could not
possibly have found the file.
The nested job ran.
./resolves against the repository and ref of the filethat contains the
uses:, so a tag is self-consistent by construction. Asecond run confirmed the same with
secrets: inheriton the./call — theshape
request-mip-publicationuses. The probe branches and tags are deleted.What I did not prove: that a secret's value arrives through the nested
local call. Checking that needs either a throwaway repository secret or
reading an existing one, and both were outside what I'm permitted to do here.
The
secrets: inheritline itself is unchanged by this PR — only theuses:ref moved — and
request-mip-publicationis the single call site that takesany secret. It is the thing to watch on the first release after the next tag:
if the App token fails to mint there, this is why.
Also relevant: all nine
publishing-v*tags are lightweight, not annotated,which rules out the annotated-tag resolution bug reported in community
discussion #48693.
actionlintclean; the existing test suite passes.Live only at the next
publishing-vNtag. Consumers pin@publishing-v6,@publishing-v8and@publishing-v9, so nothing changes for them until a tagis cut — which is not mine to do. Cutting it is the point of the change: from
that tag on, it is a tag with zero ref edits.