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

Remove github server in "Configure System" page does not have any effect

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • github-plugin
    • None

      Removing the github server or github enterprise server and saving has no effect : both are still present when reloading the admin page.

      Steps to reproduce :

      • add a github server and a github enterprise server (just wanted to use a "github enterprise server" but it seems that credentials only appear in the "Github Server" section so I filled both section... this part is not clear at all in the UI)
      • save config
      • go back to "configure system" page
      • remove github server (or github enterprise server) and save
      • go back to "configure system" page : the config is still there

          [JENKINS-54577] Remove github server in "Configure System" page does not have any effect

          Oliver Rau added a comment -

          I can confirm this behaviour with a fresh installed Jenkins 2.164.3 and github plugin 1.29.4.

          Make sure to install GitHub plugin and GitHub Organization plugin. After startup, go to configuration and follow the steps provided above.

          Result: Same behaviour.

           

          On a side Note, I also found that the DropDown in the GitHub Organization Folder for GitHub server always shows "GitHub" and the enterprise server created, However "GitHub" is not configured at all. On top of that, none of the Servers configured in the GitHub Server section of the config are listed.

           

          When looking at the github-plugin-configuration.xml I can see my custom created Server which is shown in the GitHub Servers section, but neither the enterprise server nor a Server named "GitHub"

           

          Oliver Rau added a comment - I can confirm this behaviour with a fresh installed Jenkins 2.164.3 and github plugin 1.29.4. Make sure to install GitHub plugin and GitHub Organization plugin. After startup, go to configuration and follow the steps provided above. Result: Same behaviour.   On a side Note, I also found that the DropDown in the GitHub Organization Folder for GitHub server always shows "GitHub" and the enterprise server created, However "GitHub" is not configured at all. On top of that, none of the Servers configured in the GitHub Server section of the config are listed.   When looking at the github-plugin-configuration.xml I can see my custom created Server which is shown in the GitHub Servers section, but neither the enterprise server nor a Server named "GitHub"  

          Daniel Kirkdorffer added a comment - - edited

          Exact same problem as reported by yogeek and olira using github-plugin 1.34.4 on Jenkins 2.346.2.  Given how old this issue is I am surprised that it hasn't been addressed.

          Daniel Kirkdorffer added a comment - - edited Exact same problem as reported by yogeek and olira using github-plugin 1.34.4 on Jenkins 2.346.2.  Given how old this issue is I am surprised that it hasn't been addressed.

          Mark Waite added a comment - - edited

          I confirm that I see the same behavior on my installation, though I'm not very worried by it. If the GitHub plugin is installed, it seems reasonable that a GitHub server would be configured. If a GitHub server is not defined, it seems reasonable that it would insert a GitHub server entry in the form, ready for the administrator to complete the form.

          Steps that I took while experimenting:

          1. Install the GitHub plugin and other plugins into Jenkins 2.361.3 as listed in plugins.txt
          2. Open "Manage Jenkins" and confirm that no GitHub server is listed
          3. Add a secret text credential that is the text of a GitHub personal access token
          4. Add a GitHub server in "Manage Jenkins" that uses the secret text credential
          5. Save the configuration and confirm that the server is saved
          6. Add another GitHub server in "Manage Jenkins" that uses the secret text credential
          7. Save the configuration and confirm that two servers are visible
          8. Delete one of the servers and confirm that only one server is visible and that server is in the XML file
          9. Delete the remaining server and confirm that the server remains in the XML file even though it is removed from the page
          10. Add a new server and confirm that the new server replaces the existing server in the XML file

          Expected Behavior

          Deleting the last GitHub server from Manage Jenkins should remove that server.

          Actual Behavior

          The user action to delete the last GitHub server does not change the configuration file. The last server will reappear the next time configuration is read, either by restart or by configuration reload.

          Workaround

          Edit the github-plugin-configuration.xml file and remove the last entry with a text editor.

          Mark Waite added a comment - - edited I confirm that I see the same behavior on my installation, though I'm not very worried by it. If the GitHub plugin is installed, it seems reasonable that a GitHub server would be configured. If a GitHub server is not defined, it seems reasonable that it would insert a GitHub server entry in the form, ready for the administrator to complete the form. Steps that I took while experimenting: Install the GitHub plugin and other plugins into Jenkins 2.361.3 as listed in plugins.txt Open "Manage Jenkins" and confirm that no GitHub server is listed Add a secret text credential that is the text of a GitHub personal access token Add a GitHub server in "Manage Jenkins" that uses the secret text credential Save the configuration and confirm that the server is saved Add another GitHub server in "Manage Jenkins" that uses the secret text credential Save the configuration and confirm that two servers are visible Delete one of the servers and confirm that only one server is visible and that server is in the XML file Delete the remaining server and confirm that the server remains in the XML file even though it is removed from the page Add a new server and confirm that the new server replaces the existing server in the XML file Expected Behavior Deleting the last GitHub server from Manage Jenkins should remove that server. Actual Behavior The user action to delete the last GitHub server does not change the configuration file. The last server will reappear the next time configuration is read, either by restart or by configuration reload. Workaround Edit the github-plugin-configuration.xml file and remove the last entry with a text editor.

          markewaite - thanks for your added information.  Unfortunately I cannot edit the github-plugin-configuration.xml file, so that's not a viable solution in my case.

          Daniel Kirkdorffer added a comment - markewaite - thanks for your added information.  Unfortunately I cannot edit the github-plugin-configuration.xml file, so that's not a viable solution in my case.

            lanwen Kirill Merkushev
            yogeek Guillaume Dupin
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: