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

GitHub Organization Folder not available as a new item without a restart

    XMLWordPrintable

Details

    Description

      Steps to reproduce it
      1. Fresh installation of Jenkins (Jenkins ver. 2.0-rc-1)
      2. We choose Recommended Plugins option
      3. Items availables are: Freestyle project, Pipeline, External Job, Multi-configuration project, Folder, Multibranch Pipeline

      Where is GitHub Organization?

      Only if we acces to Manage Plugins >> Installed (tab) we see the following message:

      Warning: This Jenkins instance requires a restart. Changing the state of plugins at this time is strongly discouraged. Restart Jenkins before proceeding.

      After restarting, we can see the item GitHub Organization.

      I see here two problems:

      1. We need to restart Jenkins after the wizard installation
      2. The warning message is completely hidden. It is difficult to know that you have to restart.

      Attachments

        Issue Links

          Activity

            danielbeck Daniel Beck added a comment -

            Weird, I thought jglick fixed this?

            danielbeck Daniel Beck added a comment - Weird, I thought jglick fixed this?
            kzantow Keith Zantow added a comment -

            danielbeck I have a PR for this, it's a duplicate of JENKINS-33950

            kzantow Keith Zantow added a comment - danielbeck I have a PR for this, it's a duplicate of JENKINS-33950
            danielbeck Daniel Beck added a comment -

            Reproduced the problem with Jenkins 2.0 RC, installing recommended plugins.

            danielbeck Daniel Beck added a comment - Reproduced the problem with Jenkins 2.0 RC, installing recommended plugins.
            danielbeck Daniel Beck added a comment -

            Interesting. Groovy script console:

            hudson.ExtensionList.lookup(TopLevelItemDescriptor).each {
              println it
              println it.displayName
            }

            Output:

            hudson.model.FreeStyleProject$DescriptorImpl@a75b92e
            Freestyle project
            org.jenkinsci.plugins.workflow.job.WorkflowJob$DescriptorImpl@36d0805f
            Pipeline
            hudson.model.ExternalJob$DescriptorImpl@329bf916
            External Job
            jenkins.branch.OrganizationFolder$DescriptorImpl@1dfe2d4f
            Folder
            com.cloudbees.hudson.plugins.folder.Folder$DescriptorImpl@1a50aceb
            Folder
            hudson.matrix.MatrixProject$DescriptorImpl@268885cc
            Multi-configuration project
            org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject$DescriptorImpl@4d0827d7
            Multibranch Pipeline
            danielbeck Daniel Beck added a comment - Interesting. Groovy script console: hudson.ExtensionList.lookup(TopLevelItemDescriptor).each { println it println it.displayName } Output: hudson.model.FreeStyleProject$DescriptorImpl@a75b92e Freestyle project org.jenkinsci.plugins.workflow.job.WorkflowJob$DescriptorImpl@36d0805f Pipeline hudson.model.ExternalJob$DescriptorImpl@329bf916 External Job jenkins.branch.OrganizationFolder$DescriptorImpl@1dfe2d4f Folder com.cloudbees.hudson.plugins.folder.Folder$DescriptorImpl@1a50aceb Folder hudson.matrix.MatrixProject$DescriptorImpl@268885cc Multi-configuration project org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject$DescriptorImpl@4d0827d7 Multibranch Pipeline
            kzantow Keith Zantow added a comment -

            danielbeck yes, sorry misunderstood. The PR fixes 'restart required'. It seems there's still an issue getting GitHub Org Folders in the new item list.

            kzantow Keith Zantow added a comment - danielbeck yes, sorry misunderstood. The PR fixes 'restart required'. It seems there's still an issue getting GitHub Org Folders in the new item list.

            This was the jglick's PR related with Restarting required, IMO the problem here is different.

            recena Manuel Recena Soto added a comment - This was the jglick 's PR related with Restarting required , IMO the problem here is different.
            kzantow Keith Zantow added a comment - - edited

            recena I've relabeled this, as 'restart required', it's a duplicate of the issue I referenced. However, even with that fixed, GHO still doesn't show up. This may be an ordering issue between the plugins being dynamically loaded, which it looks like that PR was intended to solve but apparently didn't in some case (maybe requiring work elsewhere to make it reliable).

            kzantow Keith Zantow added a comment - - edited recena I've relabeled this, as 'restart required', it's a duplicate of the issue I referenced. However, even with that fixed, GHO still doesn't show up. This may be an ordering issue between the plugins being dynamically loaded, which it looks like that PR was intended to solve but apparently didn't in some case (maybe requiring work elsewhere to make it reliable).
            recena Manuel Recena Soto added a comment - - edited

            kzantow Thanks for your feedback. Remember I noticed two things here:

            1. We need to restart Jenkins after the wizard installation. There is an issue for that .
            2. The warning message is completely hidden. It is difficult to know whether you have to restart.
            recena Manuel Recena Soto added a comment - - edited kzantow Thanks for your feedback. Remember I noticed two things here: We need to restart Jenkins after the wizard installation. There is an issue for that . The warning message is completely hidden. It is difficult to know whether you have to restart.

            As github-organization-folder 1.2 is picked up by the setup wizard this is not happening anymore (manually tested).

            amuniz Antonio Muñiz added a comment - As github-organization-folder 1.2 is picked up by the setup wizard this is not happening anymore (manually tested).

            However the message Warning: This Jenkins instance requires a restart. Changing the state of plugins at this time is strongly discouraged. Restart Jenkins before proceeding. is still there, but it seems to be worked out in JENKINS-33950, so I think this issue can be closed.

            amuniz Antonio Muñiz added a comment - However the message Warning: This Jenkins instance requires a restart. Changing the state of plugins at this time is strongly discouraged. Restart Jenkins before proceeding. is still there, but it seems to be worked out in JENKINS-33950 , so I think this issue can be closed.
            danielbeck Daniel Beck added a comment -

            As github-organization-folder 1.2 is picked up by the setup wizard this is not happening anymore (manually tested).

            amuniz The plugin 1.2 was released four weeks ago. This issue was filed yesterday.

            danielbeck Daniel Beck added a comment - As github-organization-folder 1.2 is picked up by the setup wizard this is not happening anymore (manually tested). amuniz The plugin 1.2 was released four weeks ago. This issue was filed yesterday.

            Mmmm, right, I thought this https://github.com/jenkinsci/github-organization-folder-plugin/pull/9 was already released. At any rate, Github Organization new item type is showing up now (without restarting), not sure what have changed since yesterday.

            amuniz Antonio Muñiz added a comment - Mmmm, right, I thought this https://github.com/jenkinsci/github-organization-folder-plugin/pull/9 was already released. At any rate, Github Organization new item type is showing up now (without restarting), not sure what have changed since yesterday.

            I started a new instance from scratch and it not showing the item type again... perhaps it is affected by the load order ( ? )

            amuniz Antonio Muñiz added a comment - I started a new instance from scratch and it not showing the item type again... perhaps it is affected by the load order ( ? )

            I'm going to try it again.

            recena Manuel Recena Soto added a comment - I'm going to try it again.
            hrmpw Patrick Wolf added a comment -

            shott85 reported today that this is still an issue. He had a fresh install and the GH Org item type did not display until he restarted.

            hrmpw Patrick Wolf added a comment - shott85 reported today that this is still an issue. He had a fresh install and the GH Org item type did not display until he restarted.
            recampbell Ryan Campbell added a comment -

            This is still reproducible with Jenkins LTS 2.7.3 and github-organizational-folder 1.4.

            recampbell Ryan Campbell added a comment - This is still reproducible with Jenkins LTS 2.7.3 and github-organizational-folder 1.4.
            jglick Jesse Glick added a comment -

            I am ignoring the original issue description, which was about messaging about plugins which request restart (as a workaround for some buggy behavior), and focusing on why the fix of JENKINS-33106 did not suffice to make this plugin not require restart.

            jglick Jesse Glick added a comment - I am ignoring the original issue description, which was about messaging about plugins which request restart (as a workaround for some buggy behavior), and focusing on why the fix of JENKINS-33106 did not suffice to make this plugin not require restart.
            jglick Jesse Glick added a comment -

            Amending steps to reproduce interactively from JENKINS-33106 to work in 2.7.3 is trickier due to security setup and JENKINS-18114, so it is more manual, but anyway the deployment step looks like

            java -jar /tmp/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ install-plugin -deploy cloudbees-folder scm-api structs $(pwd)/target/branch-api.hpi workflow-multibranch github-branch-source
            

            Note the order of the last two items, which I think is the key.

            jglick Jesse Glick added a comment - Amending steps to reproduce interactively from JENKINS-33106 to work in 2.7.3 is trickier due to security setup and JENKINS-18114 , so it is more manual, but anyway the deployment step looks like java -jar /tmp/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ install-plugin -deploy cloudbees-folder scm-api structs $(pwd)/target/branch-api.hpi workflow-multibranch github-branch-source Note the order of the last two items, which I think is the key.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java
            src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/e05c287883ec4b46b4820004d9d540ef70c12cea
            Log:
            [FIXED JENKINS-34239] Need to rerun doAddSpecificDescriptors in case a MultiBranchProjectFactoryDescriptor is added first, then a SCMNavigatorDescriptor.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java http://jenkins-ci.org/commit/branch-api-plugin/e05c287883ec4b46b4820004d9d540ef70c12cea Log: [FIXED JENKINS-34239] Need to rerun doAddSpecificDescriptors in case a MultiBranchProjectFactoryDescriptor is added first, then a SCMNavigatorDescriptor.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java
            src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/d297b9480b5fddfeacc878f832ef352926fecfd6
            Log:
            [FIXED JENKINS-34239] Need to rerun doAddSpecificDescriptors in case a MultiBranchProjectFactoryDescriptor is added first, then a SCMNavigatorDescriptor.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java http://jenkins-ci.org/commit/branch-api-plugin/d297b9480b5fddfeacc878f832ef352926fecfd6 Log: [FIXED JENKINS-34239] Need to rerun doAddSpecificDescriptors in case a MultiBranchProjectFactoryDescriptor is added first, then a SCMNavigatorDescriptor.

            People

              jglick Jesse Glick
              recena Manuel Recena Soto
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: