This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-2-test by this push:
     new 27eb1a45ec8 [v3-2-test] fix(backfill): populate partition_date on 
partitioned backfill runs (#65998) (#66409)
27eb1a45ec8 is described below

commit 27eb1a45ec8a58d766ad6f4d1da201b2b9f3bd17
Author: Wei Lee <[email protected]>
AuthorDate: Wed May 6 11:56:51 2026 +0800

    [v3-2-test] fix(backfill): populate partition_date on partitioned backfill 
runs (#65998) (#66409)
---
 airflow-core/src/airflow/models/backfill.py     |  1 +
 airflow-core/tests/unit/models/test_backfill.py | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/airflow-core/src/airflow/models/backfill.py 
b/airflow-core/src/airflow/models/backfill.py
index bd48f8daa56..2061e91c1f9 100644
--- a/airflow-core/src/airflow/models/backfill.py
+++ b/airflow-core/src/airflow/models/backfill.py
@@ -479,6 +479,7 @@ def _create_backfill_dag_run_partitioned(
         ),
         logical_date=info.logical_date,
         partition_key=info.partition_key,
+        partition_date=info.partition_date,
         data_interval=info.data_interval if info.logical_date else None,
         run_after=info.run_after,
         conf=dag_run_conf,
diff --git a/airflow-core/tests/unit/models/test_backfill.py 
b/airflow-core/tests/unit/models/test_backfill.py
index 96a27945532..ea1082eb52d 100644
--- a/airflow-core/tests/unit/models/test_backfill.py
+++ b/airflow-core/tests/unit/models/test_backfill.py
@@ -282,6 +282,17 @@ def test_create_backfill_partitioned(reverse, existing, 
start_date, dag_maker, s
     assert partition_keys == expected_dates
     assert all(x.state == DagRunState.QUEUED for x in dag_runs)
     assert all(x.conf == expected_run_conf for x in dag_runs)
+    # Calendar view filters partitioned Dags by partition_date, so the backfill
+    # path must populate it alongside partition_key. Verify that backfill 
copies
+    # info.partition_date faithfully — i.e. the stored value matches what the
+    # timetable computed for each partition_key.
+    expected_partition_date_by_key = {
+        info.partition_key: info.partition_date
+        for info in 
dag.iter_dagrun_infos_between(pendulum.parse("2026-02-15"), 
pendulum.parse("2026-02-24"))
+    }
+    assert [x.partition_date for x in dag_runs] == [
+        expected_partition_date_by_key[x.partition_key] for x in dag_runs
+    ]
 
 
 @pytest.mark.parametrize(

Reply via email to