When running parallel builds there is a concern about how the active modules list is maintained. Currently, it is used as a stack in MPLModule.groovy
pushing as
try {
MPLManager.instance.pushActiveModule(module_path)
Helper.runModule(module_src, module_path, [CFG: Helper.flatten(cfg)])
}
poping as
finally {
.........
MPLManager.instance.popActiveModule()
}
when executing parallelly, the active module list is the same for all branches. so there might be instances where one branch will pop an active module that was pushed by another branch.
Therefore should we use active modules list as just a list instead of a stack? We just need to remove the module from the list by giving the module path as follow
in MPLManager.groovy change popActiveModule
public popActiveModule(String path) {
if(activeModules.contains(path)){
activeModules -= path
}
}
When running parallel builds there is a concern about how the active modules list is maintained. Currently, it is used as a stack in MPLModule.groovy
pushing as
try {MPLManager.instance.pushActiveModule(module_path)Helper.runModule(module_src, module_path, [CFG: Helper.flatten(cfg)])}poping as
finally {.........MPLManager.instance.popActiveModule()}when executing parallelly, the active module list is the same for all branches. so there might be instances where one branch will pop an active module that was pushed by another branch.
Therefore should we use active modules list as just a list instead of a stack? We just need to remove the module from the list by giving the module path as follow
in MPLManager.groovy change
popActiveModulepublic popActiveModule(String path) {if(activeModules.contains(path)){activeModules -= path}}