Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57411

Upgrade github-branch-source-plugin to use okhttp3

    Details

    • Similar Issues:

      Description

      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.

      NOTES:

      • OkHttp 2.x and 3.x exist and separate packages and can run side-by-side without conflict. However, different versions of 3.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 UrlFactory which is a serious version-incompatible API change for several plugins.

      Early exploration of this upgrade was started to test whether it would address issues such ass JENKINS-54126.

      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 29, 2019):
      Please give this version of the plugin a try: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/github-branch-source/2.5.7-rc892.e46ec862f6f7/

        Attachments

          Issue Links

            Activity

            Hide
            bitwiseman Liam Newman added a comment -

            Josh Soref

            we are seeing that the periodic scans don't seem to be running periodically, and a branch whose name has been recycled (but for whom we'd expect github to send a notification) isn't being noticed automatically.

            We are able to use "Scan Repository Now" to pick up those branches, which feels like progress.

            Yeah, that's better than nothing.

            Take a look at the Events log for the org/repo to see if there are errors. Otherwise, errors might only show in the Jenkins Master's console log output.

            Show
            bitwiseman Liam Newman added a comment - Josh Soref we are seeing that the periodic scans don't seem to be running periodically, and a branch whose name has been recycled (but for whom we'd expect github to send a notification) isn't being noticed automatically. We are able to use "Scan Repository Now" to pick up those branches, which feels like progress. Yeah, that's better than nothing. Take a look at the Events log for the org/repo to see if there are errors. Otherwise, errors might only show in the Jenkins Master's console log output.
            Hide
            jsoref Josh Soref added a comment -

            There wasn't anything obvious in the scan repository logs. I'll check the master log…

            Show
            jsoref Josh Soref added a comment - There wasn't anything obvious in the scan repository logs. I'll check the master log…
            Hide
            bitwiseman Liam Newman added a comment -

            Josh Soref
            Cool thanks.

            I'm really not sure what would the periodic scans to not run.

            Show
            bitwiseman Liam Newman added a comment - Josh Soref Cool thanks. I'm really not sure what would the periodic scans to not run.
            Hide
            bitwiseman Liam Newman added a comment -

            Josh Soref
            I'm pretty sure the periodic scans not running are unrelated. I've updated the patched plugin to include the latest fixes (see the description).

            Show
            bitwiseman Liam Newman added a comment - Josh Soref I'm pretty sure the periodic scans not running are unrelated. I've updated the patched plugin to include the latest fixes (see the description).

              People

              • Assignee:
                Unassigned
                Reporter:
                bitwiseman Liam Newman
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: