From 1c2219517e21f64ec82aa5925126d3751010dc8c Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Fri, 29 Dec 2023 09:41:59 +0100 Subject: [PATCH] #13649 - Add Pipeline Status Skipped (#14524) * #13649 - Add Pipeline Status Skipped * Format --- .../metadata/ingestion/source/pipeline/airflow/metadata.py | 2 ++ .../main/resources/json/schema/entity/data/pipeline.json | 5 ++++- .../src/main/resources/ui/src/assets/svg/skipped-badge.svg | 1 + .../main/resources/ui/src/constants/execution.constants.ts | 1 + .../main/resources/ui/src/utils/PipelineDetailsUtils.ts | 3 +++ .../src/main/resources/ui/src/utils/SvgUtils.tsx | 7 +++++++ .../src/main/resources/ui/src/utils/executionUtils.tsx | 1 + 7 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/assets/svg/skipped-badge.svg diff --git a/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py b/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py index 53b31862855..c68b4752a55 100644 --- a/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py +++ b/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py @@ -72,12 +72,14 @@ class AirflowTaskStatus(Enum): FAILED = "failed" QUEUED = "queued" REMOVED = "removed" + SKIPPED = "skipped" STATUS_MAP = { AirflowTaskStatus.SUCCESS.value: StatusType.Successful.value, AirflowTaskStatus.FAILED.value: StatusType.Failed.value, AirflowTaskStatus.QUEUED.value: StatusType.Pending.value, + AirflowTaskStatus.SKIPPED.value: StatusType.Skipped.value, } diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json index 1d2963faef3..fe726be4ec5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json @@ -19,7 +19,7 @@ "javaType": "org.openmetadata.schema.type.StatusType", "description": "Enum defining the possible Status.", "type": "string", - "enum": ["Successful", "Failed", "Pending"], + "enum": ["Successful", "Failed", "Pending", "Skipped"], "javaEnums": [ { "name": "Successful" @@ -29,6 +29,9 @@ }, { "name": "Pending" + }, + { + "name": "Skipped" } ] }, diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/skipped-badge.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/skipped-badge.svg new file mode 100644 index 00000000000..c1e3d0ee648 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/skipped-badge.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/execution.constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/execution.constants.ts index e196af218c3..de16e53a4be 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/execution.constants.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/execution.constants.ts @@ -18,6 +18,7 @@ export const MenuOptions = { [StatusType.Successful]: 'Success', [StatusType.Failed]: 'Failed', [StatusType.Pending]: 'Pending', + [StatusType.Skipped]: 'Skipped', Aborted: 'Aborted', }; diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts index 5da6f3c73e5..30a06216700 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/PipelineDetailsUtils.ts @@ -39,6 +39,9 @@ export const getStatusBadgeIcon = (status?: StatusType) => { case StatusType.Pending: return Icons.PENDING_BADGE; + case StatusType.Skipped: + return Icons.SKIPPED_BADGE; + default: return ''; } diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx index 805085963f8..49c4ebe9e00 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/SvgUtils.tsx @@ -172,6 +172,7 @@ import IconSearchV1Color from '../assets/svg/search-color.svg'; import IconSearchV1 from '../assets/svg/search.svg'; import IconSetting from '../assets/svg/service.svg'; import IconShowPassword from '../assets/svg/show-password.svg'; +import IconSkippedBadge from '../assets/svg/skipped-badge.svg'; import IconSlackGrey from '../assets/svg/slack-grey.svg'; import IconSlack from '../assets/svg/slack.svg'; import IconSuccessBadge from '../assets/svg/success-badge.svg'; @@ -338,6 +339,7 @@ export const Icons = { SUCCESS_BADGE: 'success-badge', FAIL_BADGE: 'fail-badge', PENDING_BADGE: 'pending-badge', + SKIPPED_BADGE: 'skipped-badge', BOT_PROFILE: 'bot-profile', CREATE_INGESTION: 'create-ingestion', DEPLOY_INGESTION: 'deploy-ingestion', @@ -955,6 +957,11 @@ const SVGIcons: FunctionComponent = ({ icon, ...props }: Props) => { case Icons.PENDING_BADGE: IconComponent = IconPendingBadge; + break; + + case Icons.SKIPPED_BADGE: + IconComponent = IconSkippedBadge; + break; case Icons.BOT_PROFILE: IconComponent = IconBotProfile; diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/executionUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/executionUtils.tsx index 63a31b75d12..dae3dfaf2c3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/executionUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/executionUtils.tsx @@ -47,6 +47,7 @@ export const StatusIndicator = ({ status }: StatusIndicatorInterface) => ( : ''} {status === StatusType.Failed ? MenuOptions[StatusType.Failed] : ''} {status === StatusType.Pending ? MenuOptions[StatusType.Pending] : ''} + {status === StatusType.Skipped ? MenuOptions[StatusType.Skipped] : ''}

);