You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "josh-fell (via GitHub)" <gi...@apache.org> on 2023/02/14 21:59:19 UTC

[GitHub] [airflow] josh-fell opened a new pull request, #29545: Don't display empty rendered attrs in Task Instance Details page

josh-fell opened a new pull request, #29545:
URL: https://github.com/apache/airflow/pull/29545

   Closes: #29515
   
   The Task Instance Details page was displaying attributes which did not have a value. Mainly these were the docs attributes (i.e. `doc`, `doc_json`, `doc_md`, `doc_rst`, and `doc_yaml`). This clutters the page with less useful information for the task instance.
   
   This PR changes the attributes displayed on the page only if they have non-empty values generally.
   
   **Current Task Instance Details with no doc attribute provided**
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/48934154/218872133-c4c57c1b-ae96-4914-bbdb-691fbb029880.png">
   
   **New Task Instance Details with no doc or other special rendered attributes**
   <img width="1438" alt="image" src="https://user-images.githubusercontent.com/48934154/218871741-db43f3dd-b43f-4aed-8194-c0f74c04fe09.png">
   
   **Current Task Instance Details with `bash_command` and only `doc_md` provided**
   There are other special-rendered like `sql` and `hql` but let's use a `BashOperator` as an example.
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/48934154/218872490-474aea51-4f79-4d9e-b11e-68682d307c64.png">
   
   
   **New Task Instance Details with `bash_command` and only `doc_md` provided**
   <img width="1438" alt="image" src="https://user-images.githubusercontent.com/48934154/218872364-4e58a754-9687-488c-85ae-e787ad215999.png">
   
   
   


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


[GitHub] [airflow] josh-fell commented on pull request #29545: Don't display empty rendered attrs in Task Instance Details page

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

   > I believe this would hide the attribute for all `falsy` values. (0, "", [], etc...). Maybe we only want to skip when the value is actually None ?
   
   Yes, which is actually `doc`, `doc_json`, `doc_rst`, and `doc_yaml`. `doc_md` does display None. But I could track down why those are all not None if you feel that we should _only_ filter out None. WDYT?


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


[GitHub] [airflow] bbovenzi merged pull request #29545: Don't display empty rendered attrs in Task Instance Details page

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


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


[GitHub] [airflow] pierrejeambrun commented on pull request #29545: Don't display empty rendered attrs in Task Instance Details page

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

   I think it's ok like this. Attribute are taken from `get_attr_renderer` and it seems that all of them are 'string'. Skipping falsy values looks good.
   
   (I was concerned that some attributes could be of different types, like boolean or int for instance, but it doesn't seem like so)


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