bbovenzi commented on code in PR #76840:
URL: https://github.com/apache/airflow/pull/76840#discussion_r4529543041


##########
airflow-core/src/airflow/ui/src/components/Assets/AssetEvent.tsx:
##########
@@ -84,7 +86,15 @@ export const AssetEvent = ({
         <Box>{translate("source")}: </Box>
         {source === "" ? (
           <Link
-            
to={`/dags/${event.source_dag_id}/runs/${event.source_run_id}/tasks/${event.source_task_id}${event.source_map_index
 > -1 ? `/mapped/${event.source_map_index}` : ""}`}
+            to={getTaskInstanceLink({
+              dag_id: event.source_dag_id ?? "",
+              dag_run_id: event.source_run_id ?? "",
+              map_index: event.source_map_index,
+              // A task instance inside a task loop can only be addressed with 
its region.
+              region_id: event.source_region_id ?? undefined,
+              region_index: event.source_region_index ?? undefined,

Review Comment:
   Let's update `getTaskInstanceLink` to have
   ```ts
   readonly region_id: string | undefined;
   readonly region_index: number | undefined;
   ```
   then we can make sure we are deliberately passing undefined and not 
forgetting about other task instance loop links.



-- 
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]

Reply via email to