The latest OkHttp (v2.7.5) is over three years old. The web has come a long way. There are a significant number of Jenkins JIRA and Zendesk issues related to using this ancient library in key plugins.
We should upgrade Jenkins to use OkHttp3.
- OkHttp 2.x and 3.x exist in separate packages and can run side-by-side without conflict. However, different versions of 3.x (and okhttp3 4.x) may be incompatible if clients are using obsolete classes/methods.
- OkHttp 3.12.2 is the last version that is reasonably compatible with 2.7.5. Upgrading will require some changes but not huge ones.
- OkHttp 3.13.1 has some notable incompatibilities with 2.7.5, but also some better defaults.
- OkHttp 3.14.1 removes OkHttpUrlFactory which is a serious version-incompatible API change for several plugins. The github-api library pulled in a shim that provides a workaround OkHttpUrlFactory.
Early exploration of this upgrade was started to test whether it would address issues such as
Finding so far while using 3.12.2:
- okio v2.2.x is needed for okhttp3.
- Some special class loading settings are needed to get the right versions okhttp3 and okio to be loaded.
(Last updated May 4, 2020):
The rebuilt incremental can be found at:
This version uses okhttp3 and is compatible with github-api-plugin 1.110+.