|
From the very beginning Airflow relied on DAG parsing loop continuously re-parsing and maintaining the state of DAGs in Airflow deployment. This simple approach served Airflow for a long time, but ultimately made a number of basic use cases hard or impossible to implement:
Originally AIP-85 and this AIP proposed a single set of changes across the DAG processing. With multiple Airflow 3 improvements landed (AIP-72, AIP-66, DagBag refactoring into vanilla and DBDagBag), it made sense to split bigger initiative proposal(which aims to establish extendable DAG parsing controls within Airflow) into 2 relatively independent tracks: AIP-85 DAG importer and this new AIP.
In addition to a regular (async) DAG processor, create an alternative "Interactive" DAG processor, which will act as an internal control-plane API for DAGs parsing.
Proposed internal API:
# Parse and return DAGs/import errors for bundle and (relative) path within a bundle (no ingestion)
- POST /bundle/parse { “bundle”, “path”, “bundle_version” } -> { “import_errors”, “dags” }
# Parse, ingest and return ingested DAG IDs/import errors for bundle and (relative) path within a bundle.
- POST /bundle/parse_update { “bundle”, “path”, “bundle_version”, "update_options" } -> { “import_errors”, dict[“dag_id”, “dag_version”] }
# Disable DAGs (by ID or relative path)
- DELETE /bundle {“bundle”, “path”, “dag_ids” }
# Get bundle version metadata
- GET /bundle -> { “bundle”, “bundle_version” }
# Pin bundle version for specified DAGs
- POST /bundle/set_version { “bundle”, “dag_ids”, “bundle_version” }
|
Implementation
A new flag `airflow dag-processor --interactive-api` will start a FastAPI described above. It can run aside a regular async dag-processor, but sets of bundles must be non-overlapping between interactive and async dag-processors and designated at such in bundle configuration (`dag_bundle_config_list` Airflow configuration).
![Airflow > [WIP] AIP-110 Interactive DAG processor > image-2025-10-3_16-4-49.png](/confluence/download/attachments/430407790/image-2025-10-3_16-4-49.png?version=1&modificationDate=1779702056000&api=v2)
DAG model is expanded with an optional `default_dag_version` relation to DAG version, which can be used to pin an older version for an individual DAG.
Open questions
Compatibility
As this is an introduction of a new component, no real impact on the existing setups is anticipated. Configuration changes should be backwards compatible.
PoC: https://github.com/mpapierowski/airflow/tree/demo/mcp
Scope