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

Improve JobConfigHistory to support managed files

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Labels:
      None
    • Environment:
      Cloudbees Core Managed Master 2.138.2.2-rolling
      OS unknown - whatever Cloudbees uses
      Job Configuration History Plugin 2.18.3
      Using Chrome for web browser
    • Similar Issues:

      Description

      The JobConfigHistory plugin works for jobs as well as system configuration.  The other primary component that serves a good chunk of our configuration is the managed files, which this plugin does not currently support, and we feel that pain.  It would be extremely useful to have this.

        Attachments

          Activity

          Hide
          jochenafuerbacher Jochen A. Fürbacher added a comment -

          Changes of Manged Files get already tracked by JobConfigHistory, as this is a system configuration change. You will see records as org.jenkinsci.plugins.configfiles.GlobalConfigFiles (system).

          While it might be nice to have an action for JobConfigHistory in the managed files section, I don't see any chance to track history changes of individual managed files, as all these managed files get persisted in a single XML file (org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml).

          Show
          jochenafuerbacher Jochen A. Fürbacher added a comment - Changes of Manged Files get already tracked by JobConfigHistory, as this is a system configuration change. You will see records as org.jenkinsci.plugins.configfiles.GlobalConfigFiles (system) . While it might be nice to have an action for JobConfigHistory in the managed files section, I don't see any chance to track history changes of individual managed files, as all these managed files get persisted in a single XML file ( org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml ).
          Hide
          tpbradt Tim Bradt added a comment -

          The fact that all of the managed files are stored in a single xml file is a disappointing design when it comes to this, but not a deal breaker in the end.  I can live with that.  However...

          Now that I find these entries by going to the config history for system configuration, I notice that there is no way to do the following:

          1. diff between 2 versions
          2. restore a selected version (though this is probably not wise given that all of the files are in a single xml format so let's ignore this point)

          So at least I can get to the history which is a good start and still useful, but I would need to copy and paste the content into external files and use a different tool to diff them.  I can do that, but this issue morphs into an improvement to perhaps provide a means to at least diff the managed config.  This might involve UI changes to allow for separating the config history of managed config from the other system configurations if it doesn't make sense to provide diff for other system configs.  But maybe it wouldn't hurt to provide diff on the rest of it as well.  I haven't looked that closely at the actual files to know for sure, nor have I had reasons previously to need a diff on the other content.

          Show
          tpbradt Tim Bradt added a comment - The fact that all of the managed files are stored in a single xml file is a disappointing design when it comes to this, but not a deal breaker in the end.  I can live with that.  However... Now that I find these entries by going to the config history for system configuration, I notice that there is no way to do the following: diff between 2 versions restore a selected version (though this is probably not wise given that all of the files are in a single xml format so let's ignore this point) So at least I can get to the history which is a good start and still useful, but I would need to copy and paste the content into external files and use a different tool to diff them.  I can do that, but this issue morphs into an improvement to perhaps provide a means to at least diff the managed config.  This might involve UI changes to allow for separating the config history of managed config from the other system configurations if it doesn't make sense to provide diff for other system configs.  But maybe it wouldn't hurt to provide diff on the rest of it as well.  I haven't looked that closely at the actual files to know for sure, nor have I had reasons previously to need a diff on the other content.
          Hide
          jochenafuerbacher Jochen A. Fürbacher added a comment -

          You can view the diff between two history entries of this file:

          • Go to JobConfigHistory action
          • Click on the org.jenkinsci.plugins.configfiles.GlobalConfigFiles (system) link (not the View as XML link).
          • A new page with the possibility to diff between history changes of the Manged Files get opened.

          The restore feature for this file isn't supported, yet.

          Show
          jochenafuerbacher Jochen A. Fürbacher added a comment - You can view the diff between two history entries of this file: Go to JobConfigHistory action Click on the org.jenkinsci.plugins.configfiles.GlobalConfigFiles (system) link (not the View as XML link). A new page with the possibility to diff between history changes of the Manged Files get opened. The restore feature for this file isn't supported, yet.
          Hide
          tpbradt Tim Bradt added a comment -

          Excellent!  Thank you Jochen.  You can definitely close out this ticket then from my view.

          The config history for system configs is different enough from the job configuration that it would be helpful to add content for it to the documentation.

          Thanks again.

          Show
          tpbradt Tim Bradt added a comment - Excellent!  Thank you Jochen.  You can definitely close out this ticket then from my view. The config history for system configs is different enough from the job configuration that it would be helpful to add content for it to the documentation. Thanks again.

            People

            Assignee:
            stefanbrausch Stefan Brausch
            Reporter:
            tpbradt Tim Bradt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: