Vamsi-klu opened a new pull request, #68149: URL: https://github.com/apache/airflow/pull/68149
Since AIP-83, `DagRun.logical_date` (and therefore `ti.logical_date`) is `None` for asset-triggered / partitioned runs. The scheduler crashes in `_enqueue_task_instances_with_queued_state` while rendering the task log filename when a custom `log_filename_template` references `ti.logical_date` (#68075). `log_filename_template_renderer` now derives a non-null date (`ti.logical_date or ti.run_after`, matching the log reader `FileTaskHandler._render_filename`) and exposes `ts`/`ts_nodash` to Jinja templates. If a template still fails to render (e.g. it calls `ti.logical_date.strftime(...)` directly — Jinja's `default()` evaluates its argument eagerly, so this cannot be rescued by exposing variables), the renderer logs a warning and falls back to the default `run_id`-based template instead of aborting the scheduling loop. closes: #68075 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
