apache / apache/airflow

Update DagVersion instead of stamping new one if there are no DAG runs using that version

Open
#45,524 1 comment 0 reactions 0 assignees View on GitHub
AIP-65: DAG history in UI area:MetaDB kind:meta
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Body

We should only keep around DAG versions that have a corresponding run. I believe the easy answer is to allow DAGs to update in place, without stamping a new version, if there are no runs on that version.

We should be careful of race conditions while we are at it.

### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Contributor guide

Open the contributing guide

Research direction

Start by locating the DagVersion model and the code that creates versions when DAGs are updated, then trace how DAG runs reference them. Review the existing concurrency safeguards and tests before deciding how an unused version could be updated safely. Done means unused versions are reused without affecting versions with runs, including under concurrent updates, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.