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

Build failure causes are deleted when saving Jenkins global configuration.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Windows, jdk1.8.0_141, Jenkins LTS 2.190.1.
      Installed plugin list in attached file.
    • 1.23.1

      Basically a new build-failure-analyzer.xml configuration file with default settings is written when "Save" is clicked in Jenkins global configuration (http://jenkins_ulr/configure).

      I also observed that when installing build-failure-analyzer first time, then restart Jenkins, still there is no build-failure-analyzer.xml in JENKINS_HOME.
      If I change a global setting and click save, the file appears.
      If I add a failure cause, and and use it, it stays and is visible in build-failure-analyzer.xml.
      And the failure cause is still there after restarting Jenkins.
      But if I change the global configuration, the modifed file is overwritten with default settings, which means that I effectively loose all my failure causes.

      My BFA global settings are in the screenshot, and I notice alse that it defaults to enable the gerrit-trigger notifications, although that plugin is not installed.

      Reproduce:
      Install Jenkins, install all mentioned plugins except BFA
      Install BFA, restart Jenkins, Notice there is no BFA configuration file
      Change a global setting and save. Notice BFA configuration file now exist
      Add a failure cause - do what ever, the failure cause stays
      Change a global setting and save. Notice BFA configuration file still exists, but the failure cause is gone.

          [JENKINS-59610] Build failure causes are deleted when saving Jenkins global configuration.

          Soeren Uttrup added a comment - - edited

          Hi t_westling
          When can i expect a plugin update to be ready for download ?

          Soeren Uttrup added a comment - - edited Hi t_westling When can i expect a plugin update to be ready for download ?

          I can't say for sure, but I am currently working on fixing some review comments.

          After the pull request is in, releasing a new version is quick work.

          Tomas Westling added a comment - I can't say for sure, but I am currently working on fixing some review comments. After the pull request is in, releasing a new version is quick work.

          Soeren Uttrup added a comment -

          Hi t_westling
          Not able to upgrade to 1.23.1 only 1.23.0 available

          Soeren Uttrup added a comment - Hi t_westling Not able to upgrade to 1.23.1 only 1.23.0 available

          That is weird, but seems it has to be a problem on your end, since 1.23.1 is visible from all our Jenkins instances.

          When was the last "update information obtained" ? It has been in the update site for quite a while now.

          Tomas Westling added a comment - That is weird, but seems it has to be a problem on your end, since 1.23.1 is visible from all our Jenkins instances. When was the last "update information obtained" ? It has been in the update site for quite a while now.

          Soeren Uttrup added a comment -

          You were right, I was not getting any updates.
          I have updated to 1.23.1 now and everything works fine.
          Thanks !

          Soeren Uttrup added a comment - You were right, I was not getting any updates. I have updated to 1.23.1 now and everything works fine. Thanks !

          Steve Graham added a comment - - edited

          just noticed that ALL my build-failure-analysis reasons have been deleted, the xml file only contains the default.
          I upgraded to the Jenkins weekly 2.202 last week ( Oct 29th ).
          I did have build-analyser plugin version 1.24 installed.
          I'm trying to go back to the 1.23.1 version - but I guess its not going to get my failure reasons back again.
          I'm also fairly sure I didn't change the Global configuration.
          Is there a backup of the build-failuer-analyser.xml file ?
          ( I cancelled the uninstall of version 1.24 - it won't bring back my extensive database of failure reasons )

          Steve Graham added a comment - - edited just noticed that ALL my build-failure-analysis reasons have been deleted, the xml file only contains the default. I upgraded to the Jenkins weekly 2.202 last week ( Oct 29th ). I did have build-analyser plugin version 1.24 installed. I'm trying to go back to the 1.23.1 version - but I guess its not going to get my failure reasons back again. I'm also fairly sure I didn't change the Global configuration. Is there a backup of the build-failuer-analyser.xml file ? ( I cancelled the uninstall of version 1.24 - it won't bring back my extensive database of failure reasons )

          Steve Graham added a comment -

          I found an old version of the build-failuer-analyser.xml file from Oct 2018 and copied it. Reloaded the configuration from Disk but still can't see any entries in the Failure Cause Management view.

          Steve Graham added a comment - I found an old version of the build-failuer-analyser.xml file from Oct 2018 and copied it. Reloaded the configuration from Disk but still can't see any entries in the Failure Cause Management view.

          You have to restart Jenkins. "Reload from Disk" doesn't do the Job in this case.

          Nils Oliver Adam added a comment - You have to restart Jenkins. "Reload from Disk" doesn't do the Job in this case.

          Steve Graham added a comment -

          ok - thanks. I got my build failure list from 1 year ago back again.
          BFA version is now 1.24. , jenkins is 2.202 ( just about to go up to 2.203 )
          I tried changing the global config and my build-failure list is still there.
          Relieved but still lost any additions I made in the last year.

          Steve Graham added a comment - ok - thanks. I got my build failure list from 1 year ago back again. BFA version is now 1.24. , jenkins is 2.202 ( just about to go up to 2.203 ) I tried changing the global config and my build-failure list is still there. Relieved but still lost any additions I made in the last year.

          I just noticed that the configuration was removed in my instance a while back.  Just wanted to drop a note that if you happen to have the "build configuration history" plug-in installed, a backup of build-failure-analyzer.xml exists and can be restored to the exact version before the broken update (go to https://<yourserver>/jobConfigHistory/history?name=build-failure-analyzer)

          Christoph Vogtländer added a comment - I just noticed that the configuration was removed in my instance a while back.  Just wanted to drop a note that if you happen to have the "build configuration history" plug-in installed, a backup of build-failure-analyzer.xml exists and can be restored to the exact version before the broken update (go to https://<yourserver>/jobConfigHistory/history?name=build-failure-analyzer)

            t_westling Tomas Westling
            jbrejner1 Jens Brejner
            Votes:
            7 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: