mik-laj commented on a change in pull request #6650: [AIRFLOW-6051] Make DAG
optional during displaying the log
URL: https://github.com/apache/airflow/pull/6650#discussion_r350442484
##########
File path: airflow/www/views.py
##########
@@ -578,7 +578,8 @@ def _get_logs_with_metadata(try_number, metadata):
try:
if ti is not None:
dag = dagbag.get_dag(dag_id)
- ti.task = dag.get_task(ti.task_id)
+ if dag:
Review comment:
I am not sure. There may be a task instance without DAG or DAG without task.
These are the correct cases. Please note that dag variable is None, when task
is not found. This is the most important thing in this change. If we have task
instances, we are looking for DAG. If we find DAG, we are looking for a task,
but if we don't find DAG, then we do nothing.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services