You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[java] add test to ensure shipped bytecode supports Java 11 - #18166
Regressed from [build] Automated Dependency Update #18082 (automated update bumped fabric8 from 7.9.0 to 8.0.0, which ships Java 17 bytecode; released in 4.50.0 and 4.51.0)
💥 What does this PR do?
Restores Java 11 support for selenium-node-kubernetes by pinning fabric8 back to 7.9.0
Adds //java:bytecode-version-test, which fails when anything Selenium ships, including third-party jars, contains classes newer than Java 11
🔧 Implementation Notes
Nothing caught this because --release 11 only checks our own sources against the Java 11 API, javac ignores the class version of jars on the classpath, and all Java tests run on JDK 25
The test scans the runtime jars of the published java_exports (what Maven users resolve) plus the server deploy jar, so compiler plugins like NullAway (Java 17) and test-only jars aren't flagged
module-info.class and META-INF/versions/** are skipped because multi-release entries target newer Java by design (byte-buddy, Bouncy Castle and reactor-core would fail otherwise)
java:update and Renovate now cap fabric8 below 8, matching the existing byte-buddy and graphql caps
The Kubernetes export declares jackson-core and jackson-databind at the Jackson BOM's version (2.22.3), so its POM overrides the 2.21.4 that fabric8 7.9.0 brings in, which has known advisories; this comes out with the fabric8 cap
🤖 AI assistance
No substantial AI assistance used
AI assisted (complete below)
Tool(s): Claude Code (Claude Opus 5.5)
What was generated: the bytecode check, the fabric8 pin and Jackson override, and this description
I reviewed all AI output and can explain the change
• Pin fabric8 to 7.9.0 to restore Java 11 support for the Kubernetes node.
• Reject shipped jars containing base classes newer than Java 11, including third-party
dependencies.
• Align Kubernetes Jackson dependencies with 2.22.3 and prevent automated fabric8 8.x upgrades.
The following are alternative approaches to this PR:
1. Run compatibility tests on JDK 11
➕ Can catch runtime linkage or API failures that class-file inspection cannot.
➖ Requires JDK 11 CI coverage and representative execution paths; unused incompatible classes may go undetected.
➖ Does not provide the same direct inventory of incompatible shipped jars.
Recommendation: Keep the shipped-artifact bytecode check: it detects the regression directly, including third-party jars that --release 11 does not constrain, without requiring every class to execute. JDK 11 smoke tests would be a useful complement for runtime behavior, not a replacement.
Files changed (11) +599 / -433
Bug fix (1) +5 / -0
BUILD.bazelOverride Kubernetes Jackson runtime dependencies+5/-0
Override Kubernetes Jackson runtime dependencies
• Adds Jackson core and databind as runtime dependencies of the Kubernetes Maven export. This makes the newer selected versions explicit in its published dependency metadata rather than relying on fabric8 7.x's versions.
BUILD.bazelRegister the shipped-bytecode compatibility test+19/-1
Register the shipped-bytecode compatibility test
• Adds '//java:bytecode-version-test' with a Java 11 ceiling. It covers runtime dependencies of the client, Kubernetes node, and JDBC exports, plus the server deploy jar.
bytecode_version_test.bzlBuild a runtime-jar manifest for the bytecode test+57/-0
Build a runtime-jar manifest for the bytecode test
• Adds a rule that lists transitive runtime jars and explicit jars by artifact label and supplies them as test runfiles. Its macro runs the Java scanner with the manifest and maximum Java version.
• Reads jar class headers and fails when base classes exceed the configured Java version, reporting offending jars and example classes. Skips multi-release entries and module descriptors, and fails if an artifact has no classes to check.
MODULE.bazelPin fabric8 7.9.0 and select Jackson 2.22.3+7/-4
Pin fabric8 7.9.0 and select Jackson 2.22.3
• Downgrades the four explicitly requested fabric8 artifacts from 8.0.0 to 7.9.0 for Java 11 compatibility. Adds the Jackson BOM and direct core and databind artifacts so compatible, newer Jackson versions can be selected.
maven_install.jsonRegenerate the Maven dependency lockfile+326/-427
Regenerate the Maven dependency lockfile
• Records fabric8 7.9.0, its changed Vert.x and transitive dependency graph, and Jackson 2.22.3 artifacts. Updates corresponding checksums and dependency metadata.
• Caps fabric8 updates at the latest stable release below 8 while Selenium supports Java 11. Extends the Maven version lookup helper with an optional upper bound.
1. Java 11 regressions can ship unchecked✗ Dismissed
Description
The new bytecode test omits the separately published selenium-manager export from its deps and
does not include it through the server deploy jar. A future manager dependency or class compiled
above Java 11 can therefore be released without this test detecting it, leaving the advertised Java
11 compatibility check incomplete.
The checklist requires focused tests that reliably verify the relevant behavior. The new manifest
rule scans only the explicitly supplied deps and jars, and the PR supplies three dependencies
plus the server deploy jar. The repository publishes selenium-manager as a separate export, while
the server deploy jar's runtime dependencies do not include it, so manager bytecode is outside the
test's coverage.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The bytecode compatibility test only scans three exports plus the server deploy jar, but `selenium-manager` is a separately published Java export and is not included by those inputs. Its classes and runtime dependencies can exceed Java 11 without failing the check.
## Fix Focus Areas
- java/BUILD.bazel[68-72]
- java/src/org/openqa/selenium/manager/BUILD.bazel[4-34]
## Recommended Fix
Add `//java/src/org/openqa/selenium/manager` to the bytecode test inputs, or otherwise construct the test inputs from every published Java export so that all shipped Selenium bytecode and its runtime dependencies are checked against Java 11.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. The bytecode check fails before scanning✗ Dismissed
Description
_bytecode_manifest_impl writes external artifacts using raw file.short_path, while
BytecodeVersionCheck opens each manifest path directly with ZipFile. When the manifest contains
external Maven jars whose paths require runfiles conversion, the test can abort with
NoSuchFileException before checking those jars.
The new manifest rule writes raw file.short_path values, including paths for external
repositories, and supplies the jars through runfiles. The Java checker parses those values as
filesystem paths and passes them directly to ZipFile; existing repository helpers document that
external short paths require runfiles conversion, so external runtime jars can prevent the focused
bytecode test from scanning its inputs.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The bytecode manifest records raw `short_path` values, which can use `../repo/...` for external repositories, while the Java checker opens those paths directly. External Maven jars can therefore cause the test to fail before their bytecode is scanned.
## Fix Focus Areas
- java/private/bytecode_version_test.bzl[4-14]
- java/src/dev/selenium/tools/bytecode/BytecodeVersionCheck.java[72-76]
## Recommended Fix
Convert external repository paths to the corresponding runfiles paths when writing the manifest, or resolve manifest entries through the test runfiles mechanism before opening them. Ensure both workspace-local and external Maven jars are resolved and scanned successfully under Bazel.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
3. Java 11-incompatible overrides pass the check✗ Dismissed
Description
isBaseClass skips every META-INF/versions/ entry, including classes in directories 9 through 11.
If a future dependency places bytecode newer than Java 11 in one of those directories, Java 11 can
select it at runtime while this test reports success.
The test sets its maximum to Java 11. Only entries accepted by isBaseClass reach the class-version
comparison, but the Java 11 JAR specification says its class loader searches versioned directories
from 11 down to 9 before the base entry.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The checker skips multi-release entries that Java 11 can load, allowing incompatible bytecode in versioned directories 9–11 to pass.
## Fix Focus Areas
- java/src/dev/selenium/tools/bytecode/BytecodeVersionCheck.java[106-137]
## Recommended Fix
Inspect versioned class entries whose directory version is no greater than the configured Java maximum; continue excluding entries targeting later Java releases. Add a test jar with an incompatible class under `META-INF/versions/11`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
4. Repin drops Jackson 2 below its security patches✓ Resolved
Description
The repinned lockfile resolves com.fasterxml.jackson.core:jackson-core and the newly added
jackson-databind/jackson-datatype-jsr310/jackson-dataformat-yaml to 2.21.4, and it records a
conflict resolution that moves a requested jackson-core:2.21.5 down to 2.21.4 (before this PR
jackson-core was at 2.21.6). Jackson 2.21.5 fixed several databind CVEs, including the
@JsonIgnoreProperties/@JsonView bypasses and InetAddress DNS resolution, so every Bazel-built
Kubernetes node target and test classpath now runs fabric8 on a known-vulnerable Jackson.
The lockfile diff moves jackson-core from 2.21.6 to 2.21.4 and adds databind at 2.21.4. The
conflict_resolution entry shows a dependency asking for 2.21.5 being resolved down to 2.21.4.
MODULE.bazel has no explicit Jackson pin, so nearest-wins resolution picks the older version. The
Jackson 2.21.5 release notes list the CVE fixes that 2.21.4 does not have.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
After going back to fabric8 7.9.0, Jackson 2 resolves to 2.21.4. That is below the 2.21.5+ security patches, and below the 2.21.6 jackson-core that was pinned before this PR.
## Fix Focus Areas
- MODULE.bazel[211-220]
- java/maven_install.json[505-540]
## Recommended Fix
Add explicit `com.fasterxml.jackson.core:jackson-core`, `jackson-databind`, `jackson-annotations`, `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` and `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` entries at the latest 2.21.x patch (Java 8 bytecode) to `maven.install` artifacts, or use the jackson-bom. Then repin so `maven_install.json` no longer downgrades jackson-core. Run `//java:bytecode-version-test` to confirm the result is still Java 11 compatible.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Context sources
Review mode: Auto: 🧠 Deep: Multiple independent logic paths include scanner, builds, dependencies, tests, and workflow.
Tip of the day
💡 Did you know, you can turn these tips off under Display > Comment parts
1. The bytecode check fails before scanning✗ Dismissed
Description
_bytecode_manifest_impl writes external artifacts using raw file.short_path, while
BytecodeVersionCheck opens each manifest path directly with ZipFile. When the manifest contains
external Maven jars whose paths require runfiles conversion, the test can abort with
NoSuchFileException before checking those jars.
The new manifest rule writes raw file.short_path values, including paths for external
repositories, and supplies the jars through runfiles. The Java checker parses those values as
filesystem paths and passes them directly to ZipFile; existing repository helpers document that
external short paths require runfiles conversion, so external runtime jars can prevent the focused
bytecode test from scanning its inputs.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The bytecode manifest records raw `short_path` values, which can use `../repo/...` for external repositories, while the Java checker opens those paths directly. External Maven jars can therefore cause the test to fail before their bytecode is scanned.
## Fix Focus Areas
- java/private/bytecode_version_test.bzl[4-14]
- java/src/dev/selenium/tools/bytecode/BytecodeVersionCheck.java[72-76]
## Recommended Fix
Convert external repository paths to the corresponding runfiles paths when writing the manifest, or resolve manifest entries through the test runfiles mechanism before opening them. Ensure both workspace-local and external Maven jars are resolved and scanned successfully under Bazel.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. Java 11-incompatible overrides pass the check✗ Dismissed
Description
isBaseClass skips every META-INF/versions/ entry, including classes in directories 9 through 11.
If a future dependency places bytecode newer than Java 11 in one of those directories, Java 11 can
select it at runtime while this test reports success.
The test sets its maximum to Java 11. Only entries accepted by isBaseClass reach the class-version
comparison, but the Java 11 JAR specification says its class loader searches versioned directories
from 11 down to 9 before the base entry.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The checker skips multi-release entries that Java 11 can load, allowing incompatible bytecode in versioned directories 9–11 to pass.
## Fix Focus Areas
- java/src/dev/selenium/tools/bytecode/BytecodeVersionCheck.java[106-137]
## Recommended Fix
Inspect versioned class entries whose directory version is no greater than the configured Java maximum; continue excluding entries targeting later Java releases. Add a test jar with an incompatible class under `META-INF/versions/11`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
3. Repin drops Jackson 2 below its security patches✓ Resolved
Description
The repinned lockfile resolves com.fasterxml.jackson.core:jackson-core and the newly added
jackson-databind/jackson-datatype-jsr310/jackson-dataformat-yaml to 2.21.4, and it records a
conflict resolution that moves a requested jackson-core:2.21.5 down to 2.21.4 (before this PR
jackson-core was at 2.21.6). Jackson 2.21.5 fixed several databind CVEs, including the
@JsonIgnoreProperties/@JsonView bypasses and InetAddress DNS resolution, so every Bazel-built
Kubernetes node target and test classpath now runs fabric8 on a known-vulnerable Jackson.
The lockfile diff moves jackson-core from 2.21.6 to 2.21.4 and adds databind at 2.21.4. The
conflict_resolution entry shows a dependency asking for 2.21.5 being resolved down to 2.21.4.
MODULE.bazel has no explicit Jackson pin, so nearest-wins resolution picks the older version. The
Jackson 2.21.5 release notes list the CVE fixes that 2.21.4 does not have.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
After going back to fabric8 7.9.0, Jackson 2 resolves to 2.21.4. That is below the 2.21.5+ security patches, and below the 2.21.6 jackson-core that was pinned before this PR.
## Fix Focus Areas
- MODULE.bazel[211-220]
- java/maven_install.json[505-540]
## Recommended Fix
Add explicit `com.fasterxml.jackson.core:jackson-core`, `jackson-databind`, `jackson-annotations`, `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` and `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` entries at the latest 2.21.x patch (Java 8 bytecode) to `maven.install` artifacts, or use the jackson-bom. Then repin so `maven_install.json` no longer downgrades jackson-core. Run `//java:bytecode-version-test` to confirm the result is still Java 11 compatible.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
titusfortner
changed the title
[java] restore Java 11 support for selenium-node-kubernetes and check shipped bytecode
[java] add test to ensure shipped bytecode supports Java 11
Oct 13, 2026
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
B-buildIncludes scripting, bazel and CI integrationsB-gridEverything grid and server relatedC-javaJava Bindings
2 participants
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.
🔗 Related Issues
💥 What does this PR do?
selenium-node-kubernetesby pinning fabric8 back to 7.9.0//java:bytecode-version-test, which fails when anything Selenium ships, including third-party jars, contains classes newer than Java 11🔧 Implementation Notes
--release 11only checks our own sources against the Java 11 API, javac ignores the class version of jars on the classpath, and all Java tests run on JDK 25java_exports (what Maven users resolve) plus the server deploy jar, so compiler plugins like NullAway (Java 17) and test-only jars aren't flaggedmodule-info.classandMETA-INF/versions/**are skipped because multi-release entries target newer Java by design (byte-buddy, Bouncy Castle and reactor-core would fail otherwise)java:updateand Renovate now cap fabric8 below 8, matching the existing byte-buddy and graphql capsjackson-coreandjackson-databindat the Jackson BOM's version (2.22.3), so its POM overrides the 2.21.4 that fabric8 7.9.0 brings in, which has known advisories; this comes out with the fabric8 cap🤖 AI assistance
🔄 Types of changes