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

new config history created on each multibranch build

    XMLWordPrintable

Details

    Description

      we have Multi-Branch Project plugin installed
      https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin

      and every build of each multibranch project makes the jobconfighistory to save new configuration in the history
      though there are no changes in the config

      Attachments

        Issue Links

          Activity

            It appears there is already provision for checking duplicates (it is enabled in system config by default): https://github.com/jenkinsci/jobConfigHistory-plugin/blob/jobConfigHistory-2.14/src/main/java/hudson/plugins/jobConfigHistory/FileHistoryDao.java#L269

            In that case, I think all we have to do is make sure any decoration of branch jobs use BulkChange to ensure there are not any intermediate saves to the configuration during indexing that are different from the original (and ideally final) configuration. I believe this problem is more limited to the Multi-Branch Project Plugin at the moment and not any other multibranch types.

            mjdetullio Matthew DeTullio added a comment - It appears there is already provision for checking duplicates (it is enabled in system config by default): https://github.com/jenkinsci/jobConfigHistory-plugin/blob/jobConfigHistory-2.14/src/main/java/hudson/plugins/jobConfigHistory/FileHistoryDao.java#L269 In that case, I think all we have to do is make sure any decoration of branch jobs use BulkChange to ensure there are not any intermediate saves to the configuration during indexing that are different from the original (and ideally final) configuration. I believe this problem is more limited to the Multi-Branch Project Plugin at the moment and not any other multibranch types.

            pmr: I attached a screenshot of JobConfigHistory, showing you the option to not save duplicate histories. You find it in the global jenkins configuration.

            jochenafuerbacher Jochen A. Fürbacher added a comment - pmr : I attached a screenshot of JobConfigHistory, showing you the option to not save duplicate histories. You find it in the global jenkins configuration.

            jochenafuerbacher jglick I have seen this option and it is enabled in my Jenkins Instance. I also don't see any duplicated history, but there are still tons of files in the following directories: `$JENKINS_HOME/config-history-jobs/MULTIBRANCH_JOB/branches/*` (note the branches subdirectory).

            This is the real culprit IMO and makes it necessary to exclude all multi-branch jobs from the job config history or disabling the plugin alltogether.

            pmr Philipp Moeller added a comment - jochenafuerbacher jglick I have seen this option and it is enabled in my Jenkins Instance. I also don't see any duplicated history, but there are still tons of files in the following directories: `$JENKINS_HOME/config-history-jobs/MULTIBRANCH_JOB/branches/*` (note the branches subdirectory). This is the real culprit IMO and makes it necessary to exclude all multi-branch jobs from the job config history or disabling the plugin alltogether.

            mjdetullio I noticed, that the Multi-Branch Project plugin deactivates all branches before syncing and reactivates them after syncing. This leads to some small changes of the branch config file (what gets tracked by JobConfigHistory).

            Is it necessary to do this deactivation / reactivation of the branches?

            jochenafuerbacher Jochen A. Fürbacher added a comment - mjdetullio I noticed, that the Multi-Branch Project plugin deactivates all branches before syncing and reactivates them after syncing. This leads to some small changes of the branch config file (what gets tracked by JobConfigHistory). Is it necessary to do this deactivation / reactivation of the branches?

            Fixed in 0.5 release of multi-branch-project-plugin

            mjdetullio Matthew DeTullio added a comment - Fixed in 0.5 release of multi-branch-project-plugin

            People

              mjdetullio Matthew DeTullio
              zowers Alexander Petrov
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: