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

Prepare Gerrit Trigger for core Guava upgrade

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.35.2

      Description

      See JENKINS-65988. Jenkins core is using Guava 11.0.1, which was released on January 9, 2012. Jenkins core would like to upgrade to Guava 30.1.1, which was released on March 19, 2021. Plugins must be prepared to be compatible with both Guava 11.0.1 and Guava 30.1.1 in advance of this core transition.

      Iterators#emptyIterator

      In particular, this plugin has been identified as using the com.google.common.collect.Iterators#emptyIterator method, which existed in Guava 11.0.1 but was removed in later versions.

      To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The general recommendation is to migrate away from Iterators#emptyIterator and rewrite the code to use org.apache.commons.collections.iterators.EmptyIterator from Apache Commons Collections 3.2.2, which is bundled in Jenkins core already.

      Guava's cache

      In particular, this plugin has been identified as using the com.google.common.cache.Cache API, from which some methods have been removed between Guava 11.0.1 and latest.

      To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The recommendation is for plugins to migrate from Guava's cache to Caffeine via the Jenkins Caffeine API plugin.

      For the most part, the migration is a trivial matter of replacing imports of com.google.common.cache.Cache with imports of com.github.benmanes.caffeine.cache.Cache and imports of com.google.common.cache.CacheBuilder with imports of com.github.benmanes.caffeine.cache.Caffeine. For examples of how to do this, see these existing PRs:

        Attachments

          Activity

          basil Basil Crow created issue -
          basil Basil Crow made changes -
          Field Original Value New Value
          Description See JENKINS-65988. Jenkins core is using [Guava 11.0.1|https://github.com/google/guava/releases/tag/v11.0.1], which was released on January 9, 2012. Jenkins core would like to upgrade to [Guava 30.1.1|https://github.com/google/guava/releases/tag/v30.1.1], which was released on March 19, 2021. Plugins must be prepared to be compatible with both Guava 11.0.1 and Guava 30.1.1 in advance of this core transition.

          In particular, this plugin has been identified as using the {{com.google.common.collect.Iterators#emptyIterator}} method, which existed in Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/collect/Iterators.html] but was [removed in later versions|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/Iterators.html].

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The general recommendation is to migrate away from {{Iterators#emptyIterator}} and rewrite the code to use [{{org.apache.commons.collections.iterators.EmptyIterator}}|https://commons.apache.org/proper/commons-collections/javadocs/api-3.2.2/org/apache/commons/collections/iterators/EmptyIterator.html] from Apache Commons Collections 3.2.2, which is bundled in Jenkins core already.
          See JENKINS-65988. Jenkins core is using [Guava 11.0.1|https://github.com/google/guava/releases/tag/v11.0.1], which was released on January 9, 2012. Jenkins core would like to upgrade to [Guava 30.1.1|https://github.com/google/guava/releases/tag/v30.1.1], which was released on March 19, 2021. Plugins must be prepared to be compatible with both Guava 11.0.1 and Guava 30.1.1 in advance of this core transition.

          h3. {{Iterators#emptyIterator}}

          In particular, this plugin has been identified as using the {{com.google.common.collect.Iterators#emptyIterator}} method, which existed in Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/collect/Iterators.html] but was [removed in later versions|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/Iterators.html].

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The general recommendation is to migrate away from {{Iterators#emptyIterator}} and rewrite the code to use [{{org.apache.commons.collections.iterators.EmptyIterator}}|https://commons.apache.org/proper/commons-collections/javadocs/api-3.2.2/org/apache/commons/collections/iterators/EmptyIterator.html] from Apache Commons Collections 3.2.2, which is bundled in Jenkins core already.

          h3. Guava's cache

          In particular, this plugin has been identified as using the {{com.google.common.cache.Cache}} API, which has been removed between Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/cache/Cache.html] and [latest|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/cache/Cache.html]. The removal took place in Guava 12.0.

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The recommendation is for plugins to migrate from Guava's cache to [Caffeine|https://github.com/ben-manes/caffeine] via the Jenkins [Caffeine API|https://plugins.jenkins.io/caffeine-api/] plugin.

          For the most part, the migration is a trivial matter of replacing imports of {{com.google.common.cache.Cache}} with imports of {{com.github.benmanes.caffeine.cache.Cache}} and imports of {{com.google.common.cache.CacheBuilder}} with imports of {{com.github.benmanes.caffeine.cache.Caffeine}}. For examples of how to do this, see these existing PRs:

          * [jenkinsci/active-directory-plugin#109|https://github.com/jenkinsci/active-directory-plugin/pull/109]
          * [jenkinsci/azure-ad-plugin#125|https://github.com/jenkinsci/azure-ad-plugin/pull/125]
          * [jenkinsci/configuration-as-code-plugin#1596|https://github.com/jenkinsci/configuration-as-code-plugin/pull/1596]
          * [jenkinsci/kubernetes-plugin#991|https://github.com/jenkinsci/kubernetes-plugin/pull/991]
          * [jenkinsci/lockable-resources-plugin#242|https://github.com/jenkinsci/lockable-resources-plugin/pull/242]
          * [jenkinsci/role-strategy-plugin#150|https://github.com/jenkinsci/role-strategy-plugin/pull/150]
          basil Basil Crow made changes -
          Description See JENKINS-65988. Jenkins core is using [Guava 11.0.1|https://github.com/google/guava/releases/tag/v11.0.1], which was released on January 9, 2012. Jenkins core would like to upgrade to [Guava 30.1.1|https://github.com/google/guava/releases/tag/v30.1.1], which was released on March 19, 2021. Plugins must be prepared to be compatible with both Guava 11.0.1 and Guava 30.1.1 in advance of this core transition.

          h3. {{Iterators#emptyIterator}}

          In particular, this plugin has been identified as using the {{com.google.common.collect.Iterators#emptyIterator}} method, which existed in Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/collect/Iterators.html] but was [removed in later versions|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/Iterators.html].

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The general recommendation is to migrate away from {{Iterators#emptyIterator}} and rewrite the code to use [{{org.apache.commons.collections.iterators.EmptyIterator}}|https://commons.apache.org/proper/commons-collections/javadocs/api-3.2.2/org/apache/commons/collections/iterators/EmptyIterator.html] from Apache Commons Collections 3.2.2, which is bundled in Jenkins core already.

          h3. Guava's cache

          In particular, this plugin has been identified as using the {{com.google.common.cache.Cache}} API, which has been removed between Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/cache/Cache.html] and [latest|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/cache/Cache.html]. The removal took place in Guava 12.0.

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The recommendation is for plugins to migrate from Guava's cache to [Caffeine|https://github.com/ben-manes/caffeine] via the Jenkins [Caffeine API|https://plugins.jenkins.io/caffeine-api/] plugin.

          For the most part, the migration is a trivial matter of replacing imports of {{com.google.common.cache.Cache}} with imports of {{com.github.benmanes.caffeine.cache.Cache}} and imports of {{com.google.common.cache.CacheBuilder}} with imports of {{com.github.benmanes.caffeine.cache.Caffeine}}. For examples of how to do this, see these existing PRs:

          * [jenkinsci/active-directory-plugin#109|https://github.com/jenkinsci/active-directory-plugin/pull/109]
          * [jenkinsci/azure-ad-plugin#125|https://github.com/jenkinsci/azure-ad-plugin/pull/125]
          * [jenkinsci/configuration-as-code-plugin#1596|https://github.com/jenkinsci/configuration-as-code-plugin/pull/1596]
          * [jenkinsci/kubernetes-plugin#991|https://github.com/jenkinsci/kubernetes-plugin/pull/991]
          * [jenkinsci/lockable-resources-plugin#242|https://github.com/jenkinsci/lockable-resources-plugin/pull/242]
          * [jenkinsci/role-strategy-plugin#150|https://github.com/jenkinsci/role-strategy-plugin/pull/150]
          See JENKINS-65988. Jenkins core is using [Guava 11.0.1|https://github.com/google/guava/releases/tag/v11.0.1], which was released on January 9, 2012. Jenkins core would like to upgrade to [Guava 30.1.1|https://github.com/google/guava/releases/tag/v30.1.1], which was released on March 19, 2021. Plugins must be prepared to be compatible with both Guava 11.0.1 and Guava 30.1.1 in advance of this core transition.

          h3. {{Iterators#emptyIterator}}

          In particular, this plugin has been identified as using the {{com.google.common.collect.Iterators#emptyIterator}} method, which existed in Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/collect/Iterators.html] but was [removed in later versions|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/Iterators.html].

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The general recommendation is to migrate away from {{Iterators#emptyIterator}} and rewrite the code to use [{{org.apache.commons.collections.iterators.EmptyIterator}}|https://commons.apache.org/proper/commons-collections/javadocs/api-3.2.2/org/apache/commons/collections/iterators/EmptyIterator.html] from Apache Commons Collections 3.2.2, which is bundled in Jenkins core already.

          h3. Guava's cache

          In particular, this plugin has been identified as using the {{com.google.common.cache.Cache}} API, from which some methods have been removed between Guava [11.0.1|https://guava.dev/releases/11.0.1/api/docs/com/google/common/cache/Cache.html] and [latest|https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/cache/Cache.html].

          To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. The recommendation is for plugins to migrate from Guava's cache to [Caffeine|https://github.com/ben-manes/caffeine] via the Jenkins [Caffeine API|https://plugins.jenkins.io/caffeine-api/] plugin.

          For the most part, the migration is a trivial matter of replacing imports of {{com.google.common.cache.Cache}} with imports of {{com.github.benmanes.caffeine.cache.Cache}} and imports of {{com.google.common.cache.CacheBuilder}} with imports of {{com.github.benmanes.caffeine.cache.Caffeine}}. For examples of how to do this, see these existing PRs:

          * [jenkinsci/active-directory-plugin#109|https://github.com/jenkinsci/active-directory-plugin/pull/109]
          * [jenkinsci/azure-ad-plugin#125|https://github.com/jenkinsci/azure-ad-plugin/pull/125]
          * [jenkinsci/configuration-as-code-plugin#1596|https://github.com/jenkinsci/configuration-as-code-plugin/pull/1596]
          * [jenkinsci/kubernetes-plugin#991|https://github.com/jenkinsci/kubernetes-plugin/pull/991]
          * [jenkinsci/lockable-resources-plugin#242|https://github.com/jenkinsci/lockable-resources-plugin/pull/242]
          * [jenkinsci/role-strategy-plugin#150|https://github.com/jenkinsci/role-strategy-plugin/pull/150]
          basil Basil Crow made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
          basil Basil Crow made changes -
          Remote Link This issue links to "jenkinsci/gerrit-trigger-plugin#446 (Web Link)" [ 26928 ]
          basil Basil Crow made changes -
          Remote Link This issue links to "jenkinsci/gerrit-trigger-plugin#451 (Web Link)" [ 26929 ]
          basil Basil Crow made changes -
          Labels JEP-233
          Hide
          basil Basil Crow added a comment -

          Released in 2.35.2.

          Show
          basil Basil Crow added a comment - Released in 2.35.2 .
          basil Basil Crow made changes -
          Released As 2.35.2
          Assignee rsandell [ rsandell ] Basil Crow [ basil ]
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]

            People

            Assignee:
            basil Basil Crow
            Reporter:
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: