Skip to content

Make dag_version_id in TI non-nullable #50825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

ephraimbuddy
Copy link
Contributor

Enforces serialization of DAGs before creating DagRuns and TaskInstances.

The changes include:

  • Making dag_version_id a required parameter in TaskInstance constructor
  • Migrating the dag_version_id column in TaskInstance to be non-nullable
  • Adding a check in _create_orm_dagrun to raise AirflowException if dag is not serialized
  • Updating tests to ensure DAGs are properly serialized before creating DagRuns

This prevents running runs with missing serialized DAG versions.

@ephraimbuddy ephraimbuddy force-pushed the make-ti-dag-version-id-non-nullable2 branch from 20c6e75 to 08bfa28 Compare May 20, 2025 17:14
@ephraimbuddy ephraimbuddy force-pushed the make-ti-dag-version-id-non-nullable2 branch from 9d3fc74 to 63eb72b Compare May 21, 2025 15:28
@ephraimbuddy ephraimbuddy force-pushed the make-ti-dag-version-id-non-nullable2 branch 2 times, most recently from aad0a5f to 80439a1 Compare May 21, 2025 17:35
@ephraimbuddy ephraimbuddy requested a review from mobuchowski as a code owner May 22, 2025 17:27
@ephraimbuddy ephraimbuddy force-pushed the make-ti-dag-version-id-non-nullable2 branch 2 times, most recently from 5409839 to 616e0a1 Compare May 24, 2025 22:18
@ephraimbuddy ephraimbuddy force-pushed the make-ti-dag-version-id-non-nullable2 branch from 616e0a1 to 070f7a3 Compare May 25, 2025 10:55
@ephraimbuddy ephraimbuddy force-pushed the make-ti-dag-version-id-non-nullable2 branch from 874c15e to b583d74 Compare June 5, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:CLI area:db-migrations PRs with DB migration area:Scheduler including HA (high availability) scheduler area:serialization area:task-sdk area:Triggerer full tests needed We need to run full set of tests for this PR to merge kind:documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants