Skip to content

deps(deps): bump okhttp.version from 4.12.0 to 5.4.0 in /sdks/java - #291

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/maven/sdks/java/okhttp.version-5.4.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/maven/sdks/java/okhttp.version-5.4.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Bumps okhttp.version from 4.12.0 to 5.4.0.
Updates com.squareup.okhttp3:okhttp from 4.12.0 to 5.4.0

Changelog

Sourced from com.squareup.okhttp3:okhttp's changelog.

Version 5.4.0

2026-06-08

  • New: Add superpowers to interceptors. Interceptors can now override anything settable on OkHttpClient.Builder, such as the cache, connection pool, socket factory, and DNS. We expect this will allow most users to use interceptors everywhere, insted of mixing and matching interceptors with custom Call.Factory wrappers.
  • Fix: Limit each HTTP/2 response to 256 KiB of total headers.
  • Upgrade: [kotlinx.coroutines 1.11.0][coroutines_1_11_0]. This is used by the optional okhttp-coroutines artifact.
  • Upgrade: [GraalVM 25.0.3][graalvm_25].
  • Upgrade: [Okio 3.17.0][okio_3_17_0].

Version 5.3.2

2025-11-18

  • Fix: Don't delay triggering timeouts. In Okio 3.16.0 we introduced a regression that caused timeouts to fire later than they were supposed to.

  • Upgrade: [Okio 3.16.4][okio_3_16_4].

Version 5.3.1

2025-11-16

This release is the same as 5.3.0. Okio 3.16.3 didn't have a necessary fix!

  • Upgrade: [Okio 3.16.3][okio_3_16_3].

Version 5.3.0

2025-10-30

  • New: Add tags to Call, including computable tags. Use this to attach application-specific metadata to a Call in an EventListener or Interceptor. The tag can be read in any other EventListener or Interceptor.

      override fun intercept(chain: Interceptor.Chain): Response {
        chain.call().tag(MyAnalyticsTag::class) {
          MyAnalyticsTag(...)
        }
    return chain.proceed(chain.request())
    
    }

... (truncated)

Commits

Updates com.squareup.okhttp3:mockwebserver from 4.12.0 to 5.4.0

Changelog

Sourced from com.squareup.okhttp3:mockwebserver's changelog.

Version 5.4.0

2026-06-08

  • New: Add superpowers to interceptors. Interceptors can now override anything settable on OkHttpClient.Builder, such as the cache, connection pool, socket factory, and DNS. We expect this will allow most users to use interceptors everywhere, insted of mixing and matching interceptors with custom Call.Factory wrappers.
  • Fix: Limit each HTTP/2 response to 256 KiB of total headers.
  • Upgrade: [kotlinx.coroutines 1.11.0][coroutines_1_11_0]. This is used by the optional okhttp-coroutines artifact.
  • Upgrade: [GraalVM 25.0.3][graalvm_25].
  • Upgrade: [Okio 3.17.0][okio_3_17_0].

Version 5.3.2

2025-11-18

  • Fix: Don't delay triggering timeouts. In Okio 3.16.0 we introduced a regression that caused timeouts to fire later than they were supposed to.

  • Upgrade: [Okio 3.16.4][okio_3_16_4].

Version 5.3.1

2025-11-16

This release is the same as 5.3.0. Okio 3.16.3 didn't have a necessary fix!

  • Upgrade: [Okio 3.16.3][okio_3_16_3].

Version 5.3.0

2025-10-30

  • New: Add tags to Call, including computable tags. Use this to attach application-specific metadata to a Call in an EventListener or Interceptor. The tag can be read in any other EventListener or Interceptor.

      override fun intercept(chain: Interceptor.Chain): Response {
        chain.call().tag(MyAnalyticsTag::class) {
          MyAnalyticsTag(...)
        }
    return chain.proceed(chain.request())
    
    }

... (truncated)

Commits

@dependabot dependabot Bot added automerge Eligible for Dependabot auto-merge (minor/patch, CI green) dependencies Dependency updates (Dependabot) java Pull requests that update java code labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

6 similar comments
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:okhttp, com.squareup.okhttp3:mockwebserver
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@dependabot
dependabot Bot force-pushed the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch from e4f405d to d265f78 Compare August 3, 2026 20:24
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:mockwebserver, com.squareup.okhttp3:okhttp
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@dependabot
dependabot Bot force-pushed the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch from d265f78 to b8db0fc Compare August 3, 2026 20:32
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:mockwebserver, com.squareup.okhttp3:okhttp
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@dependabot
dependabot Bot force-pushed the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch from b8db0fc to f025a60 Compare August 3, 2026 21:08
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:mockwebserver, com.squareup.okhttp3:okhttp
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@dependabot
dependabot Bot force-pushed the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch from f025a60 to 19fd087 Compare August 3, 2026 21:15
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:mockwebserver, com.squareup.okhttp3:okhttp
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@dependabot
dependabot Bot force-pushed the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch from 19fd087 to c0eb998 Compare August 3, 2026 21:21
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:mockwebserver, com.squareup.okhttp3:okhttp
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

