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

Upgrade Guava or properly isolate core Guava dependency from plugins

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      For a while, we could use a newer version of Guava in a plugin than in core - see, for example, jclouds plugin version 2.5, which uses Mask-Classes on the manifestEntries for maven-hpi-plugin to mask com.google.common. That worked fine with core's Guava 11.0 and jclouds' Guava 14.0.1. But moving to a newer jclouds version, with a dependency on Guava 15.0, made things go horribly wrong. I don't remember off the top of my head exactly what went wrong, but I'll reproduce that and add the relevant logs as attachments here. What finally fixed things there was moving to a shaded Guava jar and depending on that - see the state of the code as of here.

      Given that context...I know people are still hitting problems due to Guava incompatibilities - anything with a newer Guava version could fail horribly due to API methods that have since been removed being called by Jenkins itself and borking due to the newer Guava being in the classpath. So something needs to be done here - either better isolation of Guava (either as part of a general improvement to classloader isolation or possibly a more Guava-specific solution) or upgrading Guava...though upgrading Guava means breaking plugins that use/depend on Guava. So...not simple. But some solution is needed eventually.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Probably best to tackle JENKINS-30685.

            Show
            danielbeck Daniel Beck added a comment - Probably best to tackle JENKINS-30685 .
            Hide
            jglick Jesse Glick added a comment -

            See artifact-manager-s3 #83 for an example (again based on the jclouds library, but not using jclouds-plugin) of a case where the bundled Guava made it impossible to do an otherwise straightforward refactoring.

            Show
            jglick Jesse Glick added a comment - See artifact-manager-s3 #83 for an example (again based on the jclouds library, but not using jclouds-plugin ) of a case where the bundled Guava made it impossible to do an otherwise straightforward refactoring.

              People

              • Assignee:
                Unassigned
                Reporter:
                abayer Andrew Bayer
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: