Skip to content

Commit 079d5d8

Browse files
renovate-botgcf-owl-bot[bot]davidcavazos
authored
chore(deps): update dependency apache-airflow-providers-postgres to v5.12.0 (#12551)
* chore(deps): update dependency apache-airflow-providers-postgres to v5.12.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * match pinned version constraint * update to apache airflow 2.9.2 * use python 3.12 * use python 3.11 * use right constraints * add openlineage extra --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: David Cavazos <dcavazos@google.com>
1 parent 11ebb77 commit 079d5d8

File tree

5 files changed

+595
-542
lines changed

5 files changed

+595
-542
lines changed

composer/workflows/airflow_db_cleanup.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,8 @@ def print_configuration_function(**context):
282282
logging.info("dag_run.conf: " + str(dag_run_conf))
283283
max_db_entry_age_in_days = None
284284
if dag_run_conf:
285-
max_db_entry_age_in_days = dag_run_conf.get(
286-
"maxDBEntryAgeInDays", None
287-
)
288-
logging.info(
289-
"maxDBEntryAgeInDays from dag_run.conf: " + str(dag_run_conf)
290-
)
285+
max_db_entry_age_in_days = dag_run_conf.get("maxDBEntryAgeInDays", None)
286+
logging.info("maxDBEntryAgeInDays from dag_run.conf: " + str(dag_run_conf))
291287
if max_db_entry_age_in_days is None or max_db_entry_age_in_days < 1:
292288
logging.info(
293289
"maxDBEntryAgeInDays conf variable isn't included or Variable "
@@ -352,8 +348,7 @@ def build_query(
352348
subquery = subquery.from_self()
353349

354350
query = query.filter(
355-
and_(age_check_column.notin_(subquery)),
356-
and_(age_check_column <= max_date)
351+
and_(age_check_column.notin_(subquery)), and_(age_check_column <= max_date)
357352
)
358353

359354
return query
@@ -463,8 +458,7 @@ def cleanup_function(**context):
463458
except ProgrammingError as e:
464459
logging.error(e)
465460
logging.error(
466-
str(airflow_db_model) + " is not present in the metadata." +
467-
"Skipping..."
461+
str(airflow_db_model) + " is not present in the metadata." + "Skipping..."
468462
)
469463

470464
finally:
@@ -498,10 +492,7 @@ def analyze_db():
498492

499493

500494
analyze_op = PythonOperator(
501-
task_id="analyze_query",
502-
python_callable=analyze_db,
503-
provide_context=True,
504-
dag=dag
495+
task_id="analyze_query", python_callable=analyze_db, provide_context=True, dag=dag
505496
)
506497

507498
cleanup_session_op = PythonOperator(

0 commit comments

Comments
 (0)