We would like to know if it is possible (or already on your roadmap) to upgrade the version of Groovy in jobdsl-plugin/jenkins-core as we believe it will help with a memory leak we've been seeing.
We have a use case in our jenkins deployment where we build pipelines via the jobdsl plugin. We have noticed that when we execute this process multiple times we eventually run out of memory.
After lots of investigation and heap dump analysis we believe the issue is related to https://issues.jenkins-ci.org/browse/JENKINS-46687 and that the constant use of the GroovyShell.parse / parseClass eventually exhausts the memory. Part of the analysis that leads us to believe this is the attached heap analysis showing that there are instances of the MetaMethodIndex class that are never garbage collected.
We did try and set -Dgroovy.use.classvalue=true as per https://issues.jenkins-ci.org/browse/JENKINS-33358 , but that doesnt seem to work for us.
Looking at this comment in the groovy issues it suggests that upgrading to 2.5.6+ will help improve the evaluation of scripts in Groovy.
So we are wondering if it is possible to schedule (if not already scheduled) the upgrade of Groovy version? Or maybe even if you could suggest some other potential causes of the problem / solutions to try out?
Please let us know if you need more detail around this.