Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.appsmith.server.dtos;

import com.appsmith.server.domains.Plugin;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -14,4 +15,5 @@ public class ExecuteActionMetaDTO {
String environmentId;
HttpHeaders headers;
boolean operateWithoutPermission = false;
Plugin plugin;
}
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,22 @@ public Mono<ActionExecutionResult> executeAction(
.operateWithoutPermission(operateWithoutPermission)
.environmentId(environmentId)
.build();
Mono<ExecuteActionDTO> executeActionDTOMono = createExecuteActionDTO(partFlux);
return executeActionDTOMono
.flatMap(executeActionDTO -> populateAndExecuteAction(executeActionDTO, executeActionMetaDTO))
.name(ACTION_EXECUTION_SERVER_EXECUTION)
.tap(Micrometer.observation(observationRegistry));
Mono<ExecuteActionDTO> executeActionDTOMono =
createExecuteActionDTO(partFlux).cache();
Mono<Plugin> pluginMono = executeActionDTOMono.flatMap(executeActionDTO -> newActionService
.findById(executeActionDTO.getActionId())
.flatMap(newAction -> pluginService.findById(newAction.getPluginId()))
Comment thread
ApekshaBhosale marked this conversation as resolved.
Outdated
.cache());

return pluginMono.flatMap(plugin -> {
String pluginName = plugin.getName();
executeActionMetaDTO.setPlugin(plugin);
return executeActionDTOMono
.flatMap(executeActionDTO -> populateAndExecuteAction(executeActionDTO, executeActionMetaDTO))
.tag("plugin", pluginName)
.name(ACTION_EXECUTION_SERVER_EXECUTION)
.tap(Micrometer.observation(observationRegistry));
});
}

/**
Expand All @@ -322,7 +333,7 @@ public Mono<ActionExecutionResult> executeAction(

// 3. Instantiate the implementation class based on the query type
Mono<DatasourceStorage> datasourceStorageMono = getCachedDatasourceStorage(actionDTOMono, executeActionMetaDTO);
Mono<Plugin> pluginMono = getCachedPluginForActionExecution(datasourceStorageMono);
Mono<Plugin> pluginMono = Mono.just(executeActionMetaDTO.getPlugin());
Comment thread
ApekshaBhosale marked this conversation as resolved.
Outdated
Mono<PluginExecutor> pluginExecutorMono = pluginExecutorHelper.getPluginExecutor(pluginMono);

// 4. Execute the query
Expand Down