[JIRA] (JENKINS-58453) File handle leak when applying configuration as code file

4 views
Skip to first unread message

michaelw@ea.com (JIRA)

unread,
Jul 11, 2019, 7:44:03 PM7/11/19
to jenkinsc...@googlegroups.com
Michael Wong created an issue
 
Jenkins / Bug JENKINS-58453
File handle leak when applying configuration as code file
Issue Type: Bug Bug
Assignee: Ewelina Wilkosz
Components: configuration-as-code-plugin
Created: 2019-07-11 23:43
Environment: Jenkins 1.164.1
Configuration as Code Plugin 1.23
Java 1.8.0_181
Priority: Critical Critical
Reporter: Michael Wong

I've encountered a file handle leak on the configuration yaml file whenever the configuration file is applied.

This happens whenever you apply the configuration (through the UI or through groovy).

We have a groovy script that calls the plugin directly to apply the configuration every 15 minutes, so that we can keep the CasC settings in source control to apply to our Jenkins servers periodically. We've noticed that the server will eventually run out of file handles and tracked it down to the CasC configuration file. The file handle leak makes this unusable.

 
 

def casc = new GroovyClassLoader(context.class.getClassLoader()).loadClass("io.jenkins.plugins.casc.ConfigurationAsCode")
def configFile = new File(configPath)
if (casc && configFile.exists()) {
     context.echo("Now loading config file: ${configFile.absolutePath}")
     casc.get().configure(configFile.absolutePath)        
}

 
 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

michaelw@ea.com (JIRA)

unread,
Jul 11, 2019, 7:47:02 PM7/11/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages