jaketf commented on a change in pull request #18309:
URL: https://github.com/apache/airflow/pull/18309#discussion_r712467866



##########
File path: airflow/utils/log/log_reader.py
##########
@@ -54,6 +57,8 @@ def read_log_chunks(
         contain information about the task log which can enable you read logs 
to the
         end.
         """

Review comment:
       @mik-laj that's a great idea! looks like `ti.task` should be set in this 
context (based on your link to views.py). Do you think it's good to have some 
fall back as well? do you see a future where other operator types that don't 
set this attribute would not have logs? 
   
   ```python3
   def has_logs(ti: TaskInstance) -> bool:
       if hasattr(ti, 'task'):  # task is not set in __init__ so may be unset
           return not getattr(ti.task, "inherits_from_dummy_operator", False)
       return ti.operator not in OPERATORS_WITHOUT_LOGS
   ```




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