Bumps `okhttp.version` from 4.12.0 to 5.4.0.

Updates `com.squareup.okhttp3:okhttp` from 4.12.0 to 5.4.0
- [Changelog](https://github.com/lysine-dev/okhttp/blob/main/CHANGELOG.md)
- [Commits](lysine-dev/okhttp@parent-4.12.0...parent-5.4.0)

Updates `com.squareup.okhttp3:mockwebserver` from 4.12.0 to 5.4.0
- [Changelog](https://github.com/lysine-dev/okhttp/blob/main/CHANGELOG.md)
- [Commits](lysine-dev/okhttp@parent-4.12.0...parent-5.4.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:mockwebserver
  dependency-version: 5.4.0
  dependency-type: direct:development
  update-type: version-update:semver-major
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-version: 5.4.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch from c0eb998 to 416d62b Compare August 3, 2026 23:42
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Major version update detected

This PR contains a major version update that requires manual review.

Dependency: com.squareup.okhttp3:mockwebserver, com.squareup.okhttp3:okhttp
Update Type: version-update:semver-major
Previous Version: 4.12.0
New Version: 5.4.0

Please review the changelog and breaking changes before merging.

@scttfrdmn

Copy link
Copy Markdown
Owner

Now testable, and it fails — but for a fixable reason, with a one-line fix

Until #327 merged, nothing in this repository had ever run Maven, so this bump could not be assessed: the Java SDK did not compile at all. It now compiles, its 17 tests run, and mvn -B test is a CI step. So here is the measurement.

As proposed, this PR breaks compilation completely. mvn test on okhttp.version 5.4.0:

[ERROR] ObjectFSClient.java:[8,8] package okhttp3 does not exist
[ERROR] ObjectFSClient.java:[276,33] package Request does not exist
[ERROR] ObjectFSClient.java:[282,32] cannot find symbol   (Response)
[ERROR] ObjectFSClient.java:[301,9]  cannot find symbol   (RequestBody, MediaType)

Every core OkHttp type disappears. That looks like a sweeping API break, and it is not one.

The actual cause: OkHttp 5 splits the artifact, and the JVM half is not what okhttp gives you

OkHttp 5 went multiplatform. com.squareup.okhttp3:okhttp is now a stub with no JVM classes in it — verified by counting them:

$ unzip -l ~/.m2/.../okhttp/5.4.0/okhttp-5.4.0.jar | grep -c '\.class'
0
$ unzip -l ~/.m2/.../okhttp-jvm/5.4.0/okhttp-jvm-5.4.0.jar | grep 'okhttp3/Request.class'
    12356  okhttp3/Request.class

Zero class files in the artifact this pom.xml depends on. The real classes live in okhttp-jvm.

okhttp-jvm is already on the classpath here — but only at test scope, dragged in transitively by mockwebserver. Which is why src/test would have been fine and src/main cannot see okhttp3 at all. A build that failed only in main while the tests' own dependency quietly supplied the missing half is a confusing failure to land on cold.

The fix, verified

Change the artifactId in the main dependency from okhttp to okhttp-jvm (line 68), leaving mockwebserver and the shared ${okhttp.version} property alone:

Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS

No source changes. The 17 tests do real HTTP round-trips against MockWebServer — server.enqueue(new MockResponse().setBody(...).setResponseCode(...)) and RecordedRequest assertions — and OkHttp 5 still ships the legacy okhttp3.mockwebserver package those imports use, so the harness needs nothing either. This is not a vacuous pass.

Recommendation

Merge the version bump together with the artifactId change, not on its own. Dependabot cannot make that second edit — it bumps versions, and this release moved the coordinates — so this PR can never be correct unaided, no matter how many times it is rebased.

Two options:

  1. Close this PR and open one that does both, with the artifact change explained. Cleanest, and the commit message is where the "zero classes in the stub jar" fact belongs so nobody re-derives it.
  2. Push the artifactId change onto this branch, if you would rather keep the Dependabot lineage and its changelog links.

I lean towards (1) — Dependabot will reopen its own bump against okhttp-jvm afterwards and get it right from then on.

Worth noting mockwebserver shares the ${okhttp.version} property, so it moves in lockstep; that is correct and wants keeping. Also note the transitive Kotlin stdlib arrives at 2.1.21 with okio 3.17.0, which is expected for OkHttp 5 (it has been Kotlin-implemented since 4.x) and is not a new dependency class for this SDK.

@scttfrdmn

Copy link
Copy Markdown
Owner

Closing in favour of #333, which does the same bump plus the one edit this PR structurally cannot make.

com.squareup.okhttp3:okhttp:5.4.0 contains zero .class files — OkHttp 5 went multiplatform and moved the JVM classes to com.squareup.okhttp3:okhttp-jvm (330 classes). So bumping the version while keeping the old coordinates compiles nothing:

$ unzip -l ~/.m2/.../okhttp-5.4.0.jar     | grep -c '\.class'   ->   0
$ unzip -l ~/.m2/.../okhttp-jvm-5.4.0.jar | grep -c '\.class'   -> 330

Not a rebase problem. Dependabot bumps versions, and this release moved the coordinates, so no number of rebases produces a working commit — the artifactId change has to be in the same commit as the version.

Two things made this look like a sweeping API break rather than a renamed artifact:

@scttfrdmn scttfrdmn closed this Aug 4, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/maven/sdks/java/okhttp.version-5.4.0 branch August 4, 2026 00:13
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
…t has the classes

OkHttp 5 went multiplatform and split the artifact. `com.squareup.okhttp3:okhttp:5.4.0` is a
stub: `unzip -l okhttp-5.4.0.jar | grep -c '\.class'` returns 0. The JVM classes moved to
`com.squareup.okhttp3:okhttp-jvm`, which has 330.

So the version bump alone cannot work — it fails `src/main` with `package okhttp3 does not
exist`, which reads like a sweeping API break rather than a renamed artifact. Two things hid
what was really going on:

  - `src/test` compiles either way. `mockwebserver` depends on `okhttp-jvm` transitively, so
    the classes were already on the test classpath; only `compile` scope was missing them.
  - the error names the package, not the artifact, so the obvious next move is to go looking
    for renamed OkHttp APIs. There are none to find. No source file changes in this commit,
    and all 17 tests pass unmodified.

This is why #291 could never be merged as opened, and why rebasing it would not have helped:
Dependabot bumps versions, and this release moved the coordinates. The two edits have to be in
one commit or neither is correct — which is a shape worth recognising the next time a major
"breaks the build" in a way no upgrade guide explains.

Verified:
  $ unzip -l ~/.m2/.../okhttp-5.4.0.jar     | grep -c '\.class'   ->   0
  $ unzip -l ~/.m2/.../okhttp-jvm-5.4.0.jar | grep -c '\.class'   -> 330
  $ mvn -B dependency:tree | grep -i okhttp
    +- com.squareup.okhttp3:okhttp-jvm:jar:5.4.0:compile
    +- com.squareup.okhttp3:mockwebserver:jar:5.4.0:test
  $ mvn -B test
    Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
    BUILD SUCCESS

The `mvn -B test` CI step added in #327 is what turns this class of breakage into a failing
check instead of a silent one; before it, nothing in this repository had ever run Maven.

Closes #291.
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
CHANGELOG conflict only, in two places: #334 added its docs-site and codeql-v4
entries to the same 'Fixed' section this branch adds #291 to, and a reference
link definition adjacent to this branch's. Both sides kept.
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
…t has the classes (#333)

OkHttp 5 went multiplatform and split the artifact. `com.squareup.okhttp3:okhttp:5.4.0` is a
stub: `unzip -l okhttp-5.4.0.jar | grep -c '\.class'` returns 0. The JVM classes moved to
`com.squareup.okhttp3:okhttp-jvm`, which has 330.

So the version bump alone cannot work — it fails `src/main` with `package okhttp3 does not
exist`, which reads like a sweeping API break rather than a renamed artifact. Two things hid
what was really going on:

  - `src/test` compiles either way. `mockwebserver` depends on `okhttp-jvm` transitively, so
    the classes were already on the test classpath; only `compile` scope was missing them.
  - the error names the package, not the artifact, so the obvious next move is to go looking
    for renamed OkHttp APIs. There are none to find. No source file changes in this commit,
    and all 17 tests pass unmodified.

This is why #291 could never be merged as opened, and why rebasing it would not have helped:
Dependabot bumps versions, and this release moved the coordinates. The two edits have to be in
one commit or neither is correct — which is a shape worth recognising the next time a major
"breaks the build" in a way no upgrade guide explains.

Verified:
  $ unzip -l ~/.m2/.../okhttp-5.4.0.jar     | grep -c '\.class'   ->   0
  $ unzip -l ~/.m2/.../okhttp-jvm-5.4.0.jar | grep -c '\.class'   -> 330
  $ mvn -B dependency:tree | grep -i okhttp
    +- com.squareup.okhttp3:okhttp-jvm:jar:5.4.0:compile
    +- com.squareup.okhttp3:mockwebserver:jar:5.4.0:test
  $ mvn -B test
    Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
    BUILD SUCCESS

The `mvn -B test` CI step added in #327 is what turns this class of breakage into a failing
check instead of a silent one; before it, nothing in this repository had ever run Maven.

Closes #291.
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
CHANGELOG conflict only, third time: #291 (okhttp) and the docs-platform
lockfile both landed entries in the same 'Fixed' section this branch adds #309
to. All kept, in main's order.
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
CHANGELOG conflict only: #309 and #291 landed entries in the same 'Fixed'
section this branch adds its #214 entry to. All three kept, in main's order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Eligible for Dependabot auto-merge (minor/patch, CI green) dependencies Dependency updates (Dependabot) java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant