From f440a8f501e1bb20ddea422cd4127ef0efd91dbe Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Wed, 11 May 2022 22:45:29 +0530 Subject: [PATCH] Fix #4864 Ingestion UI | Updating an existing Snowflake Usage Ingestion pipeline via UI is not working (#4891) --- .../AddIngestion/AddIngestion.component.tsx | 8 ++--- .../Ingestion/Ingestion.component.tsx | 8 ++--- .../Ingestion/ingestion.interface.ts | 2 +- .../EditIngestionPage.component.tsx | 6 ++-- .../resources/ui/src/pages/service/index.tsx | 31 ++----------------- 5 files changed, 11 insertions(+), 44 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddIngestion/AddIngestion.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddIngestion/AddIngestion.component.tsx index c58fae541f2..fcfa9be1a00 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddIngestion/AddIngestion.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddIngestion/AddIngestion.component.tsx @@ -474,9 +474,7 @@ const AddIngestion = ({ if (onUpdateIngestion) { setSaveState('waiting'); - if (!data.deployed) { - setShowDeployModal(true); - } + setShowDeployModal(true); onUpdateIngestion(updatedData, data, data.id as string, data.name) .then(() => { setSaveState('success'); @@ -510,9 +508,7 @@ const AddIngestion = ({ }; const getSuccessMessage = () => { - const updateMessage = data?.deployed - ? `has been updated successfully` - : showDeployButton + const updateMessage = showDeployButton ? 'has been updated, but failed to deploy' : 'has been updated and deployed successfully'; const createMessage = showDeployButton diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx index bed8445aa30..75d5815cffe 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx @@ -113,9 +113,9 @@ const Ingestion: React.FC = ({ .catch(() => setCurrTriggerId({ id: '', state: '' })); }; - const handleDeployIngestion = (id: string, ingestion: IngestionPipeline) => { + const handleDeployIngestion = (id: string) => { setCurrDeployId({ id, state: 'waiting' }); - deployIngestion(ingestion) + deployIngestion(id) .then(() => { setCurrDeployId({ id, state: 'success' }); setTimeout(() => setCurrDeployId({ id: '', state: '' }), 1500); @@ -332,9 +332,7 @@ const Ingestion: React.FC = ({