Anuragp22 commented on code in PR #67725:
URL: https://github.com/apache/airflow/pull/67725#discussion_r3480244731
##########
airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.tsx:
##########
@@ -20,18 +20,21 @@ import { Box, HStack, Text } from "@chakra-ui/react";
import { FiDatabase } from "react-icons/fi";
import { PiRectangleDashed } from "react-icons/pi";
-import type { NextRunAssetEventResponse } from "openapi/requests/types.gen";
+import type {
+ AssetExpressionAlias,
+ AssetExpressionAsset,
+ NextRunAssetEventResponse,
+} from "openapi/requests/types.gen";
import { RollupKeyChecklistPopover } from "src/components/RollupKeyChecklist";
import { RouterLink } from "src/components/ui";
import Time from "../Time";
-import type { AssetSummary } from "./types";
export const AssetNode = ({
asset,
event,
}: {
- readonly asset: AssetSummary;
+ readonly asset: AssetExpressionAlias | AssetExpressionAsset;
Review Comment:
The old `AssetSummary` was a hand-maintained type, which is why @bbovenzi
suggested removing it earlier. A named alias over the generated union
(something like `type AssetSummary = AssetExpressionAlias |
AssetExpressionAsset`) wouldn't have that problem though, since it comes
straight from the generated client and can't drift out of sync. So I guess no
new issues there. It's only used in one place (AssetNode) right now so I just
inlined it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]