[java] Prevent byte-buddy -jdkN variant from being picked by dependency updates#17523
Merged
titusfortner merged 1 commit intoMay 19, 2026
Merged
Conversation
…cy updates Byte Buddy publishes -jdkN compat variants alongside regular releases that Maven Central indexes as newer than the regular version. The automated dependency update task picked 1.18.8-jdk5 even though Selenium targets Java 8+ and only needs the regular 1.18.8 release. The Maven enforcer plugin then complained because 1.18.8-jdk5 sorts as greater than the managed dependency 1.18.8. This was first fixed in SeleniumHQ#17382 by reverting MODULE.bazel to 1.18.8, but the next dependency update reintroduced 1.18.8-jdk5. Add a guard in the java:update Rake task that detects net.bytebuddy:* artifacts whose proposed version carries a -jdkN suffix and falls back to the latest stable release returned by maven_stable_release (which already filters to versions matching `\A\d+\.\d+(\.\d+)*\z`). Also revert MODULE.bazel and re-pin maven_install.json so the current state is consistent again. Fixes SeleniumHQ#17355 Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
Member
|
CI "failure" is unrelated, I'm going to merge it. |
Contributor
Review Summary by QodoPrevent byte-buddy -jdkN variant from being picked by dependency updates
WalkthroughsDescription• Add guard in java:update Rake task to prevent byte-buddy -jdkN variants • Revert MODULE.bazel from 1.18.8-jdk5 back to 1.18.8 • Re-pin java/maven_install.json with correct byte-buddy version • Mirrors existing graphql exception pattern for stable release detection Diagramflowchart LR
A["Automated Dependency Update"] -->|detects -jdkN suffix| B["net.bytebuddy Guard"]
B -->|calls maven_stable_release| C["Stable Release Filter"]
C -->|returns 1.18.8| D["MODULE.bazel Updated"]
D -->|re-pins| E["maven_install.json"]
File Changes1. rake_tasks/java.rake
|
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.
Description
Byte Buddy publishes
-jdkNcompatibility variants alongside its regular releases. Maven Central indexes those variants as newer than the regular release (e.g.1.18.8-jdk5sorts higher than1.18.8), so the automated dependency update task (rake_tasks/java.rake—java:update, called from./go all:update) keeps picking the-jdkNflavor even though Selenium targets Java 8+ and only needs the regular release.The Maven enforcer plugin then complains because
1.18.8-jdk5sorts as greater than the managed dependency1.18.8.This was first fixed in #17382 by reverting
MODULE.bazelto1.18.8. The next automated dependency update silently reintroduced1.18.8-jdk5, which is what #17355 reports.Fix
Add a guard in the
java:updateRake task that detectsnet.bytebuddy:*artifacts whose proposed version carries a-jdkNsuffix and falls back tomaven_stable_release(artifact), which already filters to versions matching\A\d+\.\d+(\.\d+)*\zand therefore excludes any-jdkNvariant.The guard mirrors the existing
graphqlexception in the same loop.Also revert
MODULE.bazelfrom1.18.8-jdk5back to1.18.8and re-pinjava/maven_install.jsonso the repo state is consistent again.Changes
rake_tasks/java.rake— addnet.bytebuddy:*-jdkNguard injava:update(callsmaven_stable_releaseinstead of using the version returned by@maven//:outdated)MODULE.bazel—1.18.8-jdk5→1.18.8java/maven_install.json— regenerated viaRULES_JVM_EXTERNAL_REPIN=1 bazel run @maven//:pinVerification
byte-buddy:jarlockfile metadata now reads"version": "1.18.8".versions.eachmatches the format of the existinggraphqlexception, so it is covered by the samenext if version.nil?safety net whenmaven_stable_releasecannot resolve.Fixes #17355
Status: draft until CI is green.