-
Bug
-
Resolution: Fixed
-
Blocker
-
None
-
JENKINS 2.156
Arch Linux
Relevant installed plugins:
warnings-ng 1.0.1
pmd 4.0.0
android-lint 2.6
checkstyle 4.0.0
workflow-cps 2.61.1
-
-
3.0.1
If two plugins define symbols with the same name then the declarative pipeline engine can't invoke a job anymore.
Example: warnings-ng plugin and androidLint define the same symbol androidLint (one is for a step in the androidLint plugin, one is for the selected tool in warnings-ng).
This is a much bigger problem as in JENKINS-55328 for scripted pipelines. Here one simply can use the additional symbol (androidLintParser) to make the old and new plugin happy. This does not work for declarative pipelines.
Example (usage of OLD plugins):
pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0'
If the new warnings-ng plugin is installed (but not used) I get the following error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 67: Invalid parameter "canComputeNew", did you mean "name"? @ line 67, column 33. pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 67: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 67, column 55. canComputeNew: false, canRunOnFa ^ WorkflowScript: 67: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 67, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 67: Invalid parameter "healthy", did you mean "name"? @ line 67, column 98. d: true, defaultEncoding: '', healthy: ' ^ WorkflowScript: 67: Invalid parameter "unHealthy", did you mean "name"? @ line 67, column 147. n: "$reports/pmd.xml", unHealthy: ^ WorkflowScript: 67: Invalid parameter "unstableTotalAll", did you mean "name"? @ line 67, column 162. d.xml", unHealthy: '', unstableTo ^ WorkflowScript: 69: Invalid parameter "canComputeNew", did you mean "name"? @ line 69, column 33. androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 69: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 69, column 55. oidLint canComputeNew: false, canRunOnFa ^ WorkflowScript: 69: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 69, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 69: Invalid parameter "healthy", did you mean "name"? @ line 69, column 98. d: true, defaultEncoding: '', healthy: ' ^ 10 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
I do not have these issues if I uninstall the warnings-ng plugin.
- relates to
-
JENKINS-55328 recordIssues and ScanForIssues in Pipeline get NPE Errors
-
- Resolved
-
-
JENKINS-55349 Duplicate symbols in different plugins cause NPEs
-
- Open
-
[JENKINS-55436] Duplicate symbols break declarative pipeline engine
Environment |
Original:
JENKINS 2.156 Arch Linux |
New:
JENKINS 2.156 Arch Linux Relevant installed plugins: warnings-ng pmd android-lint checkstyle |
Description |
Original:
Many of the jobs I use have collect static analysis the following way: {code} pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' {code} Now I want to migrate them to warnings-ng with the following code: {code} recordIssues(tools: [androidLint(pattern: "$reports/lint*.xml"), checkStyle(pattern: "$reports/checkstyle.xml"), pmdParser(pattern: "$reports/pmd.xml")], aggregatingResults: true, enabledForFailure: true) {code} I face multiple issues though: # warnings-ng is not backwards compatible due to different parameters it accepts # having the Android Lint plugin, the Checkstyle plugin, and the PMD plugin installed alongside warnings-ng breaks builds # This means that I have to transition *all* jobs to warnings-ng which is simply not feasible, given that there are multiple branches that are build and given our policies. Especially I would have to perform the transition at once to avoid failing builds. I think the plugin should be backwards compatible by accepting the additional parameters I listed above. |
New:
Many of the jobs I use have collect static analysis the following way (OLD): {code} pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' {code} Now I want to migrate them to warnings-ng with the following code (NEW): {code} recordIssues(tools: [androidLint(pattern: "$reports/lint*.xml"), checkStyle(pattern: "$reports/checkstyle.xml"), pmdParser(pattern: "$reports/pmd.xml")], aggregatingResults: true, enabledForFailure: true) {code} I face multiple issues though: # warnings-ng is not backwards compatible due to different parameters it accepts # having the Android Lint plugin, the Checkstyle plugin, and the PMD plugin installed alongside warnings-ng breaks builds # This means that I have to transition *all* jobs to warnings-ng which is simply not feasible, given that there are multiple branches that are build and given our policies. Especially I would have to perform the transition at once to avoid failing builds. I think the plugin should be backwards compatible by accepting the additional parameters I listed above. Now when I build a job that uses OLD I get the following error: {noformat} org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 67: Invalid parameter "canComputeNew", did you mean "name"? @ line 67, column 33. pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 67: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 67, column 55. canComputeNew: false, canRunOnFa ^ WorkflowScript: 67: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 67, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 67: Invalid parameter "healthy", did you mean "name"? @ line 67, column 98. d: true, defaultEncoding: '', healthy: ' ^ WorkflowScript: 67: Invalid parameter "unHealthy", did you mean "name"? @ line 67, column 147. n: "$reports/pmd.xml", unHealthy: ^ WorkflowScript: 67: Invalid parameter "unstableTotalAll", did you mean "name"? @ line 67, column 162. d.xml", unHealthy: '', unstableTo ^ WorkflowScript: 69: Invalid parameter "canComputeNew", did you mean "name"? @ line 69, column 33. androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 69: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 69, column 55. oidLint canComputeNew: false, canRunOnFa ^ WorkflowScript: 69: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 69, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 69: Invalid parameter "healthy", did you mean "name"? @ line 69, column 98. d: true, defaultEncoding: '', healthy: ' ^ 10 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE {noformat} I do not have these issues if I *uninstall* the warnings-ng plugin. Therefore I think that the warnings-ng plugin is incompatible with *android-lint* and *pmd*. I do not have these issues with the checkstyle plugin. |
Environment |
Original:
JENKINS 2.156 Arch Linux Relevant installed plugins: warnings-ng pmd android-lint checkstyle |
New:
JENKINS 2.156 Arch Linux Relevant installed plugins: warnings-ng 1.0.1 pmd 4.0.0 android-lint 2.6 checkstyle 4.0.0 workflow-cps 2.61.1 |
Rank | New: Ranked higher |
Rank | New: Ranked higher |
Description |
Original:
Many of the jobs I use have collect static analysis the following way (OLD): {code} pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' {code} Now I want to migrate them to warnings-ng with the following code (NEW): {code} recordIssues(tools: [androidLint(pattern: "$reports/lint*.xml"), checkStyle(pattern: "$reports/checkstyle.xml"), pmdParser(pattern: "$reports/pmd.xml")], aggregatingResults: true, enabledForFailure: true) {code} I face multiple issues though: # warnings-ng is not backwards compatible due to different parameters it accepts # having the Android Lint plugin, the Checkstyle plugin, and the PMD plugin installed alongside warnings-ng breaks builds # This means that I have to transition *all* jobs to warnings-ng which is simply not feasible, given that there are multiple branches that are build and given our policies. Especially I would have to perform the transition at once to avoid failing builds. I think the plugin should be backwards compatible by accepting the additional parameters I listed above. Now when I build a job that uses OLD I get the following error: {noformat} org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 67: Invalid parameter "canComputeNew", did you mean "name"? @ line 67, column 33. pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 67: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 67, column 55. canComputeNew: false, canRunOnFa ^ WorkflowScript: 67: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 67, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 67: Invalid parameter "healthy", did you mean "name"? @ line 67, column 98. d: true, defaultEncoding: '', healthy: ' ^ WorkflowScript: 67: Invalid parameter "unHealthy", did you mean "name"? @ line 67, column 147. n: "$reports/pmd.xml", unHealthy: ^ WorkflowScript: 67: Invalid parameter "unstableTotalAll", did you mean "name"? @ line 67, column 162. d.xml", unHealthy: '', unstableTo ^ WorkflowScript: 69: Invalid parameter "canComputeNew", did you mean "name"? @ line 69, column 33. androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 69: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 69, column 55. oidLint canComputeNew: false, canRunOnFa ^ WorkflowScript: 69: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 69, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 69: Invalid parameter "healthy", did you mean "name"? @ line 69, column 98. d: true, defaultEncoding: '', healthy: ' ^ 10 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE {noformat} I do not have these issues if I *uninstall* the warnings-ng plugin. Therefore I think that the warnings-ng plugin is incompatible with *android-lint* and *pmd*. I do not have these issues with the checkstyle plugin. |
New:
If two plugins define symbols with the same name then the declarative pipeline engine can't invoke a job anymore. Example: warnings-ng plugin and androidLint define the same symbol \{{androidLint}} (one is for a step in the androidLint plugin, one is for the selected tool in warnings-ng). This is a much bigger problem as in Example (usage of OLD plugins): {code:java} pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' {code} If the new warnings-ng plugin is installed (but not used) I get the following error: {noformat} org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 67: Invalid parameter "canComputeNew", did you mean "name"? @ line 67, column 33. pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 67: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 67, column 55. canComputeNew: false, canRunOnFa ^ WorkflowScript: 67: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 67, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 67: Invalid parameter "healthy", did you mean "name"? @ line 67, column 98. d: true, defaultEncoding: '', healthy: ' ^ WorkflowScript: 67: Invalid parameter "unHealthy", did you mean "name"? @ line 67, column 147. n: "$reports/pmd.xml", unHealthy: ^ WorkflowScript: 67: Invalid parameter "unstableTotalAll", did you mean "name"? @ line 67, column 162. d.xml", unHealthy: '', unstableTo ^ WorkflowScript: 69: Invalid parameter "canComputeNew", did you mean "name"? @ line 69, column 33. androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 69: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 69, column 55. oidLint canComputeNew: false, canRunOnFa ^ WorkflowScript: 69: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 69, column 77. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 69: Invalid parameter "healthy", did you mean "name"? @ line 69, column 98. d: true, defaultEncoding: '', healthy: ' ^ 10 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE {noformat} I do not have these issues if I *uninstall* the warnings-ng plugin. |
Priority | Original: Major [ 3 ] | New: Blocker [ 1 ] |
Summary | Original: warnings-ng is not backwards compatible | New: Duplicate symbols break declarative pipeline engine |
Link |
New:
This issue relates to |
Link | New: This issue relates to JENKINS-55349 [ JENKINS-55349 ] |
Link | New: This issue is caused by INFRA-2012 [ INFRA-2012 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Fixed but Unreleased [ 10203 ] |