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

new config history created on each multibranch build

    Details

    • Similar Issues:

      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

            Hide
            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.

            Show
            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.
            Hide
            jochenafuerbacher Jochen A. Fürbacher added a comment -

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

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

            Jochen A. Fürbacher Jesse Glick 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.

            Show
            pmr Philipp Moeller added a comment - Jochen A. Fürbacher Jesse Glick 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.
            Hide
            jochenafuerbacher Jochen A. Fürbacher added a comment -

            Matthew DeTullio 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?

            Show
            jochenafuerbacher Jochen A. Fürbacher added a comment - Matthew DeTullio 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?
            Hide
            mjdetullio Matthew DeTullio added a comment -

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

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: