-
Bug
-
Resolution: Fixed
-
Minor
-
dynamic-axis-1.0.3
jenkins-1.509.4
The plugin continuously adds the 'default' axis value even if there's an existing variable in the environment.Dynamic axis source: String parameter.
The issue appears on the particular job only and cannot be reproduced on others. Job reloading does not resolve the issue.
Cause in DynamicAxis::rebuild():
1. method flushes the internal axis values cache
2. method calls build.getEnvironment to get the variable value
3. an external plugin (Perforce SCM in my case) calls DynamicAxis.getValues() to resolve variables
4. DynamicAxis.getValues() adds 'default', because the cache is empty
....
X. method adds variables from the variable, but 'default' still exists in the list
System log on 1 config (reverse order):
Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
FINE: Returning axis list [default, 1]
Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
FINE: Variable value is '1'
Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
FINE: Rebuilding axis names from variable 'NUMBER_FILES'
- links to
[JENKINS-27243] Default value appears in axes when there's an input variable
Remote Link | New: This issue links to "PR #5 (Web Link)" [ 12140 ] |
Assignee | New: Oleg Nenashev [ oleg_nenashev ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Description |
Original:
The plugin continuously adds the 'default' axis value even if there's an existing variable in the environment.Dynamic axis source: String parameter. The issue appears on the particular job only and cannot be reproduced on others. Job reloading does not resolve the issue. Cause (just a theory, cannot be reproduced on the test server): - Race condition in the plugin - DynamicAxis::getValues() returns an original data container without a copiyng => risk of the data corruption somewhere System log on 1 config (reverse order): Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis FINE: Returning axis list [default, 1] Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis FINE: Variable value is '1' Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis FINE: Rebuilding axis names from variable 'NUMBER_FILES' |
New:
The plugin continuously adds the 'default' axis value even if there's an existing variable in the environment.Dynamic axis source: String parameter. The issue appears on the particular job only and cannot be reproduced on others. Job reloading does not resolve the issue. Cause in DynamicAxis::rebuild(): 1. method flushes the internal axis values cache 2. method calls build.getEnvironment to get the variable value 3. an external plugin (Perforce SCM in my case) calls DynamicAxis.getValues() to resolve variables 4. DynamicAxis.getValues() adds 'default', because the cache is empty .... X. method adds variables from the variable, but 'default' still exists in the list System log on 1 config (reverse order): Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis FINE: Returning axis list [default, 1] Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis FINE: Variable value is '1' Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis FINE: Rebuilding axis names from variable 'NUMBER_FILES' |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 161444 ] | New: JNJira + In-Review [ 196764 ] |
Code changed in jenkins
User: Oleg Nenashev
Path:
src/test/java/ca/silvermaplesolutions/jenkins/plugins/daxis/DynamicAxisTest.java
http://jenkins-ci.org/commit/dynamic-axis-plugin/229a41c18f5c95bd47bd1bc308095d37366a23ba
Log:
JENKINS-27243- Added Unit test for the issueThe commit also adds a test of the basic functionality
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>