Skip to content

After upgrading to v2.1.3, the scheduler won't start because queued_at is missing in airflow_db.dag_run #18314

@tau-mask

Description

@tau-mask

Apache Airflow version

2.1.3 (latest released)

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

No response

What happened

After upgrading from v2.1.2 to v2.1.3, the scheduler won't start because of a missing column queued_at in the table airflow_db.dag_run:

sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 1054 (42S22): Unknown column 'queued_at' in 'field list'
[SQL: INSERT INTO airflow_db.dag_run (dag_id, queued_at, execution_date, start_date, end_date, state, run_id, creating_job_id, external_trigger, run_type, conf, last_scheduling_decision, dag_hash) VALUES (%(dag_id)s, %(queued_at)s, %(execution_date)s, %(start_date)s, %(end_date)s, %(state)s, %(run_id)s, %(creating_job_id)s, %(external_trigger)s, %(run_type)s, %(conf)s, %(last_scheduling_decision)s, %(dag_hash)s)]
[parameters: {'dag_id': 'perforce_submits_tags_dev', 'queued_at': datetime.datetime(2021, 9, 17, 3, 49, 21, 590549), 'execution_date': datetime.datetime(2021, 9, 16, 23, 5), 'start_date': None, 'end_date': None, 'state': <TaskInstanceState.QUEUED: 'queued'>, 'run_id': 'scheduled__2021-09-16T23:05:00+00:00', 'creating_job_id': 64538, 'external_trigger': 0, 'run_type': <DagRunType.SCHEDULED: 'scheduled'>, 'conf': b'\x80\x05}\x94.', 'last_scheduling_decision': None, 'dag_hash': '7a12e79b01b2b946cf6ad9bca1eec775'}]

What you expected to happen

I expected the scheduler to start. But beyond that, I think that adding a column to the database constitutes a minor level change, not a patch level change (i.e. 2.2.x rather than 2.1.x). I also have no idea how to fix it besides wiping out the database and recreating it from scratch, or adding that column myself manually. If there's a way to do that properly from the command line, I couldn't find the documentation.

How to reproduce

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions