Skip to content

Fix jreleaserDeploy JGit conflict and dry-run it in CI - #1728

Merged
harshavardhana merged 1 commit into
minio:masterfrom
donatello:release-jgit-pin
Oct 30, 2026
Merged

harshavardhana merged 1 commit into
minio:masterfrom
donatello:release-jgit-pin

Conversation

@donatello

@donatello donatello commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

jreleaserDeploy is broken on master, so 9.0.4 can't be published. It fails before any network call:

> Task :jreleaserDeploy FAILED
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jgit/lib/GpgObjectSigner
	at org.jreleaser.engine.context.ModelConfigurer.configure(ModelConfigurer.java:49)

JReleaser 1.26.0 (the latest release) is built against JGit 5.13. Since #1727, Spotless 8.10.4 pulls JGit 7.8 onto the same plugin classpath, Gradle resolves to 7.8, and GpgObjectSigner no longer exists in JGit 7:

org.jreleaser:jreleaser-git-java-sdk:1.26.0
  \--- org.eclipse.jgit:org.eclipse.jgit:5.13.5.202508271544-r -> 7.8.0.202609011348-r
com.diffplug.spotless
  \--- org.eclipse.jgit:org.eclipse.jgit:7.8.0.202609011348-r
+buildscript {
+    configurations.classpath {
+        resolutionStrategy.force 'org.eclipse.jgit:org.eclipse.jgit:5.13.5.202508271544-r'
+    }
+}
 plugins { … }

The pin affects only the build's plugin classpath. Published artifacts and POMs don't change. Spotless 8 works with JGit 5.13 here: this build doesn't use ratchetFrom, and spotlessCheck passes. Remove the pin once JReleaser supports JGit 7.

CI never ran jreleaserDeploy, which is why #1727 passed CI. This PR adds a step on the Ubuntu / Java 25 job that runs publishMinioJavaPublicationToPreDeployRepository jreleaserDeploy --dryrun -Prelease. It uses a throwaway GPG key and dummy Sonatype credentials, and --dryrun skips every remote operation. The step adds about 50 s, mostly JReleaser checking whether the throwaway key is on public keyservers. That check only warns.

Evidence

I reproduced the CI job in an Ubuntu 24.04 container with JDK 25: ./gradlew build, ./gradlew build -Prelease, then the new step script, extracted from gradle.yml and run under bash -eo pipefail.

  • Before (master + new CI step, no pin): both builds pass, then the step fails with > org/eclipse/jgit/lib/GpgObjectSigner, BUILD FAILED, exit 1.
    After (this PR): both builds pass, then the step passes:
    [INFO]  dry-run set to true
    [INFO]      [sign] api/build/pre-deploy/io/minio/minio/9.0.4/minio-9.0.4.jar
    …  (12 artifacts signed across api and adminapi)
    [INFO]  JReleaser succeeded after 50.016 s
    BUILD SUCCESSFUL in 51s
    

Merge Danger

Door: two-way

Blast Radius: build-only

The only changes are a build-classpath pin and one CI step. If a future Spotless release needs a JGit 7-only API, spotlessCheck will fail loudly and the pin must be revisited.

Summary by CodeRabbit

  • Chores
    • Added an automated dry run of the release publishing process to help catch issues before a release.
    • Updated build configuration to maintain compatibility between release and formatting tools.

Spotless 8.x pulls JGit 7 onto the plugin classpath, while JReleaser
1.26.0 is built against JGit 5.13. jreleaserDeploy then fails with
NoClassDefFoundError: org/eclipse/jgit/lib/GpgObjectSigner (removed in
JGit 7), so a release cannot publish. Force JGit 5.13 on the buildscript
classpath until JReleaser supports JGit 7; spotlessCheck passes with it.

CI never ran jreleaserDeploy, so this went unnoticed. Add a step that
runs publish + jreleaserDeploy --dryrun with a throwaway GPG key and
dummy credentials on one matrix entry.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 025856f5-f081-4a76-9640-46c4598f2392
Commits

Reviewing files that changed from the base of the PR and between 7c04791 and e76af72.

Files selected for processing: 2
  • .github/workflows/gradle.yml
  • build.gradle

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The build pins JGit for buildscript classpath resolution. The Gradle workflow adds an Ubuntu/Java 25 release dry run that uses temporary signing keys and dummy credentials.

Changes: Release Validation

Layer / File(s) Summary
JGit classpath compatibility
build.gradle
A buildscript classpath resolution rule pins org.eclipse.jgit:org.eclipse.jgit to version 5.13.5.202508271544-r. The comments describe a JReleaser and Spotless compatibility issue involving JGit 7.
CI release dry run
.github/workflows/gradle.yml
An Ubuntu/Java 25 workflow step creates temporary signing-key files and runs the pre-deploy publication and JReleaser deploy tasks with dummy credentials and release dry-run flags.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • minio/minio-java#1727: This PR upgrades Spotless and addresses the same JGit classpath compatibility issue.

Suggested reviewers: balamurugana

Merge Risk: Minimal · up to e76af

The change pins the build's JGit dependency and adds release dry-run validation. No concrete merge-blocking issue remains; merge after normal checks pass.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes both main changes: resolving the JReleaser JGit conflict and adding a CI dry run.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the build at dawn
While keys appear, then soon are gone
A dry-run hops through tasks in line
JGit stays pinned at version five
The release path is checked, not sent
The rabbit rests, its work well spent

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

@harshavardhana
harshavardhana merged commit db06345 into minio:master Oct 30, 2026
13 checks passed
@donatello
donatello deleted the release-jgit-pin branch October 30, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants