Problem
Running Jenkins 2.426.3, with JobsDSL 1.87 we saw something change on our controller that resulted in these errors
ERROR: (unknown source)
No signature of method:
javaposse.jobdsl.dsl.helpers.workflow.WorkflowDefinitionContext.readFileFromWorkspace(
)
is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl)
values: [jobNameString]
We initially assumed it was a GString, GstringImpl vs String so we added .toString() to coerce the variable to the correct type. This didn't work but when we prefixed the call with this it did work
failing: readFileFromWorkspace(jobName)
passing: this.readFileFromWorkspace(jobName)
After making the change more globally, we discovered that we hit a problem with the parameters() method needing prefix of this.method() as well. So, it seems like a larger problem.
We installed the same Jenkins controller AMI in a test environment and didn't see the issue. We did a compare contrast for all but the girthy directories (jobs, fingerprints, users). We didn't see much that would explain the issue.
- We restarted the service, problem persisted
- We terminated the instance, forcing ASG to remake - problem persisted
A new ASG means the only thing kept constance is the jobs directory. The rest of the content was refreshed and the memory was completely cleared.
Finally, we installed our next version AMI and the problem went away.
The next version AMI has
- minor user group / role changes
- unrelated plugin changes
- 'com.coravy.hudson.plugins.github:github:1.38.0'
- 'io.jenkins.plugins:artifact-manager-s3:845.vb_0805c11eb_26'
- 'io.jenkins.plugins:joda-time-api:2.12.7-29.v5a_b_e3a_82269a_'
- 'io.jenkins.plugins:json-api:20240205-27.va_007549e895c'
- 'io.jenkins.plugins:okhttp-api:4.11.0-172.vda_da_1feeb_c6e'
- 'me.vickychijwani.jenkins:labelled-steps:1.0'
- 'org.datadog.jenkins.plugins:datadog:6.0.2'
- 'org.jenkins-ci.plugins.workflow:workflow-api:1291.v51fd2a_625da_7'
- 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:1331.vc8c2fed35334'
- 'org.jenkins-ci.plugins:branch-api:2.1148.vce12cfcdf090'
- 'org.jenkins-ci.plugins:cloudbees-bitbucket-branch-source:871.v28d74e8b_4226'
- 'org.jenkins-ci.plugins:durable-task:550.v0930093c4b_a_6'
- 'org.jenkins-ci.plugins:junit:1259.v65ffcef24a_88'
- 'org.jenkins-ci.plugins:pipeline-utility-steps:2.16.2'
- 'org.jenkins-ci.plugins:script-security:1321.va_73c0795b_923'
- 'org.jvnet.hudson.plugins:monitoring:1.98.0'
Questions
- Anyone got theories on root cause?
- Has anyone seen classpath changed by the jobDSL plugin due to some other plugin interaction or user content?