Lee-W commented on code in PR #74784:
URL: https://github.com/apache/airflow/pull/74784#discussion_r4344295982


##########
providers/edge3/src/airflow/providers/edge3/worker_api/routes/logs.py:
##########
@@ -32,18 +33,24 @@
 from airflow.providers.common.compat.sdk import TaskInstanceKey, conf
 from airflow.providers.edge3.models.edge_job import EdgeJobModel
 from airflow.providers.edge3.models.edge_logs import EdgeLogsModel
+from airflow.providers.edge3.models.types import is_callback_job
 from airflow.providers.edge3.worker_api.auth import 
jwt_token_authorization_rest
 from airflow.providers.edge3.worker_api.datamodels import PushLogsBody, 
WorkerApiDocs
 from airflow.utils.log.file_task_handler import FileTaskHandler
 from airflow.utils.session import NEW_SESSION, provide_session
 
+if TYPE_CHECKING:
+    from sqlalchemy.orm import Session
+
 logs_router = AirflowRouter(tags=["Logs"], prefix="/logs")
 
 
 @cache
 @provide_session
 def _logfile_path(task: TaskInstanceKey, task_instance_id: UUID | None = None, 
*, session=NEW_SESSION) -> str:
     """Elaborate the (relative) path and filename to expect from task 
execution."""
+    if is_callback_job(task.dag_id, task.task_id, task.run_id, 
task.try_number, task.map_index):
+        return _callback_logfile_path(task, session=session)

Review Comment:
   ```suggestion
           return _get_callback_logfile_path(task, session=session)
   ```



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