You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jayachandrakasarla (via GitHub)" <gi...@apache.org> on 2026/06/11 07:14:05 UTC

[PR] Fix 67971 task instance details [airflow]

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

   Closes: #67971
   
   ## What
   
   This PR enhances the Airflow 3 Task Instance Details page by surfacing additional task instance metadata that was previously available in Airflow 2.
   
   A new **Additional Task Instance Attributes** section has been added to the Details view, displaying:
   
   * Try Number
   * Max Tries
   * DAG ID
   * Trigger
   * Triggerer Job
   
   The PR also adds the corresponding translation strings for the new UI labels.
   
   ## Why
   
   Airflow 3 exposes task retry history through the try selector, but some task instance metadata is not easily discoverable from the Details view.
   
   This change surfaces additional task instance attributes such as Max Tries, DAG ID, Trigger, and Triggerer Job, making task debugging and troubleshooting easier while restoring information that was previously available in Airflow 2.
   
   ## Testing
   
   Tested locally using Breeze and the Airflow UI.
   
   Verified:
   
   * Successful task instances display the new attributes section.
   * Retrying tasks display updated Try Number and Max Tries values.
   * Deferrable sensor tasks correctly surface Trigger and Triggerer Job information when applicable.
   * Existing task details functionality remains unchanged.
   * UI linting, formatting, and TypeScript compilation checks pass.
   
   ## Screenshots
   <img width="1450" height="754" alt="additional task attributes - triggerer" src="https://github.com/user-attachments/assets/20c11e5c-54e5-4e37-8f2c-584cfd93eca6" />
   
   Also, the screenshot in issue #67971 shows the "Dependencies Blocking Task From Getting Scheduled" section. This functionality is already present in Airflow 3. The section is displayed when a task is waiting for its upstream dependencies to complete and is hidden once the task is no longer blocked (for example, after the upstream tasks have completed).
   
   Here's the screenshot of the same:
   <img width="1506" height="757" alt="dependencies" src="https://github.com/user-attachments/assets/6a6469ef-6111-4a9c-a92b-87c43edc48e8" />
   
   
   Was generative AI tooling used to co-author this PR?
   
   [X] Yes 
   
   Used ChatGPT to understand the codebase and assist with implementing the changes in Details.tsx.


-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [

Review Comment:
   It could maybe just say "ID"? I don't have an opinion either way



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [
+    { label: translate("taskInstance.tryNumber"), value: tryInstance?.try_number },
+    { label: translate("taskInstance.maxTries"), value: tryInstance?.max_tries },
+    { label: translate("dagId"), value: tryInstance?.dag_id },
+    { label: translate("taskInstance.trigger"), value: taskInstance?.trigger },

Review Comment:
   Lovely.



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,40 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }

Review Comment:
   Modified the code to render the json fields, here's the screenshot:
   
   <img width="1508" height="763" alt="Screenshot 2026-06-11 at 9 53 48 PM" src="https://github.com/user-attachments/assets/44a66a7d-df2a-4d36-b740-218ba46977c6" />



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/public/i18n/locales/en/common.json:
##########
@@ -302,6 +305,8 @@
       "latestHeartbeat": "Latest triggerer heartbeat",
       "title": "Triggerer Info"
     },
+    "triggererJob": "Triggerer Job",
+    "tryNumber": "Try Number",

Review Comment:
   Done, removed "tryNumber" and moved "triggererJob" into "triggerer" section in common.json



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [

Review Comment:
   Done, changed it to "ID". Please approve :)



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [
+    { label: translate("taskInstance.tryNumber"), value: tryInstance?.try_number },
+    { label: translate("taskInstance.maxTries"), value: tryInstance?.max_tries },
+    { label: translate("dagId"), value: tryInstance?.dag_id },
+    { label: translate("taskInstance.trigger"), value: taskInstance?.trigger },

Review Comment:
   Given #67868 we will likely want to explicitly filter out/not display the `kwargs` field 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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [

Review Comment:
   I have added the Task Instance Id field as follows, is this okay or do you want me to change it to something else:
   
   <img width="432" height="137" alt="image" src="https://github.com/user-attachments/assets/db59f9b7-d4cd-4b2e-a801-ad2b15ba040a" />
   



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,40 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }

Review Comment:
   We do have a `RenderedJsonField` that we can use here



##########
airflow-core/src/airflow/ui/public/i18n/locales/en/common.json:
##########
@@ -302,6 +305,8 @@
       "latestHeartbeat": "Latest triggerer heartbeat",
       "title": "Triggerer Info"
     },
+    "triggererJob": "Triggerer Job",
+    "tryNumber": "Try Number",

Review Comment:
   We already have this key, let's reuse it instead of adding a new one.
   
   https://www.i18next.com/translation-function/nesting



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [

Review Comment:
   Could you please also include the `ti.id` in this display



-- 
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 additional task instance attributes to task instance's details section [airflow]

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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [
+    { label: translate("taskInstance.tryNumber"), value: tryInstance?.try_number },
+    { label: translate("taskInstance.maxTries"), value: tryInstance?.max_tries },
+    { label: translate("dagId"), value: tryInstance?.dag_id },
+    { label: translate("taskInstance.trigger"), value: taskInstance?.trigger },

Review Comment:
   Done, here's the screenshot filtering out the kwargs from trigger:
   
   <img width="1501" height="758" alt="image" src="https://github.com/user-attachments/assets/c4f7f497-ea9f-4c56-b755-56b38697d610" />
   



-- 
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] Fix 67971 task instance details [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #68378:
URL: https://github.com/apache/airflow/pull/68378#issuecomment-4678100848

   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our [Contributors' Guide](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example Dag that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
   - Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
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 additional task instance attributes to task instance's details section [airflow]

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

   @bbovenzi please let me know if I need make any other changes.


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