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

A new default include creates unwanted commits (without config changes).

      The jenkins scm sync plugin has been rendered quite useless for us since about 4 months because it creates loads of commits that are not related to configuration changes.
      They commits look like this: "Job [*jobname*] configuration updated by SYSTEM"

      The culprit is one of the default includes (Let me quote from the configuration page):


      Following includes are brought "out of the box" by scm-sync-configuration default includes :
      config.xml
      hudson*.xml
      scm-sync-configuration.xml
      jobs/*/config.xml
      ---------

      This include: jobs/*/config.xml monitors all config.xml files in our project for changes and commits them to svn.

      Obviously this is not very helpful and can be considered pretty intrusive.
      It would be nice if this entry could be removed from the default includes or ignored easily.

      The affected config file starts like this:
      <?xml version='1.0' encoding='UTF-8'?>
      <maven2-module-set plugin="maven-plugin@1.498">
      <keepDependencies>false</keepDependencies>
      ...

      It contains lots of data of the maven pom(s) of the source that is built by the job. To save these changes in the poms in svn is beside the scope of the scm plugin. That is what we have version control for.

      I did not find a way to override this predefined include. But maybe there is a way or maybe it should be removed.

          [JENKINS-17545] A new default include creates unwanted commits (without config changes).

          Could you please try attached version of the plugin, it should fix the issue (I'll close this one once confirmed)

          Frédéric Camblor added a comment - Could you please try attached version of the plugin, it should fix the issue (I'll close this one once confirmed)

          Next release of the plugin (ratherly, 0.0.7.1) will contain the fix

          Frédéric Camblor added a comment - Next release of the plugin (ratherly, 0.0.7.1) will contain the fix

          Luiz Casey added a comment -

          Tested this fix and it works great. No extra commits.

          Luiz Casey added a comment - Tested this fix and it works great. No extra commits.

          Cool ! Closed the issue.
          I should provide a new release soon

          Frédéric Camblor added a comment - Cool ! Closed the issue. I should provide a new release soon

          Code changed in jenkins
          User: Frédéric Camblor
          Path:
          src/test/java/hudson/plugins/scm_sync_configuration/strategies/impl/JobConfigScmSyncStrategyTest.java
          src/test/resources/jobConfigStrategyTemplate/config.xml
          src/test/resources/jobConfigStrategyTemplate/hudson.tasks.Shell.xml
          src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/config.xml
          src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/modules/submodule/config.xml
          src/test/resources/jobConfigStrategyTemplate/scm-sync-configuration.xml
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/1ca6bd6d5196f4590044967077808e74b46149df
          Log:
          reproduced JENKINS-17545 in unit test

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frédéric Camblor Path: src/test/java/hudson/plugins/scm_sync_configuration/strategies/impl/JobConfigScmSyncStrategyTest.java src/test/resources/jobConfigStrategyTemplate/config.xml src/test/resources/jobConfigStrategyTemplate/hudson.tasks.Shell.xml src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/config.xml src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/modules/submodule/config.xml src/test/resources/jobConfigStrategyTemplate/scm-sync-configuration.xml http://jenkins-ci.org/commit/scm-sync-configuration-plugin/1ca6bd6d5196f4590044967077808e74b46149df Log: reproduced JENKINS-17545 in unit test

          Code changed in jenkins
          User: Frédéric Camblor
          Path:
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/b033c59cca34d6cb3eba950f9da46516581cd53e
          Log:
          fixed JENKINS-17545 : reusing matchingFilesFrom() method for matches() implementation in PatternsEntityMatcher
          In this way, we should avoid the different behaviour DirectoryScanner.match() has (concerning wildcards) compared to scan() with includes

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frédéric Camblor Path: src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java http://jenkins-ci.org/commit/scm-sync-configuration-plugin/b033c59cca34d6cb3eba950f9da46516581cd53e Log: fixed JENKINS-17545 : reusing matchingFilesFrom() method for matches() implementation in PatternsEntityMatcher In this way, we should avoid the different behaviour DirectoryScanner.match() has (concerning wildcards) compared to scan() with includes

          Code changed in jenkins
          User: Frédéric Camblor
          Path:
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java
          src/test/java/hudson/plugins/scm_sync_configuration/repository/HudsonExtensionsTest.java
          src/test/java/hudson/plugins/scm_sync_configuration/strategies/impl/JobConfigScmSyncStrategyTest.java
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/config.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/hudson.config.xml2
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/hudson.scm.SubversionSCM.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/jobs/config.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/jobs/myJob/config.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/jobs/myJob/config2.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/nodeMonitors.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/scm-sync-configuration.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/toto/config.xml
          src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/toto/hudson.config.xml
          src/test/resources/jobConfigStrategyTemplate/config.xml
          src/test/resources/jobConfigStrategyTemplate/hudson.tasks.Shell.xml
          src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/config.xml
          src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/modules/submodule/config.xml
          src/test/resources/jobConfigStrategyTemplate/scm-sync-configuration.xml
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/53ed11787006c26bd336aed12603ad4d26699dff
          Log:
          Merge branch 'JENKINS-17545'

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frédéric Camblor Path: src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java src/test/java/hudson/plugins/scm_sync_configuration/repository/HudsonExtensionsTest.java src/test/java/hudson/plugins/scm_sync_configuration/strategies/impl/JobConfigScmSyncStrategyTest.java src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/config.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/hudson.config.xml2 src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/hudson.scm.SubversionSCM.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/jobs/config.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/jobs/myJob/config.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/jobs/myJob/config2.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/nodeMonitors.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/scm-sync-configuration.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/toto/config.xml src/test/resources/HudsonExtensionsTest.shouldFileWhichHaveToBeInSCM/toto/hudson.config.xml src/test/resources/jobConfigStrategyTemplate/config.xml src/test/resources/jobConfigStrategyTemplate/hudson.tasks.Shell.xml src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/config.xml src/test/resources/jobConfigStrategyTemplate/jobs/fakeJob/modules/submodule/config.xml src/test/resources/jobConfigStrategyTemplate/scm-sync-configuration.xml http://jenkins-ci.org/commit/scm-sync-configuration-plugin/53ed11787006c26bd336aed12603ad4d26699dff Log: Merge branch ' JENKINS-17545 '

          Code changed in jenkins
          User: Frédéric Camblor
          Path:
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/config.xml
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/hudson.tasks.Shell.xml
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/jobs/fakeJob/config.xml
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/scm-sync-configuration.xml
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/590defc46ee40293d7c8d20a52c2182f5130a22f
          Log:
          JENKINS-17545: Added missing test resources

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frédéric Camblor Path: src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/config.xml src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/hudson.tasks.Shell.xml src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/jobs/fakeJob/config.xml src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/scm-sync-configuration.xml http://jenkins-ci.org/commit/scm-sync-configuration-plugin/590defc46ee40293d7c8d20a52c2182f5130a22f Log: JENKINS-17545 : Added missing test resources

          Code changed in jenkins
          User: Frédéric Camblor
          Path:
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/config.xml
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/hudson.tasks.Shell.xml
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/jobs/fakeJob/config.xml
          src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/scm-sync-configuration.xml
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/176ac3d9f6ee0006fd2a5e3fcb5d47071aab81e1
          Log:
          Merge branch 'JENKINS-17545'

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frédéric Camblor Path: src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/config.xml src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/hudson.tasks.Shell.xml src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/jobs/fakeJob/config.xml src/test/resources/expected-scm-hierarchies/JobConfigScmSyncStrategyTest.shouldConfigInSubmodulesNotSynced/scm-sync-configuration.xml http://jenkins-ci.org/commit/scm-sync-configuration-plugin/176ac3d9f6ee0006fd2a5e3fcb5d47071aab81e1 Log: Merge branch ' JENKINS-17545 '

          Code changed in jenkins
          User: Frédéric Camblor
          Path:
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/2938f22a2ed48b0d0104912fb65818aeacc6de99
          Log:
          Merge branch 'JENKINS-17545', changing implementation fix for JENKINS-17545 by using lanfeust69 suggestion in PR #15

          Compare: https://github.com/jenkinsci/scm-sync-configuration-plugin/compare/ad19835e948c...2938f22a2ed4

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Frédéric Camblor Path: src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java http://jenkins-ci.org/commit/scm-sync-configuration-plugin/2938f22a2ed48b0d0104912fb65818aeacc6de99 Log: Merge branch ' JENKINS-17545 ', changing implementation fix for JENKINS-17545 by using lanfeust69 suggestion in PR #15 Compare: https://github.com/jenkinsci/scm-sync-configuration-plugin/compare/ad19835e948c...2938f22a2ed4

            fcamblor Frédéric Camblor
            nemoo Nemoo
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: