• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker

      I have multiple shared libraries specified in the Global Pipeline Libraries section of the configuration. After upgrading Jenkins and its plugins, the all the configuration was lost except for the names. When trying to re-enter the config, I found that after entering the SCM details for one library and saving, the SCM configuration for the other libraries was lost again. Only by manually editing org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml could the config be restored.

          [JENKINS-59227] Global Pipeline Libraries configuration lost

          Peter Wiseman added a comment -

          I've experienced the same problem.  Lost configuration after upgrade from 2.132 to 2.207. 

          • Pipeline Shared Groovy Library v2.15
          • Subversion Plugin v2.12.2

          Peter Wiseman added a comment - I've experienced the same problem.  Lost configuration after upgrade from 2.132 to 2.207.  Pipeline Shared Groovy Library v2.15 Subversion Plugin v2.12.2

          Peter Wiseman added a comment -

          With Permissive Script Security at 0.5, the Global Pipeline Library SCM configuration information is no longer visible.  If that were all it might be ok, but upon saving, the configuration, is removed.

          Peter Wiseman added a comment - With Permissive Script Security at 0.5, the Global Pipeline Library SCM configuration information is no longer visible.  If that were all it might be ok, but upon saving, the configuration, is removed.

          Peter Wiseman added a comment -

          I tried Permissive Script Security 0.4. It does not have the issue.

          Peter Wiseman added a comment - I tried Permissive Script Security 0.4. It does not have the issue.

          Oleg Nenashev added a comment -

          CC bitwiseman dnusbaum who are the Pipeline maintainers ATM

          Oleg Nenashev added a comment - CC bitwiseman dnusbaum who are the Pipeline maintainers ATM

          Devin Nusbaum added a comment -

          Based on the comments here, in JENKINS-57171, and JENKINS-59145 (which looks like the same issue but when configuring a Pipeline job from SCM instead of a shared library SCM), the issue seems to be specific to Permissive Script Security 0.5 (I think this is the only change in that release), so I am changing the component. There may be some issue in the interaction between Permission Script Security and Script Security, but I'm not sure. If anyone has any relevant error messages or stack traces in your Jenkins logs, or any error messages in your browser console, that would be helpful.

          Devin Nusbaum added a comment - Based on the comments here, in JENKINS-57171 , and JENKINS-59145 (which looks like the same issue but when configuring a Pipeline job from SCM instead of a shared library SCM), the issue seems to be specific to Permissive Script Security 0.5 ( I think this is the only change in that release ), so I am changing the component. There may be some issue in the interaction between Permission Script Security and Script Security, but I'm not sure. If anyone has any relevant error messages or stack traces in your Jenkins logs, or any error messages in your browser console, that would be helpful.

          permissive-script-security maintainer here, I failed to reproduce this with version 0.5 installed and enabled so I suspect there must be something else involved. Please share the config.xml of the affected job and org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml, where there is reported the stored config (of one or the other) is not rendered in UI.

          Oliver Gondža added a comment - permissive-script-security maintainer here, I failed to reproduce this with version 0.5 installed and enabled so I suspect there must be something else involved. Please share the config.xml of the affected job and org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml , where there is reported the stored config (of one or the other) is not rendered in UI.

          Tim Patterson added a comment -

          We're still getting this issue and have been for ages. We're running Jenkins 2.346.1.

          Steps:

          1. Browse to "Manage Jenkins -> Configure System" page
          2. Browse to the Global Pipeline Libraries -> Modern SCM
          3. All fields in the Git section appear to be reset to their defaults (ie. empty fields with the "Discover branches" behavior added)
            • The fields need to be re-entered before saving any changes.... Painful!

          Strangely enough, the widget seems to have read in the appropriate data/branch information as the "Default version" field has the "Currently maps to revision: xxxxx" set correctly!

          There are no errors in our log (which is filled with Docker Container Watchdog info messages and that's about it!)

          Like others here we have -Dpermissive-script-security.enabled=no_security, but I'm not sure that's a red herring? We're running permissive-script-security: 0.7. Not sure how it would be related, but we also get the empty "pipeline script" field like in JENKINS-59145. I had assumed that was because I'm configuring the job using the JobDSL, but perhaps it's related to this plugin too??

          Tim Patterson added a comment - We're still getting this issue and have been for ages. We're running Jenkins 2.346.1. Steps: Browse to "Manage Jenkins -> Configure System" page Browse to the Global Pipeline Libraries -> Modern SCM All fields in the Git section appear to be reset to their defaults (ie. empty fields with the "Discover branches" behavior added) The fields need to be re-entered before saving any changes.... Painful! Strangely enough, the widget seems to have read in the appropriate data/branch information as the "Default version" field has the "Currently maps to revision: xxxxx" set correctly! There are no errors in our log (which is filled with Docker Container Watchdog info messages and that's about it!) Like others here we have -Dpermissive-script-security.enabled=no_security , but I'm not sure that's a red herring? We're running permissive-script-security: 0.7. Not sure how it would be related, but we also get the empty "pipeline script" field like in JENKINS-59145 . I had assumed that was because I'm configuring the job using the JobDSL, but perhaps it's related to this plugin too??

          Devin Nusbaum added a comment -

          Generally speaking, these kinds of problem are caused by a bug in some other (typically unpopular and unmaintained) plugin that is trying to render something on the page. For example, in JENKINS-62228, various plugins including hp-application-automation-tools-plugin were causing similar problems. You should be able to narrow down the issue by cloning your Jenkins controller (or backing up your main controller) and then disabling/uninstalling plugins one by one until the issue no longer appears. Use https://plugins.jenkins.io/ to check plugin installation stats so that you can start with the least popular plugins, since they are the most likely candidates to have serious unresolved bugs like this. Also, if you are not already running the latest versions of all plugins, you could try updating everything first to see if that resolves the issue.

          Devin Nusbaum added a comment - Generally speaking, these kinds of problem are caused by a bug in some other (typically unpopular and unmaintained) plugin that is trying to render something on the page. For example, in JENKINS-62228 , various plugins including hp-application-automation-tools-plugin were causing similar problems. You should be able to narrow down the issue by cloning your Jenkins controller (or backing up your main controller) and then disabling/uninstalling plugins one by one until the issue no longer appears. Use https://plugins.jenkins.io/ to check plugin installation stats so that you can start with the least popular plugins, since they are the most likely candidates to have serious unresolved bugs like this. Also, if you are not already running the latest versions of all plugins, you could try updating everything first to see if that resolves the issue.

          Tim Patterson added a comment -

          Thanks dnusbaum. I took your advice and found that it was the "Mixing Security Realm Plugin" Version 1.3. I wouldn't say we have a heap of plugins (turns out there's 76!), but enough to be a pretty painful process of trial and error. Took me an hour or so.

          Disabling that plugin solved my issues; the plugin itself still had other critical bugs last time I checked so we're not using it anyway! I've added that plugin component to this ticket.

          Tim Patterson added a comment - Thanks dnusbaum . I took your advice and found that it was the "Mixing Security Realm Plugin" Version 1.3. I wouldn't say we have a heap of plugins (turns out there's 76!), but enough to be a pretty painful process of trial and error. Took me an hour or so. Disabling that plugin solved my issues; the plugin itself still had other critical bugs last time I checked so we're not using it anyway! I've added that plugin component to this ticket.

            Unassigned Unassigned
            deverett Daniel Everett
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: