This is an automated email from the ASF dual-hosted git repository.
vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 6a5aab82614 Fix example_dms Dag parsing on Airflow 2 (#73563)
6a5aab82614 is described below
commit 6a5aab82614343349194ca553666a596c9a57f77
Author: Vincent <[email protected]>
AuthorDate: Tue Sep 22 15:02:08 2026 -0400
Fix example_dms Dag parsing on Airflow 2 (#73563)
Airflow 2's built-in DateTimeSensor validates target_time in its
constructor,
so the Dag failed to import at parse time when the standard provider was not
installed and the fallback import was used.
---
providers/amazon/tests/system/amazon/aws/example_dms.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/providers/amazon/tests/system/amazon/aws/example_dms.py
b/providers/amazon/tests/system/amazon/aws/example_dms.py
index a95d78db46f..6fe5109af62 100644
--- a/providers/amazon/tests/system/amazon/aws/example_dms.py
+++ b/providers/amazon/tests/system/amazon/aws/example_dms.py
@@ -393,7 +393,10 @@ with DAG(
db_parameter_group = create_db_parameter_group(db_parameter_group_name)
await_db_parameter_group = DateTimeSensorAsync(
task_id="await_db_parameter_group",
- target_time=db_parameter_group["available_at"],
+ # Airflow 2's built-in DateTimeSensor rejects a non-str/datetime
``target_time`` in its
+ # constructor, so an XComArg cannot be passed directly. Pulling the
value through a Jinja
+ # template keeps this Dag parseable on both Airflow 2 and 3.
+ target_time="{{ ti.xcom_pull(task_ids='create_db_parameter_group',
key='available_at') }}",
)
table_mappings = {