-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Fedora 38, Jenkins 2.414.3
Adding exclusions for branches such /branches/ to the exclude pattern doesn't give the expected result.
queue\.xml|nodeMonitors\.xml|UpdateCenter\.xml|global-build-stats|LockableResourcesManager\.xml|MilestoneStep\.xml|cloudbees-disk-usage-simple\.xml|/branches/
New history files are still being added when branches are pushed to the SCM. This can be thousands of files in our case.
12:30:57 CEST /opt/jenkins/config-history/jobConfigHistory 12:30:57 CEST /opt/jenkins/config-history/jobConfigHistory/2023-10-24_12-30-57/history.xml 12:30:57 CEST /opt/jenkins/config-history/jobConfigHistory/2023-10-24_12-30-57 12:30:57 CEST /opt/jenkins/config-history/jobConfigHistory/2023-10-24_12-30-57/jobConfigHistory.xml 13:26:46 CEST /opt/jenkins/config-history/jobs/mytest/branches/feature-CORP.5pesja.history-test 13:26:46 CEST /opt/jenkins/config-history/jobs/mytest/branches/feature-CORP.5pesja.history-test/2023-10-24_13-26-46/history.xml 13:26:46 CEST /opt/jenkins/config-history/jobs/mytest/branches/feature-CORP.5pesja.history-test/2023-10-24_13-26-46 13:26:46 CEST /opt/jenkins/config-history/jobs/mytest/branches/feature-CORP.5pesja.history-test/2023-10-24_13-26-46/config.xml
I did a little digging and as far as I can tell this is because the plugin.isSaveable() filtering is only done in the JobConfigHistorySaveableListener and not in the JobConfigHistoryJobListener
I think the isSavable() call(s) should probably be moved to the FileHistoryDao since it is used by both Listener classes.
The interesting thing is that there is a unit-test specifically for this use-case: https://github.com/jenkinsci/job-config-history-plugin/blob/1229.v3039470161a_d/src/test/java/hudson/plugins/jobConfigHistory/JobConfigHistoryTest.java#L367-L369
But I think the setup of the test is faulty, since this is not a real-world flow.