Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-5198

Avoid loading DAGs during migration cc1e65623dc7_add_max_tries_column_to_task_instance

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.10.4
    • Fix Version/s: None
    • Component/s: database
    • Labels:
      None

      Description

      https://issues.apache.org/jira/browse/AIRFLOW-1366 introduced a migration to add a `max_tries` column to the `task_instance` table.

      Currently, that migration imports and instantiates the `DagBag` object, which will load example DAGs if the setting is activated, and will fail. It fails because at this point because loading DAGs requires later migrations to have been run.

      A simple fix would be to force `include_examples=False` in the DagBag, but we should strive not lot load DAGs at all and only retrieve the necessary data for the migration.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                villasv Victor Villas Bôas Chaves
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: