bujjibabukatta opened a new pull request, #68276: URL: https://github.com/apache/airflow/pull/68276
Add Asset partition attributes to TaskInstance Fixes #68079, related to #68075. What changed: airflow-core/src/airflow/models/taskinstance.py — adds a partition_date property that parses partition_key (already proxied from dag_run) into a timezone-aware datetime, returning None for non-partitioned runs or unparseable keys. airflow-core/src/airflow/utils/helpers.py — fixes log_filename_template_renderer in two ways: Jinja branch now injects ts_nodash, ts, ts_nodash_with_tz, partition_key, and partition_date into the render context instead of returning a bare Template.render with no context. f-string branch no longer crashes when logical_date is None (falls back to partition_date, then empty string). Why: Asset-triggered DAGs using PartitionedAssetTimetable set logical_date=None, causing the scheduler to crash on ti.logical_date.isoformat() during log filename rendering. Users also had no way to reference partition attributes in templates at all. -- 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]
