You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom DAG factories cannot create backup dags unless they include the xcom and task_instance tables.
I am following the instructions to create a custom backup dag factory, with just the active dag table. But create_backup_dag creates an import error. The import error is an IndexError or KeyError, because separate step of the backup DAG definition looks for the xcom table task and task_instance table task, which I am not using here.
File "/usr/local/airflow/.local/lib/python3.10/site-packages/mwaa_dr/framework/factory/base_dr_factory.py", line 349, in create_backup_dag
python_callable=[
IndexError: list index out of range
File "/usr/local/airflow/.local/lib/python3.10/site-packages/mwaa_dr/framework/factory/base_dr_factory.py", line 354, in create_backup_dag
xcom_task >> export_tasks["task_instance"]
KeyError: 'task_instance'
holly-evans
changed the title
[BUG] create_backup_dag produces IndexError if xcom table is not included in tables
[BUG] create_backup_dag produces IndexError if xcom and task_instance are not included in tables
Feb 14, 2025
Is there an existing issue for this?
What MWAA versions are you seeing the problem on?
2.5.1
Current Behavior
Custom DAG factories cannot create backup dags unless they include the xcom and task_instance tables.
I am following the instructions to create a custom backup dag factory, with just the active dag table. But
create_backup_dag
creates an import error. The import error is an IndexError or KeyError, because separate step of the backup DAG definition looks for thexcom
table task andtask_instance
table task, which I am not using here.Expected Behavior
The DAG imports without an error.
Steps To Reproduce
Custom factory:
Using that factory to create a DAG:
DAG import errors:
Successful custom DAG factory:
Anything else?
I am actually using 2.4.3 MWAA but that is not an option.
Relevant sections:
mwaa-disaster-recovery/assets/dags/mwaa_dr/framework/factory/base_dr_factory.py
Line 349 in 2536e37
mwaa-disaster-recovery/assets/dags/mwaa_dr/framework/factory/base_dr_factory.py
Line 354 in 2536e37
The text was updated successfully, but these errors were encountered: