Skip to content

build: Use wire-runtime-jvm 6.3.0 in all profiles (5.x.x) - #1424

Open
ZPascal wants to merge 1 commit into
cloudfoundry:5.x.xfrom
ZPascal:wire-runtime-6.3.0-5.x.x
Open

ZPascal wants to merge 1 commit into
cloudfoundry:5.x.xfrom
ZPascal:wire-runtime-6.3.0-5.x.x

Conversation

@ZPascal

@ZPascal ZPascal commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Fixes GHSA-pwf9-q62p-v7wc (Wire: uncontrolled recursion on nested groups, fixed in 5.2.0) on 5.x.x. This was split out of #1423.

Why

The published 5.x.x artifacts are built with the default Java 8 profile, which still used wire-runtime 3.7.1. Only the JDK 17/21 profiles, which only run in CI, used a newer wire-runtime-jvm. The Dependabot alert shows as fixed only because Dependabot scans main.

Changes

  • wire-runtime-jvm 6.3.0 in all profiles: 6.3.0 and its okio-jvm 3.17.0 are compiled for Java 8, so the default profile can use it too. The per-profile Wire overrides and the wire.suffix switch are removed, so CI and the published artifacts use the same Wire version.
  • kotlin-bom 2.0.21: Wire needs a Kotlin 2 stdlib, but Spring Boot 2.7's BOM would pin kotlin-stdlib to 1.6.21. It's imported before spring-boot-dependencies, so its version wins.

Testing

  • Default profile (JDK 11, target 1.8): cloudfoundry-client, -util, -reactor and -operations build, and their unit tests pass. The resolved dependencies are wire-runtime-jvm 6.3.0, okio-jvm 3.17.0 and kotlin-stdlib 2.0.21.
  • jdk-21 profile: cloudfoundry-client and -reactor build, and their unit tests pass.

@Kehrlann Kehrlann left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, that's better. Can you please research a bit Jackson 2.x compatiblity with Kotlin 2.x ?

In general we don't really need boot dependencies, IIRC we only Boot dependencies for:

  1. jackson (which you replaced with the jackson bom in #1423)
  2. Reactor imported deps
  3. Spring Framework for some utils (I think URL utils?)
  4. Testing libs
  5. Integration test apps

We could drop the boot dependency management entirely in main, and just pin deps ourselves.

The default Java 8 profile still shipped wire-runtime 3.7.1, which is
affected by GHSA-pwf9-q62p-v7wc (uncontrolled recursion on nested
groups, fixed in 5.2.0). Since the published 5.x.x artifacts are built
with that profile, the fix has to land there, not only in the JDK 17/21
profiles used in CI.

wire-runtime-jvm 6.3.0 (and its okio-jvm 3.17.0) is compiled for Java 8,
so every profile now uses the same Wire version and the per-profile
wire overrides and the wire.suffix switch are gone.

Wire needs a Kotlin 2 stdlib, but Spring Boot 2.7's BOM pins
kotlin-stdlib to 1.6.21. kotlin-bom 2.0.21 is imported ahead of
spring-boot-dependencies so its version wins.
@ZPascal
ZPascal force-pushed the wire-runtime-6.3.0-5.x.x branch from dd83cab to 4cce6e8 Compare November 30, 2026 16:43
@ZPascal

ZPascal commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks! I rebased on 5.x.x now that #1423 is merged. Both jackson-bom and kotlin-bom are imported before the Boot BOM.

About Jackson and Kotlin: they don't really touch each other in our case. Only jackson-module-kotlin depends on Kotlin and we don't use it. Everything we pull in (core, databind, annotations, datatype-jdk8, jjwt-jackson) is plain Java. And if we ever need the Kotlin module, 2.21 is built against Kotlin 2.1 anyway. I ran the unit tests on the rebased branch with Jackson 2.21.7, Wire 6.3.0 and kotlin-stdlib 2.0.21 and everything passed.

About dropping the Boot dependency management: I agree, and your list matches what I found. The only Spring code we use outside of tests is UriComponentsBuilder in cloudfoundry-client-reactor. I gave it a quick try on main and noticed a few things:

  • mockito.version, junit-jupiter.version and snakeyaml.version in the root pom aren't used anywhere. Boot 3.2.1 decides those versions, so we actually get Mockito 5.7.0, JUnit 5.10.1 and SnakeYAML 2.2. Same for Reactor, reactor-netty, Netty and Spring, which are all still on the Boot 3.2.1 versions.
  • main has the same Kotlin problem as 5.x.x had. Wire is on 6.3.0 there, but Boot pins kotlin-stdlib to 1.9.21.
  • Just removing the Boot BOM isn't enough. Netty and byte-buddy go back to older versions and Kotlin gets mixed up, so we'd also need netty-bom, kotlin-bom and a byte-buddy pin next to reactor-bom, spring-framework-bom and junit-bom.

So my idea for main would be:

  1. A small PR that adds kotlin-bom and removes the unused properties.
  2. A separate PR that replaces the Boot BOM with the BOMs above plus a few pins. Boot would only stay in test-service-broker and test-log-cache.
  3. Move dependabot.yml to main with entries for main and 5.x.x. Dependabot only reads the config from the default branch, so the one on 5.x.x doesn't do anything right now.

What do you think @Kehrlann ?

This branch has not been deployed

No deployments
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.

3 participants