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

Setup wizard does not take into account optional dependencies when ordering plugin installations

      Seen this myself, and also reports from others that Jenkins requires a restart after setup wizard plugin installation for things to not be broken.

      Steps to reproduce:

      1. Install suggested plugins in setup wizard
      2. Observe that Folders is installed before Credentials
      3. New Item, type Folder

      Expected result

      Folder config screen loads

      Actual result

      It does not

      Workaround

      Restart Jenkins after plugin installation.

          [JENKINS-57681] Setup wizard does not take into account optional dependencies when ordering plugin installations

          Jesse Glick added a comment -

          So several bugs here:

          1. The Setup wizard is either failing to do a topological sort of plugins, or failing to include optional dependencies in the set of edges.
          2. The plugin manager is not retroactively inserting the class loader for credentials as a parent of that for cloudbees-folder: after everything has been installed we see Failed to instantiate optional component com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider$FolderCredentialsProperty$DescriptorImpl; skipping
          3. Some JavaScript is not accounting for an edge condition gracefully:
            Uncaught TypeError: Cannot read property 'firstChild' of undefined
                at registerValidator (hudson-behavior.js:424)
                at Array.forEach (<anonymous>)
                at behavior.js:111
                at Array.forEach (<anonymous>)
                at behavior.js:107
                at Array.forEach (<anonymous>)
                at Object.applySubtree (behavior.js:93)
                at Object.apply (behavior.js:76)
                at behavior.js:71
                at window.onload (behavior.js:125)
            
          4. Probably something else, depending on diagnosis of #3.

          Jesse Glick added a comment - So several bugs here: The Setup wizard is either failing to do a topological sort of plugins, or failing to include optional dependencies in the set of edges. The plugin manager is not retroactively inserting the class loader for credentials as a parent of that for cloudbees-folder : after everything has been installed we see Failed to instantiate optional component com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider$FolderCredentialsProperty$DescriptorImpl; skipping Some JavaScript is not accounting for an edge condition gracefully: Uncaught TypeError: Cannot read property 'firstChild' of undefined at registerValidator (hudson-behavior.js:424) at Array.forEach (<anonymous>) at behavior.js:111 at Array.forEach (<anonymous>) at behavior.js:107 at Array.forEach (<anonymous>) at Object.applySubtree (behavior.js:93) at Object.apply (behavior.js:76) at behavior.js:71 at window.onload (behavior.js:125) Probably something else, depending on diagnosis of #3.

          Daniel Beck added a comment -

          Would be interesting to know whether the normal plugin manager/update center do this differently. I've only observed it with the setup wizard but that doesn't mean it wouldn't occur elsewhere.

          Daniel Beck added a comment - Would be interesting to know whether the normal plugin manager/update center do this differently. I've only observed it with the setup wizard but that doesn't mean it wouldn't occur elsewhere.

            fcojfernandez Francisco Fernández
            danielbeck Daniel Beck
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: