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

[GitHub] [airflow] dstandish opened a new pull request, #29496: Fix log tailing issues with legacy log view

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

   Probably we should just chop this view in favor of grid view logging which is the future. But this fixes rendering issues raised here https://github.com/apache/airflow/pull/29447#issuecomment-1424981137.
   
   What we do, is in log tailing context (which apparently isn't used in grid, and that's why I did not see this in developing trigger logging) we don't add the messages to the log content.  So, whenever log_pos is in metadata we don't add messages.  It means the messages could be a bit stale but that seems ok.  Refreshing the page could fix that.  Longer term, we could update the API so that log content is just content and the messages are themselves returned in the metadata dict.  That's probably the "right" solution ultimately.  But can be saved for another day.  Also resolve the "cannot load lazy instance" issue when invoking the reader logic from this different context.
   


-- 
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] dstandish commented on pull request #29496: Fix log tailing issues with legacy log view

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

   > Tested it locally. Looks good!
   
   Super, thank you


-- 
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] dstandish merged pull request #29496: Fix log tailing issues with legacy log view

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


-- 
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] Taragolis commented on a diff in pull request #29496: Fix log tailing issues with legacy log view

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


##########
airflow/www/views.py:
##########
@@ -1527,7 +1527,15 @@ def get_logs_with_metadata(self, session=None):
 
         ti = (
             session.query(models.TaskInstance)
-            .filter_by(dag_id=dag_id, task_id=task_id, execution_date=execution_date, map_index=map_index)
+            .filter(
+                TaskInstance.task_id == task_id,
+                TaskInstance.dag_id == dag_id,
+                TaskInstance.execution_date == execution_date,
+                TaskInstance.map_index == map_index,

Review Comment:
   Ohhhh... This view still use `execution_date` instead of `run_id` (not related to this 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