Skip to content

Commit

Permalink
Composer db cleanup dag (#11091)
Browse files Browse the repository at this point in the history
* The execution_date attribute is no longer supported by the TaskFail model as the column was dropped in migration 48925b2719cb[1] which belongs to Airflow 2.3.0

[1] https://airflow.apache.org/docs/apache-airflow/stable/migrations-ref.html

* The execution_date attribute is no longer supported by the TaskFail model as the column was dropped in migration 48925b2719cb [1] which belongs to Airflow 2.3.0
 
[1] https://airflow.apache.org/docs/apache-airflow/stable/migrations-ref.html
  • Loading branch information
keshav9316 committed Jan 3, 2024
1 parent 01d1fb5 commit d1d77c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composer/workflows/airflow_db_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
},
{
"airflow_db_model": TaskInstance,
"age_check_column": TaskInstance.execution_date
"age_check_column": TaskInstance.start_date
if AIRFLOW_VERSION < ["2", "2", "0"]
else TaskInstance.start_date,
"keep_last": False,
Expand Down Expand Up @@ -174,7 +174,7 @@
DATABASE_OBJECTS.append(
{
"airflow_db_model": TaskFail,
"age_check_column": TaskFail.execution_date,
"age_check_column": TaskFail.start_date,
"keep_last": False,
"keep_last_filters": None,
"keep_last_group_by": None,
Expand Down

0 comments on commit d1d77c5

Please sign in to comment.