goingforstudying-ctrl opened a new pull request, #68246: URL: https://github.com/apache/airflow/pull/68246
Ran into this while debugging a Cloud Logging setup on GKE — log entries were landing in Stackdriver with empty labels, making it impossible to filter by dag_id or task_id. Turns out the StackdriverRemoteLogIO.processors proc() closure reads `record.task_instance` to populate labels, but in AF3's supervisor model the REMOTE_TASK_LOG handler runs in the supervisor process where that attribute is never set. So every log entry from the supervisor just gets empty labels. This grabs dag_id, task_id, and try_number from the log path instead. AF3's log path template is `dag_id=<x>/run_id=<x>/task_id=<x>/attempt=<N>.log` — all four fields are already in the path with zero DB access needed. The fallback only kicks in when task_instance is genuinely missing, so the task-subprocess code path (where task_instance is available) is untouched. Not sure if `run_id` should also be turned into a label here — left it out for now since the existing label set doesn't include it and the read-side filtering (bug 2) will need its own fix anyway. Happy to add it if maintainers think it belongs. relates to #68240 -- 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]
