ephraimbuddy opened a new pull request, #48956: URL: https://github.com/apache/airflow/pull/48956
Ensure DAG runs in a versioned bundle use the correct serialized DAG (serdag) version. Previously, when a DAG had multiple versions due to changes (e.g., a task removed), running DAG runs would sometimes incorrectly use the latest serialized DAG, even if they were started with an older version. This caused tasks that should still run to be incorrectly marked as removed. The issue was caused by the scheduler not considering `bundle_version` when retrieving the DAG from the `dagbag`, defaulting to the latest available version. This fix updates `dagbag.dags` to store DAGs keyed by both `dag_id` and `bundle_version`. All DAG retrievals in scheduling are now made with the correct version context, ensuring task consistency for running DAG runs. Also introduces a `GetDag` Protocol for precise typing of the cached DAG getter, now supporting both `dag_id` and `bundle_version` parameters. -- 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]
