Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

mrq etl issue fixes (#535)

vishnuszipstackab4901d47895
diff --git a/backend/pipeline/serializers/crud.py b/backend/pipeline/serializers/crud.py
index 56e5d1142..3480ac832 100644
--- a/backend/pipeline/serializers/crud.py
+++ b/backend/pipeline/serializers/crud.py
@@ -10,6 +10,7 @@ from pipeline.constants import PipelineKey as PK
from pipeline.models import Pipeline
from scheduler.helper import SchedulerHelper
from utils.serializer_utils import SerializerUtils
+from workflow_manager.endpoint.models import WorkflowEndpoint
from backend.serializers import AuditSerializer
from unstract.connectors.connectorkit import Connectorkit
@@ -73,6 +74,18 @@ class PipelineSerializer(AuditSerializer):
connector_id=instance.connector_id,
)
)
+ if repr[PC.DESTINATION_NAME] == PC.NOT_CONFIGURED:
+ try:
+ check_manual_review = WorkflowEndpoint.objects.get(
+ workflow=instance.workflow,
+ endpoint_type=WorkflowEndpoint.EndpointType.DESTINATION,
+ connection_type=WorkflowEndpoint.ConnectionType.MANUALREVIEW,
+ )
+ if check_manual_review:
+ repr[PC.DESTINATION_NAME] = "Manual Review"
+ except Exception as ex:
+ logger.debug(f"Not a Manual review destination: {ex}")
+
return repr
def to_representation(self, instance: Pipeline) -> OrderedDict[str, Any]:
diff --git a/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx b/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx
index a0383126f..bae1807df 100644
--- a/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx
+++ b/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx
@@ -95,21 +95,31 @@ const EtlTaskDeploy = ({
return null;
});
};
-
- const getWorkflows = () => {
- const connectorType = type === "task" ? "FILESYSTEM" : "DATABASE";
+ const fetchWorkflows = (type) =>
workflowApiService
- .getWorkflowEndpointList("DESTINATION", connectorType)
- .then((res) => {
- const updatedData = res?.data.map((record) => ({
+ .getWorkflowEndpointList("DESTINATION", type)
+ .then((res) =>
+ res?.data.map((record) => ({
...record,
id: record.workflow,
- }));
- setWorkflowList(updatedData);
- })
+ }))
+ )
.catch(() => {
- console.error("Unable to get workflow list");
+ return [];
});
+ const getWorkflows = () => {
+ const connectorType = type === "task" ? "FILESYSTEM" : "DATABASE";
+ setWorkflowList([]);
+ fetchWorkflows(connectorType).then((data) => {
+ if (connectorType === "DATABASE") {
+ fetchWorkflows("MANUALREVIEW").then((manualReviewData) => {
+ const combinedData = [...data, ...manualReviewData];
+ setWorkflowList(combinedData);
+ });
+ } else {
+ setWorkflowList(data);
+ }
+ });
};
useEffect(() => {