kaxil commented on code in PR #28246:
URL: https://github.com/apache/airflow/pull/28246#discussion_r1054918967


##########
airflow/utils/db_cleanup.py:
##########
@@ -337,8 +337,14 @@ def run_cleanup(
     :param session: Session representing connection to the metadata database.
     """
     clean_before_timestamp = timezone.coerce_datetime(clean_before_timestamp)
-    effective_table_names = table_names if table_names else 
list(config_dict.keys())
-    effective_config_dict = {k: v for k, v in config_dict.items() if k in 
effective_table_names}
+    desired_table_names = set(table_names or config_dict)
+    effective_config_dict = {k: v for k, v in config_dict.items() if k in 
desired_table_names}
+    effective_table_names = set(effective_config_dict)
+    if desired_table_names != effective_table_names:
+        outliers = desired_table_names - effective_table_names
+        logger.warning("The following table(s) are not valid choices and will 
be skipped: %s", sorted(outliers))

Review Comment:
   ```suggestion
           logger.warning(
               "The following table(s) are not valid choices and will be 
skipped: %s", sorted(outliers)
           )
   ```



-- 
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]

Reply via email to