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

DependencyClassLoader#getTransitiveDependencies returns disabled plugins

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      plugin that optionally depend on a disabled one, will get this one returned by DependencyClassLoader#getTransitiveDependencies.

      Typical result is a warning in startup logs :

       
      WARNING: Failed to scout hudson.tasks._ant.AntTargetNote$DescriptorImpl
      java.lang.InstantiationException: file:/Volumes/HD/Users/nicolas/Boulot/cloudbees/JE/cloudbees-license-plugin/work/plugins/ant/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt: java.lang.ClassNotFoundException: hudson.tasks._ant.AntTargetNote$DescriptorImpl
      at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
      at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:644)
      at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:283)
      at hudson.ExtensionList.load(ExtensionList.java:278)
      

          [JENKINS-18654] DependencyClassLoader#getTransitiveDependencies returns disabled plugins

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2695
          [FIXED JENKINS-18654] exlude disabled plugins from transitive dependency list (Revision a6926e1c51c0650a48dec68cbe402248742dd55c)

          Result = UNSTABLE
          Nicolas De Loof : a6926e1c51c0650a48dec68cbe402248742dd55c
          Files :

          • core/src/main/java/hudson/ClassicPluginStrategy.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2695 [FIXED JENKINS-18654] exlude disabled plugins from transitive dependency list (Revision a6926e1c51c0650a48dec68cbe402248742dd55c) Result = UNSTABLE Nicolas De Loof : a6926e1c51c0650a48dec68cbe402248742dd55c Files : core/src/main/java/hudson/ClassicPluginStrategy.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2696
          JENKINS-18654 testcase as suggested by kutzi (Revision 1f761085e20ee2aa106a196d0148e616138e31fe)

          Result = UNSTABLE
          Nicolas De Loof : 1f761085e20ee2aa106a196d0148e616138e31fe
          Files :

          • test/src/test/resources/hudson/ClassicPluginStrategyTest/testDisabledDependencyClassLoader.zip
          • test/src/test/java/hudson/ClassicPluginStrategyTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2696 JENKINS-18654 testcase as suggested by kutzi (Revision 1f761085e20ee2aa106a196d0148e616138e31fe) Result = UNSTABLE Nicolas De Loof : 1f761085e20ee2aa106a196d0148e616138e31fe Files : test/src/test/resources/hudson/ClassicPluginStrategyTest/testDisabledDependencyClassLoader.zip test/src/test/java/hudson/ClassicPluginStrategyTest.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2698
          JENKINS-18654 document unit test (Revision bd87d70b3aa6cd8d13dbeae56b3c09fc425e2442)

          Result = SUCCESS
          Nicolas De Loof : bd87d70b3aa6cd8d13dbeae56b3c09fc425e2442
          Files :

          • test/src/test/java/hudson/ClassicPluginStrategyTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2698 JENKINS-18654 document unit test (Revision bd87d70b3aa6cd8d13dbeae56b3c09fc425e2442) Result = SUCCESS Nicolas De Loof : bd87d70b3aa6cd8d13dbeae56b3c09fc425e2442 Files : test/src/test/java/hudson/ClassicPluginStrategyTest.java

          Jesse Glick added a comment -

          Upping priority since this bug seems to have other symptoms: prior to this fix, if you run cloudbees-template with its optional dependency promoted-builds disabled, and go to edit a job template, you get a nasty 500 error in the middle of the configuration screen as it tries to load a disabled descriptor.

          Jesse Glick added a comment - Upping priority since this bug seems to have other symptoms: prior to this fix, if you run cloudbees-template with its optional dependency promoted-builds disabled, and go to edit a job template, you get a nasty 500 error in the middle of the configuration screen as it tries to load a disabled descriptor.

          Jesse Glick added a comment -

          Possible cause of JENKINS-18922.

          Jesse Glick added a comment - Possible cause of JENKINS-18922 .

          Daniel Beck added a comment -

          It seems to only affect plugin configurations that are unsupported (i.e. having disabled required dependencies): Job Config History depends on Maven plugin, causing both JENKINS-18922 and JENKINS-19000 when the latter is disabled.

          OTOH the current behavior causes Jenkins to break when deleting plugins that were disabled long ago. Not a great experience either.

          Daniel Beck added a comment - It seems to only affect plugin configurations that are unsupported (i.e. having disabled required dependencies): Job Config History depends on Maven plugin, causing both JENKINS-18922 and JENKINS-19000 when the latter is disabled. OTOH the current behavior causes Jenkins to break when deleting plugins that were disabled long ago. Not a great experience either.

          Code changed in jenkins
          User: Daniel Beck
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/956ac72bd982005475336de6f88337d4b5eac46c
          Log:
          Noting JENKINS-18654 in 1.524

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: changelog.html http://jenkins-ci.org/commit/jenkins/956ac72bd982005475336de6f88337d4b5eac46c Log: Noting JENKINS-18654 in 1.524

            Unassigned Unassigned
            ndeloof Nicolas De Loof
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: