From b6da80d2a81bd9790202b25993db022a89531a67 Mon Sep 17 00:00:00 2001 From: DemchaAV Date: Sat, 15 Aug 2026 21:35:43 +0100 Subject: [PATCH] chore(deps): move the train and the consumer smokes onto one set of versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dependabot opened nine pull requests on the release push. Eight of them were the same bump — junit-jupiter 5 to 6 in each consumer-smoke project, one per manifest because the group covers minor and patch and this is a major — and the ninth carried the rest. Taken together they are one change, and one of them was already stale by the time it opened. The train moves to junit-bom 6.1.3, logback-classic 1.6.2 and the 3.9.16 Maven wrapper. The consumer projects move to junit-jupiter 6.1.3, surefire 3.5.6 and, in s2, enforcer 3.6.3 — off a JUnit line the rest of the repository left two majors ago. Their moves to 2.2.0 rather than the 2.1.1 that was offered. That property is the version each project verifies when the runner names none, and it sat on 2.0.0: the release step moves the same default in run.sh, run.ps1, the workflow and the README, and never reached the poms. Every runner does pass a version, so the fallback decided nothing on a normal run, which is how it stayed two releases behind without a single run going red. So the release step finds the consumer projects instead of listing them — they arrive one per published coordinate combination, and a list would be a second place to remember that — and a guard reads all eleven places the default is written down and holds them to the published release, the rule the install snippets already follow. mvnw.cmd is left alone. The offered change rewrote the whole file for its line endings; what the wrapper upgrade needs is the distributionUrl. --- .mvn/wrapper/maven-wrapper.properties | 2 +- benchmarks/pom.xml | 4 +- core/pom.xml | 4 +- .../VersionConsistencyGuardTest.java | 76 +++++++++++++++++++ examples/pom.xml | 4 +- qa/pom.xml | 4 +- render-docx/pom.xml | 4 +- render-pdf/pom.xml | 4 +- render-pptx/pom.xml | 4 +- scripts/cut-release.ps1 | 23 ++++++ .../release-smoke/s1-graph-compose/pom.xml | 6 +- scripts/release-smoke/s2-core-only/pom.xml | 8 +- .../release-smoke/s3-core-render-pdf/pom.xml | 6 +- scripts/release-smoke/s4-templates/pom.xml | 6 +- scripts/release-smoke/s5-testing/pom.xml | 6 +- scripts/release-smoke/s6-bundle/pom.xml | 6 +- .../release-smoke/s7-core-render-pptx/pom.xml | 6 +- .../release-smoke/s8-core-render-docx/pom.xml | 6 +- templates/pom.xml | 4 +- testing/pom.xml | 4 +- 20 files changed, 143 insertions(+), 44 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 8dea6c227..216df0589 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,3 +1,3 @@ wrapperVersion=3.3.4 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index f38ad3564..1ad6ce226 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -25,9 +25,9 @@ 17 1.37 - 6.1.2 + 6.1.3 3.27.7 - 1.6.1 + 1.6.2 1.0.10 9.7.1 diff --git a/core/pom.xml b/core/pom.xml index 493f78f88..5e1d1bddb 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -47,13 +47,13 @@ 0.64.8 - 1.6.1 + 1.6.2 1.18.46 2.0.18 3.27.7 - 6.1.2 + 6.1.3 5.23.0 1.18.11 1.5.0 diff --git a/core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java b/core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java index 5ab605d87..2bda9b460 100644 --- a/core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java +++ b/core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java @@ -1038,6 +1038,82 @@ private static boolean declaresDependencyOn(Element project, String artifactId) return false; } + /** + * Every consumer-smoke default names the release a user can actually resolve. + * + *

The harness verifies the published artefacts, and each of its entry points writes + * down which version to verify when the caller names none: the two runner scripts, the + * workflow input, and the {@code } each consumer pom falls back to. The + * runners always pass one, so the poms' copy decides nothing on a normal run — which is + * how it sat two releases behind the rest without a single run going red, until + * Dependabot opened a pull request to move it.

+ * + *

Read out of the files rather than compared against a constant here, and held to + * {@link #acceptableTargets()} — the same published-release rule the install snippets + * follow. A default naming a version nobody can download would have the gate verify a + * release that does not exist; one naming an older release has it report green for the + * release before, which is the failure a release gate must not have.

+ */ + @Test + void everyConsumerSmokeDefaultNamesThePublishedRelease() throws Exception { + Set targets = acceptableTargets(); + Map defaults = new LinkedHashMap<>(); + + defaults.put("scripts/release-smoke/run.sh", + declaredVersion("scripts/release-smoke/run.sh", + "(?m)^GC_VERSION=\"([\\w.\\-]+)\"")); + defaults.put("scripts/release-smoke/run.ps1", + declaredVersion("scripts/release-smoke/run.ps1", + "\\[string]\\$Version = '([\\w.\\-]+)'")); + defaults.put(".github/workflows/release-smoke.yml", + declaredVersion(".github/workflows/release-smoke.yml", + "(?m)^\\s+default: '([\\w.\\-]+)'")); + + List consumers = consumerProjects(); + assertThat(consumers) + .describedAs("no consumer-smoke project under scripts/release-smoke: the harness " + + "this guards would be verifying nothing") + .isNotEmpty(); + for (Path pom : consumers) { + String relative = PROJECT_ROOT.relativize(pom).toString().replace('\\', '/'); + defaults.put(relative, + declaredVersion(relative, "([\\w.\\-]+)")); + } + + assertThat(defaults) + .describedAs("each consumer-smoke default must name the published release %s: a " + + "run that accepts the prefilled value would otherwise verify a version " + + "nobody can resolve, or the release before this one", targets) + .allSatisfy((where, version) -> assertThat(version) + .describedAs("%s", where) + .isIn(targets)); + } + + /** The consumer projects, found rather than listed: one arrives per published coordinate. */ + private static List consumerProjects() throws IOException { + Path root = PROJECT_ROOT.resolve("scripts/release-smoke"); + if (!Files.isDirectory(root)) { + return List.of(); + } + try (Stream entries = Files.list(root)) { + return entries.map(entry -> entry.resolve("pom.xml")) + .filter(Files::isRegularFile) + .sorted() + .toList(); + } + } + + /** The one version a file declares, or a failure naming the file that stopped declaring it. */ + private static String declaredVersion(String relativePath, String pattern) throws IOException { + Matcher declared = Pattern.compile(pattern) + .matcher(Files.readString(PROJECT_ROOT.resolve(relativePath))); + assertThat(declared.find()) + .describedAs("%s no longer declares a smoke version matching %s — the release step " + + "that moves it would silently skip the file", relativePath, pattern) + .isTrue(); + return declared.group(1); + } + private static Element directChild(Element parent, String name) { NodeList children = parent.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { diff --git a/examples/pom.xml b/examples/pom.xml index 7d304bb4f..18f7234e6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -18,7 +18,7 @@ ${project.version} - 1.6.1 + 1.6.2 17 2026-01-15 - 6.1.2 + 6.1.3 3.27.7 diff --git a/qa/pom.xml b/qa/pom.xml index 78777d274..59fd176ce 100644 --- a/qa/pom.xml +++ b/qa/pom.xml @@ -38,10 +38,10 @@ 3.5.6 2.22.1 - 6.1.2 + 6.1.3 3.27.7 5.23.0 - 1.6.1 + 1.6.2 3.0.8 21.0.12 3.0.8 - 6.1.2 + 6.1.3 3.27.7 - 1.6.1 + 1.6.2 1.1.0 3.15.0 diff --git a/scripts/cut-release.ps1 b/scripts/cut-release.ps1 index fbde2642c..6b5e55cc9 100644 --- a/scripts/cut-release.ps1 +++ b/scripts/cut-release.ps1 @@ -776,6 +776,16 @@ function Update-ReleaseSmokeDefaultVersion($repoRoot, $newVersion) { # re-verifies the PREVIOUS release and reports green — the one failure mode a # release gate must not have. Each pattern is anchored to its own construct so # a bump cannot smear across unrelated version strings in the same file. + # + # The consumer projects carry that default a second time, in the + # each pom falls back to when the runner passes none. Every runner does pass one, + # so the fallback decides nothing on a normal run — which is why it sat two + # releases behind until Dependabot opened a PR to move it. It is still a published + # version written down in the repository, so it moves with the release. + # + # Found rather than listed: the projects are one per published coordinate + # combination, so the set grows when a coordinate does, and a list here would be a + # second place to remember that. $targets = @( @{ Path = 'scripts/release-smoke/run.sh'; Pattern = '(?<=^GC_VERSION=")[\w\.\-]+(?=")'; Label = 'run.sh default' }, @{ Path = 'scripts/release-smoke/run.sh'; Pattern = '(?<=tests gc\.version=)[\w\.\-]+'; Label = 'run.sh usage' }, @@ -785,6 +795,19 @@ function Update-ReleaseSmokeDefaultVersion($repoRoot, $newVersion) { @{ Path = 'scripts/release-smoke/README.md'; Pattern = '(?<=defaults to the current published release \(`)[\w\.\-]+(?=`\))'; Label = 'README prose' } ) + $consumerRoot = Join-Path $repoRoot 'scripts/release-smoke' + if (Test-Path $consumerRoot) { + foreach ($project in Get-ChildItem $consumerRoot -Directory | Sort-Object Name) { + if (Test-Path (Join-Path $project.FullName 'pom.xml')) { + $targets += @{ + Path = "scripts/release-smoke/$($project.Name)/pom.xml" + Pattern = '(?<=)[\w\.\-]+(?=)' + Label = "$($project.Name) fallback" + } + } + } + } + foreach ($target in $targets) { $path = Join-Path $repoRoot $target.Path if (-not (Test-Path $path)) { diff --git a/scripts/release-smoke/s1-graph-compose/pom.xml b/scripts/release-smoke/s1-graph-compose/pom.xml index 18168a3fa..37684e8f8 100644 --- a/scripts/release-smoke/s1-graph-compose/pom.xml +++ b/scripts/release-smoke/s1-graph-compose/pom.xml @@ -13,10 +13,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/scripts/release-smoke/s2-core-only/pom.xml b/scripts/release-smoke/s2-core-only/pom.xml index db8dc0634..34e8795e3 100644 --- a/scripts/release-smoke/s2-core-only/pom.xml +++ b/scripts/release-smoke/s2-core-only/pom.xml @@ -13,11 +13,11 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 - 3.5.0 + 3.5.6 + 3.6.3 diff --git a/scripts/release-smoke/s3-core-render-pdf/pom.xml b/scripts/release-smoke/s3-core-render-pdf/pom.xml index 7471748e7..d6b9ffec1 100644 --- a/scripts/release-smoke/s3-core-render-pdf/pom.xml +++ b/scripts/release-smoke/s3-core-render-pdf/pom.xml @@ -13,10 +13,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/scripts/release-smoke/s4-templates/pom.xml b/scripts/release-smoke/s4-templates/pom.xml index 81c8e4122..2bfd5fd4d 100644 --- a/scripts/release-smoke/s4-templates/pom.xml +++ b/scripts/release-smoke/s4-templates/pom.xml @@ -14,10 +14,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/scripts/release-smoke/s5-testing/pom.xml b/scripts/release-smoke/s5-testing/pom.xml index 437c7a428..e8eaaeb75 100644 --- a/scripts/release-smoke/s5-testing/pom.xml +++ b/scripts/release-smoke/s5-testing/pom.xml @@ -14,10 +14,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/scripts/release-smoke/s6-bundle/pom.xml b/scripts/release-smoke/s6-bundle/pom.xml index d8fcb37a1..dda9806bd 100644 --- a/scripts/release-smoke/s6-bundle/pom.xml +++ b/scripts/release-smoke/s6-bundle/pom.xml @@ -14,10 +14,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/scripts/release-smoke/s7-core-render-pptx/pom.xml b/scripts/release-smoke/s7-core-render-pptx/pom.xml index 390d4a21f..9e5b40e68 100644 --- a/scripts/release-smoke/s7-core-render-pptx/pom.xml +++ b/scripts/release-smoke/s7-core-render-pptx/pom.xml @@ -14,10 +14,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/scripts/release-smoke/s8-core-render-docx/pom.xml b/scripts/release-smoke/s8-core-render-docx/pom.xml index 2146e4747..db5341bb9 100644 --- a/scripts/release-smoke/s8-core-render-docx/pom.xml +++ b/scripts/release-smoke/s8-core-render-docx/pom.xml @@ -13,10 +13,10 @@ UTF-8 17 - 2.0.0 - 5.11.4 + 2.2.0 + 6.1.3 3.27.7 - 3.5.2 + 3.5.6 diff --git a/templates/pom.xml b/templates/pom.xml index 406415484..9fb51273c 100644 --- a/templates/pom.xml +++ b/templates/pom.xml @@ -56,9 +56,9 @@ 17 1.18.46 - 6.1.2 + 6.1.3 3.27.7 - 1.6.1 + 1.6.2 3.15.0 3.5.1 diff --git a/testing/pom.xml b/testing/pom.xml index de12fc6ea..82398d0d6 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -59,9 +59,9 @@ 3.0.8 2.22.1 - 6.1.2 + 6.1.3 3.27.7 - 1.6.1 + 1.6.2 3.15.0 3.5.1