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

Excluded regions do not exclude commits from changelog

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • subversion-plugin
    • None

      When using Excluded Regions to exclude certain parts of a repository from triggering a build (because it does not affect the build), the commits performed to those excluded regions are still listed in the changelog. If this is a feature and not a bug, it'd be great to at least have an option to exclude them from the changelog.

          [JENKINS-10449] Excluded regions do not exclude commits from changelog

          kutzi added a comment -

          One part of the reasoning is that these changes are actually checked out into the workspace, therefore I'd like to see them.
          Other part is that even if you think that the changes may not be relevant for the build, you may be wrong and suddenly the build starts failing without any changelog entry.

          Also I think that most of the time the additional changelog entries will do no harm, so I just would like to see them for completeness (see point 1

          kutzi added a comment - One part of the reasoning is that these changes are actually checked out into the workspace, therefore I'd like to see them. Other part is that even if you think that the changes may not be relevant for the build, you may be wrong and suddenly the build starts failing without any changelog entry. Also I think that most of the time the additional changelog entries will do no harm, so I just would like to see them for completeness (see point 1

          Thanks for explaining, I agree with your reasoning and it matches my initial thinking. My personal preference would be to never exclude and use proper sub-trees. However, assuming that there are valid reasons for exclusion, which is suggested by the fact it exists:

          • If it affects the build, it's a misconfiguration to exclude something that matters. You want to run verification on relevant changes.
          • If there are a lot of them, like developer docs needing locality to code, you don't want to be spammed with those changes
          • When excluding noisy edits that aren't functionality related. The full changelog may actually do more to hide changes in noise.
          • Ultimately, you want the misconfiguration fixed because you were wrong to exclude in the first place.

          I can see valid cases where the changes in the excluded area are particularly long and it's unlikely they'll be affecting anything, docs for example. I also can see wanting to have those edits omitted from the stream rather than spamming on the next build. It's the same reasoning, but a simulation of http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html

          Brent Atkinson added a comment - Thanks for explaining, I agree with your reasoning and it matches my initial thinking. My personal preference would be to never exclude and use proper sub-trees. However, assuming that there are valid reasons for exclusion, which is suggested by the fact it exists: If it affects the build, it's a misconfiguration to exclude something that matters. You want to run verification on relevant changes. If there are a lot of them, like developer docs needing locality to code, you don't want to be spammed with those changes When excluding noisy edits that aren't functionality related. The full changelog may actually do more to hide changes in noise. Ultimately, you want the misconfiguration fixed because you were wrong to exclude in the first place. I can see valid cases where the changes in the excluded area are particularly long and it's unlikely they'll be affecting anything, docs for example. I also can see wanting to have those edits omitted from the stream rather than spamming on the next build. It's the same reasoning, but a simulation of http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html

          kutzi added a comment -

          You don't have to convince me that there are lots of good use cases to exclude the changes from the changelog. I'd even say that these use cases are more relevant than my use cases.

          Unfortunately, to exclude the changes from the changelog is a backward incompatible change and should therefore (IMHO) be configurable.
          Who knows, maybe someone else has a perfectly reasonable usecase to not exclude the changes and he would be negatively affected by this change.

          kutzi added a comment - You don't have to convince me that there are lots of good use cases to exclude the changes from the changelog. I'd even say that these use cases are more relevant than my use cases. Unfortunately, to exclude the changes from the changelog is a backward incompatible change and should therefore (IMHO) be configurable. Who knows, maybe someone else has a perfectly reasonable usecase to not exclude the changes and he would be negatively affected by this change.

          I agree, configuration would make it far less controversial. I apologize if I am belaboring it, but it helps to think it through and document the reasoning. I am definitely not trying to convert you. Like I said, my own preference would be to avoid the complication.

          Brent Atkinson added a comment - I agree, configuration would make it far less controversial. I apologize if I am belaboring it, but it helps to think it through and document the reasoning. I am definitely not trying to convert you. Like I said, my own preference would be to avoid the complication.

          Eugene Leonov added a comment -

          Firstsy, guys you are wonderful!
          Secondly, optional filtering is the best way.
          Thirdly, will this solution work for git?

          Eugene Leonov added a comment - Firstsy, guys you are wonderful! Secondly, optional filtering is the best way. Thirdly, will this solution work for git?

          kutzi added a comment -

          No, this would only apply for the subversion plugin. The Git plugin is a completely different codebase.

          kutzi added a comment - No, this would only apply for the subversion plugin. The Git plugin is a completely different codebase.

          The updated pull request now implements optional filtering of the changelog. All existing behavior is left intact, and the default for new configurations is not to filter the changelog.

          Brent Atkinson added a comment - The updated pull request now implements optional filtering of the changelog. All existing behavior is left intact, and the default for new configurations is not to filter the changelog.

          Refactored the filtering test so it tests both the old and new behavior, should be good to go.

          Brent Atkinson added a comment - Refactored the filtering test so it tests both the old and new behavior, should be good to go.

          Code changed in jenkins
          User: Brent Atkinson
          Path:
          src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          src/main/java/hudson/scm/SVNLogFilter.java
          src/main/java/hudson/scm/SubversionChangeLogBuilder.java
          src/main/java/hudson/scm/SubversionSCM.java
          http://jenkins-ci.org/commit/subversion-plugin/f71918fc997a38fab6b9133942b8ee68e70c999c
          Log:
          JENKINS-10449 Factored out svnlog filter to use with detection and changelogs

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Brent Atkinson Path: src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java src/main/java/hudson/scm/SVNLogFilter.java src/main/java/hudson/scm/SubversionChangeLogBuilder.java src/main/java/hudson/scm/SubversionSCM.java http://jenkins-ci.org/commit/subversion-plugin/f71918fc997a38fab6b9133942b8ee68e70c999c Log: JENKINS-10449 Factored out svnlog filter to use with detection and changelogs

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/scm/DefaultSVNLogFilter.java
          src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          src/main/java/hudson/scm/NullSVNLogFilter.java
          src/main/java/hudson/scm/SVNLogFilter.java
          src/main/java/hudson/scm/SubversionChangeLogBuilder.java
          src/main/java/hudson/scm/SubversionSCM.java
          src/main/resources/hudson/scm/SubversionSCM/config.jelly
          src/main/resources/hudson/scm/SubversionSCM/help-filterChangelog.html
          src/test/java/hudson/scm/DefaultSVNLogFilterTest.java
          src/test/java/hudson/scm/SubversionSCMTest.java
          src/test/java/hudson/scm/SubversionSCMUnitTest.java
          src/test/resources/hudson/scm/JENKINS-10449.zip
          http://jenkins-ci.org/commit/subversion-plugin/72be6320a61f79ec329e0f42b496dbac8fff1644
          Log:
          Merge pull request #27 from batkinson/JENKINS-10449

          Filter changelog based on the same inclusion/exclusion filters used to detect changes. [FIXED JENKINS-10449]

          Compare: https://github.com/jenkinsci/subversion-plugin/compare/ed8a1f80131f...72be6320a61f

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/scm/DefaultSVNLogFilter.java src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java src/main/java/hudson/scm/NullSVNLogFilter.java src/main/java/hudson/scm/SVNLogFilter.java src/main/java/hudson/scm/SubversionChangeLogBuilder.java src/main/java/hudson/scm/SubversionSCM.java src/main/resources/hudson/scm/SubversionSCM/config.jelly src/main/resources/hudson/scm/SubversionSCM/help-filterChangelog.html src/test/java/hudson/scm/DefaultSVNLogFilterTest.java src/test/java/hudson/scm/SubversionSCMTest.java src/test/java/hudson/scm/SubversionSCMUnitTest.java src/test/resources/hudson/scm/ JENKINS-10449 .zip http://jenkins-ci.org/commit/subversion-plugin/72be6320a61f79ec329e0f42b496dbac8fff1644 Log: Merge pull request #27 from batkinson/ JENKINS-10449 Filter changelog based on the same inclusion/exclusion filters used to detect changes. [FIXED JENKINS-10449] Compare: https://github.com/jenkinsci/subversion-plugin/compare/ed8a1f80131f...72be6320a61f

            Unassigned Unassigned
            jorgenpt Jørgen Tjernø
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: