bramhanandlingala opened a new pull request, #68342:
URL: https://github.com/apache/airflow/pull/68342

   ## What
   
   This PR restores backward compatibility for custom timetables that were 
written against Airflow 3.1.x.
   
   Airflow 3.2 introduced `partition_date` and `partition_key` fields in 
`DagRunInfo`. Since these fields were required, existing custom timetables 
constructing `DagRunInfo` with only `run_after` and `data_interval` raise a 
`TypeError`, causing scheduling to stop.
   
   ## Why
   
   Custom timetable DAGs fail to schedule after upgrading to Airflow 3.2.x:
   
   ```python
   DagRunInfo(
       run_after=run_after,
       data_interval=data_interval,
   )
   ```
   
   raises:
   
   ```text
   TypeError: DagRunInfo.__new__() missing 2 required positional arguments:
   'partition_date' and 'partition_key'
   ```
   
   This can result in DAGs showing an empty Next Run field and no scheduled DAG 
runs being created.
   
   ## Changes
   
   * Added default `None` values for:
   
     * `partition_date`
     * `partition_key`
   * Added a regression test to verify backward compatibility with the legacy 
`DagRunInfo` constructor.
   
   ## Testing
   
   Added unit test covering construction of `DagRunInfo` using the pre-3.2 API 
and verified default values are correctly assigned to the new partition fields.
   
   Fixes #68315
   


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