Skip to content

Commit

Permalink
[fix] Downgrade okhttp 3.14.0 -> 3.13.1 to avoid UnrepeatableRequestB…
Browse files Browse the repository at this point in the history
…ody NoSuchMethodErrors (#1039)

## Before this PR

#1026 (which went into 4.20.1) inadvertently brought in a bump in okhttp to 3.14.0.
One of our internal libraries relied on `UnrepeatableRequestBody` which got removed in github.com/square/okhttp/pull/4676, and a solution using `RequestBody#isOneShot` couldn't be made that exhibits the previous behaviour.

## After this PR

Downgrading okhttp to 3.13.1, and adding a constraint to prevent accidental upgrades to 3.14.0 for the time being.
  • Loading branch information
dansanduleac authored and bulldozer-bot[bot] committed Apr 3, 2019
1 parent b264662 commit 976e917
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ allprojects {
version { strictly '2.4.0' }
because 'Retrofit 2.5.0 breaks with our path parameter routing logic'
}

rootConfiguration 'com.squareup.okhttp3:okhttp', {
version { strictly '[3, 3.14.0[' }
because 'okhttp 3.14.0 removed UnrepeatableRequestBody which is relied on by an internal library'
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ include 'keystores'
include 'okhttp-clients'
include 'pkcs1-reader-bouncy-castle'
include 'pkcs1-reader-sun'

12 changes: 6 additions & 6 deletions versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ com.palantir.conjure.java.api:ssl-config:2.2.0 (2 constraints: 2f1b9d65)
com.palantir.safe-logging:preconditions:1.8.2 (4 constraints: 7137b1e6)
com.palantir.safe-logging:safe-logging:1.8.2 (6 constraints: 085996cf)
com.palantir.tokens:auth-tokens:3.3.0 (1 constraints: 9012f21d)
com.palantir.tracing:tracing:2.10.0 (2 constraints: 4e1f60ec)
com.palantir.tracing:tracing-api:2.10.0 (3 constraints: 182c788e)
com.palantir.tracing:tracing-jersey:2.10.0 (1 constraints: d108c286)
com.palantir.tracing:tracing-okhttp3:2.10.0 (1 constraints: d108c286)
com.palantir.tracing:tracing:2.10.1 (2 constraints: 501f90ec)
com.palantir.tracing:tracing-api:2.10.1 (3 constraints: 1b2c048f)
com.palantir.tracing:tracing-jersey:2.10.1 (1 constraints: d208c486)
com.palantir.tracing:tracing-okhttp3:2.10.1 (1 constraints: d208c486)
com.palantir.tritium:tritium-registry:0.11.2 (1 constraints: 3605283b)
com.squareup.okhttp3:logging-interceptor:3.14.0 (1 constraints: d608d786)
com.squareup.okhttp3:okhttp:3.14.0 (5 constraints: b3456615)
com.squareup.okhttp3:logging-interceptor:3.13.1 (1 constraints: d608d786)
com.squareup.okhttp3:okhttp:3.13.1 (5 constraints: ba4da3d8)
com.squareup.okio:okio:1.17.2 (1 constraints: 850cc309)
com.squareup.retrofit2:converter-jackson:2.4.0 (1 constraints: a408487e)
com.squareup.retrofit2:retrofit:2.4.0 (2 constraints: e720a046)
Expand Down
6 changes: 4 additions & 2 deletions versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ com.palantir.conjure.java:conjure-lib = 3.1.0
com.palantir.conjure.java.api:* = 2.2.0
com.palantir.conjure.verification:* = 0.16.6
com.palantir.safe-logging:* = 1.7.0
com.palantir.tracing:* = 2.10.0
com.palantir.tracing:* = 2.10.1
com.palantir.tritium:tritium-registry = 0.11.2
com.squareup.okhttp3:* = 3.13.1
io.dropwizard:dropwizard-* = 1.3.7
io.reactivex.rxjava2:rxjava = 2.2.8
javax.ws.rs:javax.ws.rs-api = 2.1
Expand All @@ -30,6 +29,9 @@ org.slf4j:slf4j-api = 1.7.12

# dependency-upgrader:OFF

# Temporarily pausing until internal libraries stop relying on UnrepeatableRequestBody
com.squareup.okhttp3:* = 3.13.1

# We cannot upgrade retrofit2 to 2.5.0 because of https://github.com/palantir/conjure-java-runtime/issues/930
com.squareup.retrofit2:* = 2.4.0

Expand Down

0 comments on commit 976e917

Please sign in to comment.