jscheffl commented on code in PR #65239:
URL: https://github.com/apache/airflow/pull/65239#discussion_r3088696780
##########
airflow-core/src/airflow/utils/db_cleanup.py:
##########
@@ -613,9 +631,22 @@ def run_cleanup(
batch_size=batch_size,
)
session.commit()
+ if ctx.failed:
+ failed_tables.append(table_name)
else:
logger.warning("Table %s not found. Skipping.", table_name)
+ if failed_tables:
+ logger.warning(
+ "The following tables were not cleaned due to errors: %s. Check
the logs above for details.",
+ failed_tables,
+ )
+ if error_on_cleanup_failure:
+ raise AirflowException(
Review Comment:
We agreed as developers that we want to prevent using AirflowException. Can
you please create either a specific exception or use one of the common Python
Exceptions (e.g. RuntimError or so)?
--
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]