-
Bug
-
Resolution: Unresolved
-
Critical
-
Jenkins version: 2.440.1 LTS (JDK17)
Active Choices plugin version: 2.8.1
(confirmed presence in v2.8.0-v2.8.4, allegedly present in v2.7.x, allegedly not present in v2.6.x)
Jenkins Active Choices Plugin Parameter Rendering Bug
This is a formal report of the issue related to the cascading parameters bug.
The bug is related to the problem with the parameter value rendering for cascading parameters in the Jenkins Active Choices Plugin, primarily with the ordering of the dependent parameters.
This issue has been reported already on multiple occasions:
The bug caused cascading parameters (dynamic parameters + dynamic reference parameters) not to render correctly - the parameter values not being updated during the build UI interaction due to the lack of proper change propagation logic in the plugin.
The Problem
Our suspicion is that the root cause of the problem is most likely in one of the following:
- UnoChoice frontend code
- CascadeParameter.update() / DynamicReferenceParameter.update() methods
- The methods returning prematurely due to incorrect use of asynchronous calls (e.g. Promise objects)
- proxy.doUpdate() method
- Potentially similar issues as stated above
- CascadeParameter.update() / DynamicReferenceParameter.update() methods
- Plugin Java code
- AbstractCascadableParameter.update() method
What is important to note is that the key problem is the clash between the parameter rendering timing which results in the wrong order of parameter rendering and the lack of proper change propagation logic in the plugin.
The Solution (Workaround)
We created a dedicated project for applying a fix / patch as a workaround for this project.
More info is available here (on our GitHub).
Pre-built patched bundles of the plugin (containing the workaround) are available here (on our GitHub) while we all wait for the maintainers to address and fix the issue.
But please, make sure to read the associated documentation for a better understanding of what this workaround does, how it works, and what are its limitations. Also, preferably, for security reasons, you should build the patched plugin bundle yourself.
We will also submit a proper PR which addresses this issue and attempts to fix it, but due to the nature of our current fix (a lot of code logic being appended to an existing JavaScript file), we are not sure what will the maintainers' reception be.
- is related to
-
JENKINS-71909 active choice updates in wrong order (does not Cascade the values correctly)
- Closed