Skip to content

build: drop the redundant Failsafe version pin in token-sheriff-client - #711

Merged
cuioss-oliver merged 1 commit into
mainfrom
fix/drop-redundant-failsafe-pin
Sep 4, 2026
Merged

cuioss-oliver merged 1 commit into
mainfrom
fix/drop-redundant-failsafe-pin

Conversation

@cuioss-oliver

Copy link
Copy Markdown
Collaborator

Removes the locally pinned <version.maven.failsafe>. This is the line that turned the last parent bump into a deadlock.

The comment was wrong

The property justified itself with:

"token-sheriff-client inherits no maven-failsafe-plugin pluginManagement from cui-java-parent or token-sheriff-parent, so the IT tier binding below must pin its own version."

cui-parent-pom does declare it, in build/pluginManagement/plugins/plugin (lines 308–312):

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>${maven.failsafe.plugin.version}</version>
</plugin>

<build> spans lines 156–563 and <profiles> starts at 565, so this is outside any profile — inherited unconditionally. And it is present in 1.5.11, 1.6.0 and 1.6.1 alike, so the claim was untrue when written, not merely stale.

Why it mattered

The enforcer's RequireSameVersions rule compares Surefire against Failsafe. A locally pinned Failsafe turns any parent-driven Surefire move into a build break until the pin is hand-edited to match. That is precisely what happened last cycle:

Surefire Failsafe Enforcer
#707 alone (parent 1.6.1) 3.6.0 (parent) 3.5.6 (pin) fail
#703 alone (failsafe bump) 3.5.6 (parent) 3.6.0 (pin) fail
#708 (both, by hand) 3.6.0 3.6.0 pass

Two PRs that each looked individually broken, neither fixable by rebasing — an interlock manufactured entirely by this pin. With the version inherited, the two plugins move in lockstep by construction and this failure mode cannot recur.

Counter-example

API-Sheriff declares maven-surefire-plugin / maven-failsafe-plugin in seven places across pom.xml, api-sheriff/, integration-tests/ and benchmarks/, and pins a version in none of them. TokenSheriff's token-sheriff-client was the only pin in either repo.

Scope

Only the <version> is removed. The <executions> binding stays — that is what makes the wired-flow *IT tier run under mvn verify, and it is genuinely local (no Failsafe binding is inherited, only the version). The stale comment is replaced with one recording why the version is deliberately absent.

Verification

./mvnw clean verify -pl token-sheriff-clientBUILD SUCCESS:

  • failsafe:3.6.0:integration-test — version resolves from the parent
  • Wired-flow scaffold — 7 ITs execute, so the binding is intact
  • failsafe:3.6.0:verify runs
  • jacoco:check (refresh-path-coverage-check)All coverage checks have been met
  • enforcer RequireSameVersions passes (Surefire 3.6.0 / Failsafe 3.6.0)

Effective-POM check confirms both plugins resolve to 3.6.0 with no local property.

The pinned <version.maven.failsafe> rested on a false premise. Its comment
claimed:

  "token-sheriff-client inherits no maven-failsafe-plugin pluginManagement
   from cui-java-parent or token-sheriff-parent"

cui-parent-pom does declare maven-failsafe-plugin in build/pluginManagement as
${maven.failsafe.plugin.version}, outside <profiles>, so it is inherited
unconditionally. That entry is present in 1.5.11, 1.6.0 and 1.6.1 alike, so the
claim was untrue when it was written, not merely stale.

The pin is what made the last parent bump a deadlock. The enforcer's
RequireSameVersions rule compares Surefire against Failsafe, so a locally pinned
Failsafe turns any parent-driven Surefire move into a build break until the pin
is hand-edited to match. That is exactly what happened: #707 (parent 1.6.1,
Surefire 3.6.0) and #703 (Failsafe 3.6.0) each failed alone and only passed when
landed together. Inheriting the version removes that failure mode - the two
plugins now move in lockstep by construction.

API-Sheriff is the counter-example: it declares Surefire/Failsafe in seven
places and pins a version in none of them.

Only the version is removed. The <executions> binding stays - it is what makes
the wired-flow *IT tier run under `mvn verify`, and that is genuinely local.

Verified with `mvnw clean verify -pl token-sheriff-client`: failsafe:3.6.0
resolves from the parent, the 7 wired-flow ITs execute, refresh-path-coverage-check
passes, BUILD SUCCESS.

Co-authored-by: plan-marshall <noreply@cuioss.de>
@cuioss-oliver cuioss-oliver added the skip-bot-review Suppress automated reviewer bots for this PR label Sep 4, 2026
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • skip-bot-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: cuioss/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: f04a1b0d-fe4a-41ad-9d9f-d0d5e1e3037f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @cuioss-oliver, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 3 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@cuioss-oliver
cuioss-oliver added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 064fc23 Sep 4, 2026
29 checks passed
@cuioss-oliver
cuioss-oliver deleted the fix/drop-redundant-failsafe-pin branch September 4, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-bot-review Suppress automated reviewer bots for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant