New advertisers: 50% off your first month with code FIRSTMONTHSee slots
astronomer avatar

Migrating Airflow 2 To 3

Guide for migrating Apache Airflow 2.x DAG code to 3.x, covering imports, operators, context, and API usage.

skills.sh installs
1.2K
GitHub stars
463
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers DAG code changes: Ruff auto-fixes, metadata DB access replacements, scheduling semantics, context keys, and XCom and Assets updates
  • Includes reference files for airflow.cfg changes, migration patterns, removed model methods, and a manual search checklist
  • Enforces an upgrade path through Airflow 2.11 and then 3.0.11 or later, since other paths would make rollbacks impossible
  • Designed for teams moving Airflow 2.x projects to 3.x that need to modernize DAG code and test refactored scheduling logic

Install

$ npx -y skills add astronomer/agents --skill migrating-airflow-2-to-3 -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Airflow 2 to 3 Migration

This skill helps migrate Airflow 2.x DAG code to Airflow 3.x, focusing on code changes (imports, operators, hooks, context, API usage).

Important: Before migrating to Airflow 3, strongly recommend upgrading to Airflow 2.11 first, then to at least Airflow 3.0.11 (ideally directly to 3.1). Other upgrade paths would make rollbacks impossible. See: https://www.astronomer.io/docs/astro/airflow3/upgrade-af3#upgrade-your-airflow-2-deployment-to-airflow-3. Additionally, early 3.0 versions have many bugs - 3.1 provides a much better experience.

Migration at a Glance

Details

Repository
github.com/astronomer/agents
Categories
Data Science & Analytics, Python
First seen
Apr 16, 2026

More from astronomer/agents

All 24

Similar to Migrating Airflow 2 To 3

More Data Science & Analytics