-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins: 2.204.5
Job Configuration History Plugin: 2.26
Hi,
because currently history of changed nodes is wrong, I tried to exclude nodes from history.
( JENKINS-62239, JENKINS-58125 )
I used different regular expressions at "Configuration exclude file pattern".
Not even "config.xml" worked. Plugin stopped to save history for jobs but not for nodes.
- causes
-
JENKINS-66533 Exception: "Could not create rootDir"
-
- Open
-
- is related to
-
JENKINS-66748 Config history plugin keeps node history forever
-
- Open
-
I've just encountered this same problem myself - changes to Nodes do not take any notice of the exclusionFilter.
I traced the code and I've found the underlying cause:
hudson.plugins.jobConfigHistory.ComputerHistoryListener's 4 methods onAdd, onRename, onChange and onRemove all call its private method boolean isTracked(Node node) BUT this method does not take the exclusionFilter into consideration.
What it does do is assume that the plugin can safely ignore any Nodes that are instanceof AbstractCloudSlave or instanceof EphemeralNode ... and that everything else needs to have its history recorded.
Unfortunately, not all nodes that users don't care about meet these criteria, e.g. the docker-plugin's DockerTransientNode.
...and if there's a lot of them then that can fill up the filesystem and cause problems like JENKINS-66533
...and you can't exclude them using e.g. |nodes/docker| inside the exclusion filter as that's ignored for nodes.
IMO the isTracked method should also check the exclusion filter and see if it matches the Node's config.xml before deciding.