Airflow 3 ships two features that migration decks tend to bundle together: DAG versioning and asset-based scheduling. They solve different problems and have different costs. This post says where each earns its place on a production estate and where it does not.
Assume you are already on a supported 3.x line, or are planning the move. Neither feature is a reason to migrate. Both are optional once you are there.
DAG versioning: what it actually does
In Airflow 2 the scheduler and workers read whatever file is on disk. Edit a DAG while a run is in flight and later tasks in that run may execute newer code than earlier ones. The UI shows only the current structure, so history can lie about what ran.
In Airflow 3 each parse that changes a DAG's serialized structure creates a new DAG version. A run is tied to the version it started on, and the UI can show the graph as it was for that run. DAG bundles add code versioning: with a versioned bundle such as the Git bundle, workers fetch the commit the run started on, not the branch head.
Be precise about the limits:
- Structure versions are automatic. Code versions need a bundle that supports versioning. A plain local directory bundle does not give you pinned code.
- A change to task code that does not change DAG structure is not a new structure version. Without a versioned bundle you still get the mid-run drift problem.
- Pinned code needs workers that can reach the repository (or a mirror) at task start. That is a new runtime dependency. Check your network policy and credentials before you turn it on.
- Old versions accumulate in the metadata database. Include them in your cleanup and retention routine.
Where it is worth adopting
- Estates with long runs, such as multi-hour or multi-day backfills, where a deploy during a run is routine.
- Teams that deploy several times a day and have been bitten by a half-old, half-new run.
- Audit-sensitive pipelines where you must say which code produced a given billing or reporting output.
Where it is not
- Nightly batches that finish in forty minutes and deploy once a week. The drift window is small and your deploy freeze already covers it.
- Teams that cannot give workers repository access. A baked-image deploy with a pinned image tag gives you much of the same guarantee with no new dependency.
Caveat: versioning explains what ran. It does not make a bad deploy safe. You still need a rollback path and a dual-run period.
Asset-based scheduling: what it replaces
Airflow 2 called these datasets. In Airflow 3 the concept is an asset, imported from the Task SDK:
from airflow.sdk import DAG, Asset
orders_raw = Asset("s3://lake/raw/orders/")
with DAG("load_orders", schedule="@hourly"):
... # a task with outlets=[orders_raw]
with DAG("build_orders_mart", schedule=[orders_raw]):
...
The consumer runs when the producer's task succeeds and emits the asset event. No sensor, no ExternalTaskSensor, no matching of cron strings between two DAGs.
The real gain is removing cross-DAG coupling that was held together by time. Typical candidates are:
ExternalTaskSensorchains where the child waits on a parent with an offset that nobody remembers choosing.- DAGs scheduled at 03:30 "because the upstream finishes by 03:00".
TriggerDagRunOperatorfan-outs that exist only to start a downstream DAG.
Where it is worth adopting
- Producer and consumer have a clear one-to-one or many-to-one data relationship.
- The producer's schedule varies, or it is retried often, and the fixed-offset consumer has missed data before.
- You are already deleting the sensors for reliability reasons. See the post on deferrable operators.
Where it is not
- Consumers that need data for a specific logical date. Asset-triggered runs are not tied to a producer's data interval the way a scheduled run is. Logic that reads
data_interval_startneeds rework. This is the most common surprise in practice. - Multi-input consumers with a mix of schedules.
schedule=[a, b, c]waits for every asset to update at least once since the last run. A slow producer holds the whole mart. You may wantAssetOrTimeScheduleinstead, which adds a time fallback, and then you must handle partial inputs on purpose. - Assets whose updates happen outside Airflow. Airflow only knows what a task reports. If a vendor drops files into a bucket, a plain asset will not notice. Event-driven scheduling with an asset watcher can cover that for supported message queues. Test it on your own provider versions before relying on it, because it is newer than the rest of the feature.
- Estates with thirty stable DAGs on clean cron schedules that never miss. Rewriting them buys little and adds migration risk.
Caveat: an asset is a name and an event, not a data-quality check. A task can succeed, emit the event and publish an empty table. The consumer will run anyway. Keep row-count or freshness checks inside the producer.
A practical order of work
- Migrate first with schedules unchanged. Do not combine the Task SDK move with a scheduling redesign. A dual-run diff is only readable if one thing changed.
- List every
ExternalTaskSensorand everyTriggerDagRunOperator. Rank them by how often they have caused a missed SLA. - Convert the worst three to assets. Dual-run them. Check the run count and the logical-date handling.
- Turn on a versioned bundle only if you hit the mid-run drift problem, or if audit requires it. Test a worker losing repository access during a run.
- Leave the rest alone.
The caveat for your estate
Both features are conveniences built for estates that have a particular pain. If your nightly batch is stable and your deploys are infrequent, neither is urgent. Some DAGs should be retired instead of re-expressed as assets. If a consumer has had no readers for a year, deleting it beats any scheduling model.
If you are not sure which of your DAG dependencies are real, an inventory of sensors, trigger operators and cron offsets is the first thing a written assessment would produce. You can also build that list yourself from the metadata database or the REST API.