fix(release-script): install a module after the siblings it depends on - #513
Merged
Conversation
Step 4 installs each train sibling on its own — install -f <module>/pom.xml, not
a reactor build — so everything it needs must already be in the local repository
at the version the bump just wrote. That version exists in no reactor and is not
yet on Central, so an install that comes too early cannot resolve it.
render-pptx was listed before testing while depending on it at test scope, and
had been since the PPTX text-fidelity work. Nothing caught it: the guard checked
that the list contains every sibling the examples need, not that the order
respects the graph. And a cut only fails on it when the local repository does
not already hold graph-compose-testing at the new version — the normal state of
a clean machine, not of one that has been building all week. The 2.1.1 cut hit
it and stopped at Step 4, after the bump had rewritten thirty files and before
any commit, tag or push.
testing now installs second. The guard derives the order it requires from the
poms rather than restating it, so a new edge fails the build instead of the cut.
That guard needed its own fix to work at all: it matched only
${graphcompose.version}, which is how examples/pom.xml pins a sibling, while a
module inside the train uses ${project.version}. Reusing that pattern found no
dependencies for render-pptx, so the order check passed over the very edge that
broke the cut — a guard reading the wrong spelling reports on an empty set and
calls it clean. Verified from both sides: with the order fixed it passes, and
with the original order it fails naming "render-pptx (position 5) needs testing,
installed at 7".
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.
Why
The 2.1.1 cut failed on this. It stopped at Step 4 with
after the version bump had rewritten thirty files, and — the one thing that went right —
before any commit, tag or push. Nothing reached the remote.
Step 4 installs each train sibling on its own (
install -f <module>/pom.xml, not areactor build), so everything a module needs has to be in the local repository already,
at the version the bump just wrote. That version exists in no reactor and is not yet on
Central.
render-pptxwas listed beforetestingwhile depending on it at testscope, and had been since the PPTX text-fidelity work landed.
It stayed invisible for two reasons, and both are worth naming:
ReleaseScriptInstallListGuardTestchecked that the list contains every sibling theexamples need. It said nothing about order.
graph-compose-testingat the new version. That is the normal state of a cleanmachine — and not of one that has been building all week, which is how the 2.1.0 cut
went green over the same defect.
What
testinginstalls second, right afterrender-pdf. The guard gains a second test thatderives the required order from the poms rather than restating it, so a new edge
fails the build instead of the next cut.
The guard needed fixing before it could fix anything
Worth being explicit, because it went green on the broken order first: the existing
dependency pattern matched only
<version>${graphcompose.version}</version>, which ishow
examples/pom.xmlpins a sibling. A module inside the train uses${project.version}. Reusing that pattern found no dependencies forrender-pptxatall, so the order check passed over the very edge that broke the cut — a guard reading
the wrong spelling reports on an empty set and calls it clean.
Tests
./mvnw -B -ntp clean verify→BUILD SUCCESS.Checked from both sides rather than trusted because it passed:
testingsecond)testinglast)render-pptx (position 5) needs testing, installed at 7cut-release.ps1 -Version 2.1.1 -DryRun→ exit 0, and the printed order is nowrender-pdf → testing → wrapper → render-docx → render-pptx → templates.The working tree was restored to
a2a3e146before any of this; the failed cut left nocommit and no tag, locally or on the remote.