You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/04 21:34:30 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #13392: Add upgrade check option to list checks

turbaszek commented on a change in pull request #13392:
URL: https://github.com/apache/airflow/pull/13392#discussion_r551581632



##########
File path: airflow/upgrade/checker.py
##########
@@ -41,6 +41,15 @@ def check_upgrade(formatter, rules):
     return all_rule_statuses
 
 
+def list_checks():
+    print()
+    print("Upgrade Checks:")
+    for rule in ALL_RULES:

Review comment:
       @madison-ookla how about introducing order here:
   https://github.com/apache/airflow/blob/748d05f519c0e5427d2a46763591f03697c4d585/airflow/upgrade/rules/__init__.py#L20-L34
   
   by doing:
   ```py
   return rule_classes[0] + sorted(rule_classes[1:],  key=lambda r: r.__class__.__name__)
   ```
   we can assume that check version rule will be first (the files are sorted so `aaa_` will be first) and then we can easily sort it.
   
   
   
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org