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

Prompt admin to install plugins which are newly suggested in platform-plugins.json

      Say you build Jenkins with

      diff --git core/src/main/resources/jenkins/install/platform-plugins.json core/src/main/resources/jenkins/install/platform-plugins.json
      index 4347ee0f27..3566901995 100644
      --- core/src/main/resources/jenkins/install/platform-plugins.json
      +++ core/src/main/resources/jenkins/install/platform-plugins.json
      @@ -50,6 +50,7 @@
                   { "name": "github-branch-source", "suggested": true, "added": "2.0" },
                   { "name": "pipeline-github-lib", "suggested": true, "added": "2.0" },
                   { "name": "pipeline-stage-view", "suggested": true, "added": "2.0" },
      +            { "name": "build-token-root", "suggested": true, "added": "2.270" },
                   { "name": "conditional-buildstep" },
                   { "name": "jenkins-multijob-plugin" },
                   { "name": "parameterized-trigger" },
      

      and run it on a fresh home dir. In the setup wizard, you will be prompted to install build-token-root, as expected.

      Now run 2.263.3 on a fresh home dir. Run through the setup wizard, selecting no plugins to install (mainly because right at the moment the download site is broken for me!), finish setup as usual. Shut down Jenkins. Now start the snapshot build on this same home dir. Nothing happens—no upgrade wizard. You can of course install build-token-root explicitly but you are not prompted to do so.

      It seems that JENKINS-33663 defined this added field but this only ever worked for the value 2.0—the case for someone upgrading from Jenkins 1.x, when there was no setup wizard.

      But of course hardly anyone is going to still be upgrading directly from Jenkins 1.x these days. So UpgradeWizard and associated GUI is basically dead code. Either it should be deleted, or fixed to actually work.

      I have some trouble following the control flow, but it seems that InstallUtil.getDefaultInstallState is just not called after initial setup, because the current state is RUNNING. SetupWizard.getPlatformPluginUpdates() works, it is just not called. Same for UpgradeWizard.updateUpToDate().

          [JENKINS-64750] Prompt admin to install plugins which are newly suggested in platform-plugins.json

          Tim Jacomb added a comment -

          The previous state is serialised to disk in config.xml and it just uses that.

          The code is very broken, I'm trying to clean it up a bit to fix JENKINS-41727 but I don't think it's worth keeping the GUI code.

          (With some minor hacks you can make it show up and it's very broken)

          The code is super confusing though, once I make it go through upgrading properly it doesn't complete setup . and last running version is never set.

          Tim Jacomb added a comment - The previous state is serialised to disk in config.xml and it just uses that. The code is very broken, I'm trying to clean it up a bit to fix JENKINS-41727 but I don't think it's worth keeping the GUI code. (With some minor hacks you can make it show up and it's very broken) The code is super confusing though, once I make it go through upgrading properly it doesn't complete setup . and last running version is never set.

          Daniel Beck added a comment -

          Daniel Beck added a comment - FTR https://github.com/jenkinsci/jenkins/pull/5257#issuecomment-772474407

          Jesse Glick added a comment -

          Given that https://github.com/jenkinsci/jenkins/pull/5283 just deletes this code altogether, I suppose this could be closed? Or reinterpreted as an RFE to create an alternative system for offering newly suggested plugins.

          Jesse Glick added a comment - Given that https://github.com/jenkinsci/jenkins/pull/5283 just deletes this code altogether, I suppose this could be closed? Or reinterpreted as an RFE to create an alternative system for offering newly suggested plugins.

          Tim Jacomb added a comment -

          RFE imo it would be good to have this functionality

          Tim Jacomb added a comment - RFE imo it would be good to have this functionality

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: