wolfier opened a new issue, #41164:
URL: https://github.com/apache/airflow/issues/41164

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.9.3
   
   ### What happened?
   
   The webserver is not reaching out to the triggerer log server for the 
corresponding trigger logs of a deferred task instance. The webserver only 
reads from the worker / triggerer log server when there are no local logs or 
remote logs. This behaviour was introduced in #39177.
   
   When the task instance is in a non-terminal state and have remote logs, the 
behaviour no longer aligns with expectation of live logs as described in the 
documentation for [Serving logs from workers and 
triggerer](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/logging-tasks.html#serving-logs-from-workers-and-triggerer).
 
   
   A specific use case is deferrable operators which has essentially two 
executions.
   1. First execution is to submit the trigger and put the task into a deferred 
state 
   2. Second execution is to process the trigger event
    
   After the first execution, task log is pushed to the remote location. From 
then on, the task log view see the log in the remote location and fetches it as 
expected but it also means the webserver will not reach out to the triggerer 
for logs.
   
   ### What you think should happen instead?
   
   If the task instance is deferred and have remote logs, the webserver should 
still reach out to the triggerer log server.
   
   The behaviour introduced by #39177 so that task instances in a terminal 
state can continue to fetch logs from the log server if there are no remote 
logs or local logs. The user stated that their logs are stored in a persistent 
storage on their worker which is why the user wants to allow server log 
fetching when there are no remote logging.
   
   I think the log reading code needs to specify a logical path where there are 
no remote log or local log for deployments without remote logging and logs are 
not stored on the webserver.
   
   ### How to reproduce
   
   Setup a deployment with remote logging and run a deferrable task. 
   
   ### Operating System
   
   n/a
   
   ### Versions of Apache Airflow Providers
   
   n/a
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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