You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "tirkarthi (via GitHub)" <gi...@apache.org> on 2025/01/26 16:06:09 UTC

[PR] Add triggerer info and extra links section to task instance details tab. [airflow]

tirkarthi opened a new pull request, #46074:
URL: https://github.com/apache/airflow/pull/46074

   Add triggerer info on deferred state and extra links section to task instance details like legacy UI .
   
   Closes #45614
   
   ![image](https://github.com/user-attachments/assets/8aa29b56-37d2-45b3-9e87-546a745182b4)
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "shubhamraj-git (via GitHub)" <gi...@apache.org>.
shubhamraj-git commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2615022567

   @tirkarthi Can you build using https://github.com/apache/airflow/pull/46107 and check your changes for mapped tasks ones? This should fix 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2614488321

   The API endpoint to fetch extra links doesn't accept `map_index` so I guess it's not yet supported and should probably be hidden for mapped tasks until implemented like legacy UI.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1943440397


##########
airflow/ui/src/pages/Run/Details.tsx:
##########
@@ -118,7 +118,7 @@ export const Details = () => {
             </Table.Row>
             {dagRun.external_trigger ? (
               <Table.Row>
-                <Table.Cell>Externally Trigger Source</Table.Cell>
+                <Table.Cell>External Trigger Source</Table.Cell>

Review Comment:
   Do we always want to show `dagRun.triggered_by` then? instead of only on external triggers?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1934952204


##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,44 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  const { dagId = "", runId = "", taskId = "" } = useParams();
+  const { data, isLoading } = useTaskInstanceServiceGetExtraLinks({ dagId, dagRunId: runId, taskId });
+
+  return !isLoading && data !== undefined && Object.keys(data).length > 0 ? (
+    <Box py={2}>
+      <Heading size="sm"> Extra Links </Heading>
+      <HStack gap={2} py={2}>
+        {Object.keys(data).map((key) =>
+          data[key] === null ? undefined : (
+            <Button asChild colorPalette="blue" key={key}>

Review Comment:
   Thanks, rebased with main. Added a comment about mapped tasks with API PR open. I have switched to surface which is little lighter.
   
   ![image](https://github.com/user-attachments/assets/f6c787f5-c258-4ea0-bc27-e7cf3ae94e63)
   



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2628929944

   @pierrejeambrun I am using a virtual environment to pull from git and do `uv pip install .` with `airflow scheduler` and `airflow dag-processor` in different shells. I am using extra links as per the docs and using it on `BashOperator` from `from airflow.providers.standard.operators.bash import BashOperator` . So I guess I am not using the task sdk here.
   
   https://airflow.apache.org/docs/apache-airflow/stable/howto/define-extra-link.html


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1941037751


##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />

Review Comment:
   I just ported the Airflow 2 UI which doesn't have a name like General. I can't find a better name and if there is a consensus I can add it here,



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2633690345

   In Airflow 2 usually clicking on the task instance in grid leads to the task instance details tab. In Airflow 3 logs are made as the default tab. I am fine with moving extra links there if okay.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1934151416


##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,44 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  const { dagId = "", runId = "", taskId = "" } = useParams();
+  const { data, isLoading } = useTaskInstanceServiceGetExtraLinks({ dagId, dagRunId: runId, taskId });
+
+  return !isLoading && data !== undefined && Object.keys(data).length > 0 ? (
+    <Box py={2}>
+      <Heading size="sm"> Extra Links </Heading>
+      <HStack gap={2} py={2}>
+        {Object.keys(data).map((key) =>
+          data[key] === null ? undefined : (
+            <Button asChild colorPalette="blue" key={key}>

Review Comment:
   Small nit, I think the solid variant is very loud in the UI. Let's try "outline" or "surface"



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1941036231


##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,45 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  // TODO: Add support for mapped tasks using map_index once API support is available
+  const { dagId = "", runId = "", taskId = "" } = useParams();
+  const { data, isLoading } = useTaskInstanceServiceGetExtraLinks({ dagId, dagRunId: runId, taskId });
+
+  return !isLoading && data !== undefined && Object.keys(data).length > 0 ? (

Review Comment:
   Thanks, done.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1946651799


##########
airflow/ui/src/pages/Run/Details.tsx:
##########
@@ -118,7 +118,7 @@ export const Details = () => {
             </Table.Row>
             {dagRun.external_trigger ? (
               <Table.Row>
-                <Table.Cell>Externally Trigger Source</Table.Cell>
+                <Table.Cell>External Trigger Source</Table.Cell>

Review Comment:
   While we decide on that we can maybe just remove the `External` word from here as this is misleading:
   https://github.com/apache/airflow/pull/46559



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2614487030

   Can you verify extra link works also for mapped tasks?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2633658124

   Are we happy with having it in the details tab?
   I have to say, I click on the details tab rarely (for the info that we are having there).
   On the other hand, I really need the extra link when I view failure logs.
   
   I am not UX expert but I think we need better place for the extra links than the details tab.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1940949474


##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />

Review Comment:
   Maybe we also need a header with "General" or something to separate 'links', 'trigger info' and 'general info'. Just an idea



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #46074:
URL: https://github.com/apache/airflow/pull/46074


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1940950377


##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,45 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  // TODO: Add support for mapped tasks using map_index once API support is available

Review Comment:
   This has been merged in https://github.com/apache/airflow/pull/46107. I think we can update.



##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />

Review Comment:
   Maybe we also need a header with "General" or something so separate 'links', 'trigger info' and 'general info'. Just an idea



##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,45 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  // TODO: Add support for mapped tasks using map_index once API support is available
+  const { dagId = "", runId = "", taskId = "" } = useParams();
+  const { data, isLoading } = useTaskInstanceServiceGetExtraLinks({ dagId, dagRunId: runId, taskId });
+
+  return !isLoading && data !== undefined && Object.keys(data).length > 0 ? (
+    <Box py={2}>
+      <Heading size="sm"> Extra Links </Heading>
+      <HStack gap={2} py={2}>
+        {Object.keys(data).map((key) =>

Review Comment:
   Nit: You can map over `Object.entries` as well to avoid multiple accessor like `data[key]`



##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />

Review Comment:
   For now both table are next to each other like this:
   ![Screenshot 2025-02-04 at 12 07 13](https://github.com/user-attachments/assets/e4df2501-da40-424d-978b-06dc4c22ad70)
   



##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />
+      {taskInstance?.state === "deferred" && <TriggererInfo taskInstance={taskInstance} />}

Review Comment:
   I'm not sure we only want to show TriggererInfo for tasks in deferred state. If a task has been resumed and is settled (success failed etc..) I still think this is a relevant information.
   
   If fields are not None (.trigger and .trigger_job) I think we should show this section.



##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,45 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  // TODO: Add support for mapped tasks using map_index once API support is available
+  const { dagId = "", runId = "", taskId = "" } = useParams();
+  const { data, isLoading } = useTaskInstanceServiceGetExtraLinks({ dagId, dagRunId: runId, taskId });
+
+  return !isLoading && data !== undefined && Object.keys(data).length > 0 ? (

Review Comment:
   ```suggestion
     return data && Object.keys(data).length > 0 ? (
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2633703651

   > In Airflow 2 usually clicking on the task instance in grid leads to the task instance details tab. In Airflow 3 logs are made as the default tab. I am fine with moving extra links there if okay.
   
   Getting to the extra links in 2.10 is very inconvenient to my taste.
   I would rather the links to be folded above the logs/events/xcom tabs, but I leave this choice to the UX experts :)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1941035151


##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,45 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  // TODO: Add support for mapped tasks using map_index once API support is available

Review Comment:
   Rebased the PR and `mapIndex` filtering is applied when not -1. Thanks.



##########
airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -0,0 +1,45 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Button, Heading, HStack } from "@chakra-ui/react";
+import { useParams } from "react-router-dom";
+
+import { useTaskInstanceServiceGetExtraLinks } from "openapi/queries";
+
+export const ExtraLinks = () => {
+  // TODO: Add support for mapped tasks using map_index once API support is available
+  const { dagId = "", runId = "", taskId = "" } = useParams();
+  const { data, isLoading } = useTaskInstanceServiceGetExtraLinks({ dagId, dagRunId: runId, taskId });
+
+  return !isLoading && data !== undefined && Object.keys(data).length > 0 ? (
+    <Box py={2}>
+      <Heading size="sm"> Extra Links </Heading>
+      <HStack gap={2} py={2}>
+        {Object.keys(data).map((key) =>

Review Comment:
   Thanks, done.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2628933106

   > @pierrejeambrun I am using a virtual environment to pull from git and do `uv pip install .` with `airflow scheduler` and `airflow dag-processor` in different shells. I am using extra links as per the docs and using it on `BashOperator` from `from airflow.providers.standard.operators.bash import BashOperator` . So I guess I am not using the task sdk here.
   > 
   > https://airflow.apache.org/docs/apache-airflow/stable/howto/define-extra-link.html
   
   See https://github.com/apache/airflow/blob/main/contributing-docs/07_local_virtualenv.rst - when we explain how to work with the new virtualenv model where we have mutliple packages: `uv sync --all-extras` and `uv sync --extra celery` are your friends as they are using the `uv workspace` feature which installs all internal airflow packages as needed and all necessary dependencies for the provider extras you specify.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1943252920


##########
airflow/ui/src/pages/Run/Details.tsx:
##########
@@ -118,7 +118,7 @@ export const Details = () => {
             </Table.Row>
             {dagRun.external_trigger ? (
               <Table.Row>
-                <Table.Cell>Externally Trigger Source</Table.Cell>
+                <Table.Cell>External Trigger Source</Table.Cell>

Review Comment:
   @pierrejeambrun @bbovenzi We should nix this "external" word here, as some of the values are "timetable", or "asset" which aren't external.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1946651799


##########
airflow/ui/src/pages/Run/Details.tsx:
##########
@@ -118,7 +118,7 @@ export const Details = () => {
             </Table.Row>
             {dagRun.external_trigger ? (
               <Table.Row>
-                <Table.Cell>Externally Trigger Source</Table.Cell>
+                <Table.Cell>External Trigger Source</Table.Cell>

Review Comment:
   While we decide on that we can at least remove the `External` word from here as this is misleading:
   https://github.com/apache/airflow/pull/46559



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1942714523


##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />

Review Comment:
   Thanks, I have added "Task Instance Info" but this can be changed as needed in future. Screenshot updated as below.
   
   ![image](https://github.com/user-attachments/assets/c1681a17-aa89-46c9-9ed5-822b7c15b193)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2620501302

   Thanks @shubhamraj-git , I had a similar patch locally and I think the PR should work. I will wait for the changes to be merged to rebase here or take the frontend changes in a new PR after the PR. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2624605638

   Is that working locally in breeze ? Are you using another executor because Task SDK does not support extra links so I expect errors there.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "shubhamraj-git (via GitHub)" <gi...@apache.org>.
shubhamraj-git commented on PR #46074:
URL: https://github.com/apache/airflow/pull/46074#issuecomment-2624629610

   > Is that working locally in breeze ? Are you using another executor because Task SDK does not support extra links so I expect errors there.
   
   @pierrejeambrun  Yaa possible, I think `--executor CeleryExecutor` will work.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1941035916


##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />
+      {taskInstance?.state === "deferred" && <TriggererInfo taskInstance={taskInstance} />}

Review Comment:
   Thanks, done. This makes it consistent with Airflow 2 UI too.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add triggerer info and extra links section to task instance details tab. [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #46074:
URL: https://github.com/apache/airflow/pull/46074#discussion_r1941447744


##########
airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -85,6 +88,8 @@ export const Details = () => {
           taskInstance={taskInstance}
         />
       )}
+      <ExtraLinks />

Review Comment:
   Having the two table following each other is weird. It looks like the same table continuation while the formating is different and column alignement are not matching. I think it would be great to add a title or a header to explain that TriggererInfo stop there and a new table starts after that. 
   
   Maybe that's just me but I fing it confusing like this.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org