Skip to content

dag_run.conf should be nullable in API as per the database schema #50386

@tirkarthi

Description

@tirkarthi

Apache Airflow version

3.0.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

As part of Airflow 2 to 3 migration we noticed dag_run.json became a JSON field. Since we don't need this in non-production we deleted the column and added new one with JSON type which is nullable as per the migration. But it's not nullable in the pydantic definition thus causing API error when a dagrun with null conf is present.

if context.is_offline_mode():
print(
dedent("""
------------
-- WARNING: Unable to migrate the data in the 'conf' column while in offline mode!
-- The 'conf' column will be set to NULL in offline mode.
-- Avoid using offline mode if you need to retain 'conf' values.
------------
""")

What you think should happen instead?

No response

How to reproduce

  1. Migrate from Airflow 2.10 to Airflow 3 through offline migration.
  2. Visit old dag runs list page.

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions