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

Remove jClouds shading

    XMLWordPrintable

    Details

    • Similar Issues:

      Attachments

        Issue Links

          Activity

          Hide
          jglick Jesse Glick added a comment -

          We are not actually depending on the wrapper plugin currently—we are depending on the shaded JAR, meaning we are bundling our own copy of jclouds. It is a mess.

          Show
          jglick Jesse Glick added a comment - We are not actually depending on the wrapper plugin currently—we are depending on the shaded JAR, meaning we are bundling our own copy of jclouds. It is a mess.
          Hide
          jglick Jesse Glick added a comment -

          At least in tests, it does not work to just use Guava 18, since for example NullOutputStream was apparently deleted sometime after 11, and there is code in Jenkins which uses it.

          Show
          jglick Jesse Glick added a comment - At least in tests, it does not work to just use Guava 18, since for example NullOutputStream was apparently deleted sometime after 11, and there is code in Jenkins which uses it.
          Hide
          jglick Jesse Glick added a comment -

          Wanted to test how changes to jclouds affect the plugin, but found it impossible to get a usable version of Guava in the test classpath.

          Show
          jglick Jesse Glick added a comment - Wanted to test how changes to jclouds affect the plugin, but found it impossible to get a usable version of Guava in the test classpath.
          Hide
          jglick Jesse Glick added a comment -

          Not clear this is feasible. Even the trunk version of jclouds depends on Guice 3, whereas Jenkins core uses 4; and if you try to use 4 from the plugin, you get

          java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Maps
          	at com.google.inject.assistedinject.BindingCollector.<init>(BindingCollector.java:34)
          	at com.google.inject.assistedinject.FactoryModuleBuilder.<init>(FactoryModuleBuilder.java:206)
          	at org.jclouds.rest.config.RestModule.configure(RestModule.java:59)
          	at org.jclouds.rest.config.HttpApiModule.configure(HttpApiModule.java:53)
          	at org.jclouds.s3.config.S3HttpApiModule.configure(S3HttpApiModule.java:169)
          	at org.jclouds.aws.s3.config.AWSS3HttpApiModule.configure(AWSS3HttpApiModule.java:56)
          	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
          	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
          	at com.google.inject.spi.Elements.getElements(Elements.java:110)
          	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
          	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
          	at com.google.inject.Guice.createInjector(Guice.java:96)
          	at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:405)
          	at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:328)
          	at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:615)
          	at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:595)
          	at io.jenkins.plugins.artifact_manager_s3.S3BlobStore.getContext(S3BlobStore.java:125)
          	at …
          

          in tests. Now theoretically, since we are using pluginFirstClassLoader, we could use Guice 3 internally (probably there are no important points where Guice “leaks” out of the core API surface). But then we would need something like JENKINS-41827.

          Show
          jglick Jesse Glick added a comment - Not clear this is feasible. Even the trunk version of jclouds depends on Guice 3, whereas Jenkins core uses 4; and if you try to use 4 from the plugin, you get java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Maps at com.google.inject.assistedinject.BindingCollector.<init>(BindingCollector.java:34) at com.google.inject.assistedinject.FactoryModuleBuilder.<init>(FactoryModuleBuilder.java:206) at org.jclouds.rest.config.RestModule.configure(RestModule.java:59) at org.jclouds.rest.config.HttpApiModule.configure(HttpApiModule.java:53) at org.jclouds.s3.config.S3HttpApiModule.configure(S3HttpApiModule.java:169) at org.jclouds.aws.s3.config.AWSS3HttpApiModule.configure(AWSS3HttpApiModule.java:56) at com.google.inject.AbstractModule.configure(AbstractModule.java:62) at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340) at com.google.inject.spi.Elements.getElements(Elements.java:110) at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104) at com.google.inject.Guice.createInjector(Guice.java:96) at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:405) at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:328) at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:615) at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:595) at io.jenkins.plugins.artifact_manager_s3.S3BlobStore.getContext(S3BlobStore.java:125) at … in tests. Now theoretically, since we are using pluginFirstClassLoader , we could use Guice 3 internally (probably there are no important points where Guice “leaks” out of the core API surface). But then we would need something like JENKINS-41827 .
          Hide
          jglick Jesse Glick added a comment -

          First of all, there is no reason to use the jclouds-plugin packaging. We were not depending on the Jenkins plugin, which would have allowed us to share library classes—the plugin also contains all kinds of other features we do not want. And it still has no release of jclouds 2.1.0, which we may as well use.

          So then the two major issues are Guice and Guava. Guice actually seems to not be a problem: as of JCLOUDS-962, while jclouds builds against Guice 3, it deliberately supports use of Guice 4 at runtime. We do need to specify a compatible version of guice-assistedinject.

          Guava is nastier. There is a hard dependency on Guava 12 (at least) from some parts of jclouds, so we cannot pick up the 11 that Jenkins core provides. Therefore we must use plugin-first class loading or maskClasses and bundle Guava, preferably the version from jclouds.

          Show
          jglick Jesse Glick added a comment - First of all, there is no reason to use the jclouds-plugin packaging. We were not depending on the Jenkins plugin, which would have allowed us to share library classes—the plugin also contains all kinds of other features we do not want. And it still has no release of jclouds 2.1.0, which we may as well use. So then the two major issues are Guice and Guava. Guice actually seems to not be a problem: as of JCLOUDS-962, while jclouds builds against Guice 3, it deliberately supports use of Guice 4 at runtime. We do need to specify a compatible version of guice-assistedinject . Guava is nastier. There is a hard dependency on Guava 12 (at least) from some parts of jclouds, so we cannot pick up the 11 that Jenkins core provides. Therefore we must use plugin-first class loading or maskClasses and bundle Guava, preferably the version from jclouds.
          Hide
          jglick Jesse Glick added a comment -

          Then there is another problem: NullOutputStream, present only in Guava 11 (marked beta and subsequently deleted), which is used from ArgumentsActionImpl at least.

          Show
          jglick Jesse Glick added a comment - Then there is another problem: NullOutputStream , present only in Guava 11 (marked beta and subsequently deleted), which is used from ArgumentsActionImpl at least.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          pom.xml
          src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java
          src/test/java/io/jenkins/plugins/artifact_manager_s3/JCloudsVirtualFileTest.java
          http://jenkins-ci.org/commit/artifact-manager-s3-plugin/6bd8d8b568a9a7f8a2adeb25462bd04e28449d00
          Log:
          JENKINS-50520 Stop shading jclouds, update to 2.1.0, fix Guice & Guava issues.

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java src/test/java/io/jenkins/plugins/artifact_manager_s3/JCloudsVirtualFileTest.java http://jenkins-ci.org/commit/artifact-manager-s3-plugin/6bd8d8b568a9a7f8a2adeb25462bd04e28449d00 Log: JENKINS-50520 Stop shading jclouds, update to 2.1.0, fix Guice & Guava issues. * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Carlos Sanchez
          Path:
          pom.xml
          src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java
          src/test/java/io/jenkins/plugins/artifact_manager_jclouds/NetworkTest.java
          http://jenkins-ci.org/commit/artifact-manager-s3-plugin/0d2d1838396d5bf51e64925b0f3321896302a92f
          Log:
          Merge pull request #44 from jenkinsci/jclouds-JENKINS-50520

          JENKINS-50520 Stop shading jclouds, update to 2.1.0, fix Guice & Guava issues

          Compare: https://github.com/jenkinsci/artifact-manager-s3-plugin/compare/96bec2dee56d...0d2d1838396d
          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: pom.xml src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java src/test/java/io/jenkins/plugins/artifact_manager_jclouds/NetworkTest.java http://jenkins-ci.org/commit/artifact-manager-s3-plugin/0d2d1838396d5bf51e64925b0f3321896302a92f Log: Merge pull request #44 from jenkinsci/jclouds- JENKINS-50520 JENKINS-50520 Stop shading jclouds, update to 2.1.0, fix Guice & Guava issues Compare: https://github.com/jenkinsci/artifact-manager-s3-plugin/compare/96bec2dee56d...0d2d1838396d * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: