potiuk commented on a change in pull request #7484: [AIRFLOW-6864][depends on 6863] Make airflow/jobs pylint compatible URL: https://github.com/apache/airflow/pull/7484#discussion_r383019767
########## File path: airflow/models/dagrun.py ########## @@ -31,21 +31,26 @@ from airflow.ti_deps.dep_context import DepContext from airflow.ti_deps.dependencies import SCHEDULEABLE_STATES from airflow.utils import timezone -from airflow.utils.jobs_helpers import BACKFILL_JOB_PREFIX from airflow.utils.log.logging_mixin import LoggingMixin from airflow.utils.session import provide_session from airflow.utils.sqlalchemy import UtcDateTime from airflow.utils.state import State +class DagRunType: + """Class with DagRun types""" + BACKFILL_JOB = "backfill_" + SCHEDULED = "scheduled__" Review comment: So maybe it's the right time to introduce the fix we talked about with Ash. There should be a method "load_all_models()" that should import all models from the DB (note ! just import - do nothing else). This method should be called in resetdb() so that all models can be loaded into sqlalchemy and register there. Note that there is a hack already implemented by me where I artificially add two deleted tables (USERS and another one) to the sqlalchemy so that all migration scenarios should work - these two lines should also be in the "load_all_models()" method. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
