Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: structs-plugin
-
Labels:None
-
Environment:Jenkins LTS 2.32.2
branch-api:1.11.1 'Branch API Plugin'
workflow-aggregator:2.4 'Pipeline'
-
Similar Issues:
Description
In the snippet generator, the following configuration...
... returns:
properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], [$class: 'JobPropertyImpl', throttle: [count: 1, durationName: 'hour']], pipelineTriggers([])])
In the console output after running that snippet, it returns:
... Caused by: java.lang.UnsupportedOperationException: JobPropertyImpl as a class hudson.model.JobProperty could mean either jenkins.branch.RateLimitBranchProperty$JobPropertyImpl or com.cloudbees.hudson.plugins.modeling.impl.jobTemplate.JobPropertyImpl ... Finished: FAILURE
It is failing in recognized JobPropertyImpl
Workaround: change the above snippet for the following one which works:
properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], [$class: 'jenkins.branch.RateLimitBranchProperty$JobPropertyImpl', throttle: [count: 2, durationName: 'day']], pipelineTriggers([])])
Attachments
Issue Links
- is duplicated by
-
JENKINS-32476 Code Snippet Generator for 'step' should use class FQDN in case of collisions
-
- Resolved
-
- is related to
-
JENKINS-45130 When ambiguous classes are in a list / array they are given their simple name not FQCN
-
- Closed
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Description |
In the snippet generator, the following configuration... !001-2017-03-15 15_18_58-Pipeline Syntax_ Snippet Generator [Jenkins].png! ... returns: {code:java} properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], [$class: 'JobPropertyImpl', throttle: [count: 1, durationName: 'hour']], pipelineTriggers([])]){code} After running that snippet, the console output returns {{... Caused by: java.lang.UnsupportedOperationException: JobPropertyImpl as a class hudson.model.JobProperty could mean either jenkins.branch.RateLimitBranchProperty$JobPropertyImpl or com.cloudbees.hudson.plugins.modeling.impl.jobTemplate.JobPropertyImpl ... Finished: FAILURE}} It is failing in recognized {{JobPropertyImpl}} Workaround: change the above snippet for the following one which works: {code:java} properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], [$class: 'jenkins.branch.RateLimitBranchProperty$JobPropertyImpl', throttle: [count: 2, durationName: 'day']], pipelineTriggers([])]){code} |
In the +snippet generator+, the following configuration... !001-2017-03-15 15_18_58-Pipeline Syntax_ Snippet Generator [Jenkins].png! ... returns: {code:java} properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], [$class: 'JobPropertyImpl', throttle: [count: 1, durationName: 'hour']], pipelineTriggers([])]){code} In the +console output+ after running that snippet, it returns: {code:java} ... Caused by: java.lang.UnsupportedOperationException: JobPropertyImpl as a class hudson.model.JobProperty could mean either jenkins.branch.RateLimitBranchProperty$JobPropertyImpl or com.cloudbees.hudson.plugins.modeling.impl.jobTemplate.JobPropertyImpl ... Finished: FAILURE{code} It is failing in recognized {{JobPropertyImpl}} Workaround: change the above snippet for the following one which works: {code:java} properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], [$class: 'jenkins.branch.RateLimitBranchProperty$JobPropertyImpl', throttle: [count: 2, durationName: 'day']], pipelineTriggers([])]){code} |
Component/s | structs-plugin [ 21442 ] | |
Component/s | branch-api-plugin [ 18621 ] | |
Component/s | pipeline [ 21692 ] |
Assignee | Stephen Connolly [ stephenconnolly ] | Andrew Bayer [ abayer ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Remote Link | This issue links to "PR #17 (Web Link)" [ 15848 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Resolved [ 5 ] |
Link |
This issue is duplicated by |
Link |
This issue is related to |
Remote Link | This issue links to "CloudBees Internal OSS-2151 (Web Link)" [ 18401 ] |