chore: method signature changed for getCachedDatasourceForActtionExecution (#18950)
## Description > To accommodate for datasource context adaption for environments, Some datasourceService methods needs to be aware of `environment name` in order to evaluate the `datasource configuration` for the given environment > TL; DR : This Pr changes method signature for fetching datasource by actionId Fixes #18760 Ref #18762 ## Type of change > Chore ## How Has This Been Tested? - Manual - Jest ## Checklist: ### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag
This commit is contained in:
parent
051444f221
commit
2445a3c625
|
|
@ -682,7 +682,7 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
|
||||||
* @param actionDTOMono
|
* @param actionDTOMono
|
||||||
* @return datasourceMono
|
* @return datasourceMono
|
||||||
*/
|
*/
|
||||||
protected Mono<Datasource> getCachedDatasourceForActionExecution(Mono<ActionDTO> actionDTOMono) {
|
protected Mono<Datasource> getCachedDatasourceForActionExecution(Mono<ActionDTO> actionDTOMono, String environmentName) {
|
||||||
|
|
||||||
return actionDTOMono
|
return actionDTOMono
|
||||||
.flatMap(actionDTO -> datasourceService.getValidDatasourceFromActionMono(actionDTO,
|
.flatMap(actionDTO -> datasourceService.getValidDatasourceFromActionMono(actionDTO,
|
||||||
|
|
@ -976,7 +976,7 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
|
||||||
Mono<ActionDTO> actionDTOMono = getCachedActionDTOForActionExecution(actionMono, executeActionDTO, actionId);
|
Mono<ActionDTO> actionDTOMono = getCachedActionDTOForActionExecution(actionMono, executeActionDTO, actionId);
|
||||||
|
|
||||||
// 3. Instantiate the implementation class based on the query type
|
// 3. Instantiate the implementation class based on the query type
|
||||||
Mono<Datasource> datasourceMono = getCachedDatasourceForActionExecution(actionDTOMono);
|
Mono<Datasource> datasourceMono = getCachedDatasourceForActionExecution(actionDTOMono, environmentName);
|
||||||
Mono<Plugin> pluginMono = getCachedPluginForActionExecution(datasourceMono, actionId);
|
Mono<Plugin> pluginMono = getCachedPluginForActionExecution(datasourceMono, actionId);
|
||||||
Mono<PluginExecutor> pluginExecutorMono = pluginExecutorHelper.getPluginExecutor(pluginMono);
|
Mono<PluginExecutor> pluginExecutorMono = pluginExecutorHelper.getPluginExecutor(pluginMono);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user