You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/04/14 14:08:20 UTC

(airflow) branch main updated: fix(AssetSchedule): use asset.name if exists (#49225)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 571fce66188 fix(AssetSchedule): use asset.name if exists (#49225)
571fce66188 is described below

commit 571fce661888ae33a3320f60c761b8e22b66ca52
Author: Wei Lee <we...@gmail.com>
AuthorDate: Mon Apr 14 22:08:13 2025 +0800

    fix(AssetSchedule): use asset.name if exists (#49225)
    
    Currently, the UI logic always fallback to uri
    
    closes: #49197
---
 airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx b/airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx
index 1ec6fd3d53c..854ca8cdb6c 100644
--- a/airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx
@@ -53,7 +53,11 @@ export const AssetSchedule = ({ dag }: Props) => {
         <Button loading={isLoading} paddingInline={0} size="sm" variant="ghost">
           <FiDatabase style={{ display: "inline" }} />
           {nextRunEvents.length === 1 ? (
-            ((nextRun?.asset_expression as { expr: AssetResponse | undefined }).expr?.name ??
+            ((nextRun?.asset_expression as { all: Array<{ asset: AssetResponse }> | undefined }).all?.at(0)
+              ?.asset.name ??
+            (nextRun?.asset_expression as { any: Array<{ asset: AssetResponse }> | undefined }).any?.at(0)
+              ?.asset.name ??
+            (nextRun?.asset_expression as { asset: AssetResponse | undefined }).asset?.name ??
             nextRunEvents[0]?.uri)
           ) : (
             <>