From dak
Guides migration of Apache Airflow DAGs to Airflow 2.11.1 or 3 in Google Cloud's Managed Service for Apache Airflow, including environment inspection and breaking change scanning.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dak:gcp-managed-airflow-migrationsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides you through the process of adjusting Airflow DAGs from an
This skill guides you through the process of adjusting Airflow DAGs from an existing Managed Service for Apache Airflow (formerly Cloud Composer) environment (or available locally) to make them compatible with Airflow 2.11.1 (MSAA Gen 2 or 3) or Airflow 3 (MSAA Gen 3).
Before making any changes, download the existing DAG files if explicitly requested. Inspect the source environment to confirm source version only if explicitly requested. For detailed instructions about environment inspection and downloading files check references/environment-inspection.md.
If migrating to Airflow 2.11.1 (MSAA Gen 2) or Airflow 3, use the list below to trace the version progression of key dependencies. The list covers changes needed to get to Airflow 2.11.1. Take them into account when migrating from Airflow 2 (earlier than 2.11.1) to Airflow 3.
10.26.03.14.04.13.318.0.04.1.45.3.4timeout removed; get_conn() context
manager.SimpleHttpOperator -> HttpOperator.BigQueryExecuteQueryOperator removed.AutoMLBatchPredictOperator removed.BigQueryCreateEmptyTableOperator and
BigQueryCreateExternalTableOperator removed; Life Sciences operators
removed.19.0.04.1.65.5.020.0.05.0.06.0.2sshtunnel removed (native tunneling).If migrating to Airflow 3 (MSAA Gen 3), note that this is a major version upgrade with significant changes, including:
airflow to airflow.sdk).Dataset to Asset.Take into account all applicable changes within Airflow 2 (e.g. when migrating from Airflow 2.10.2, apply changes needed to move to Airflow 2.11.1 and Airflow 3 migration changes on top of that).
Run the scan commands from the root of your local workspace
(./migration_workspace unless indicated otherwise).
Use these scans if migrating to Airflow 2.11.1+ (intermediate step when migrating to Airflow 3).
grep -rn "Dataset(" ./dagsChange: Raw HTML in DAG docs/params is escaped by default.
Scan Command:
grep -rn -E "doc_md.*<|doc_md.*>|description.*<|description.*>" ./dags
Remediation: Convert HTML to Markdown, or set
AIRFLOW__WEBSERVER__ALLOW_RAW_HTML_DESCRIPTIONS=True in target.
grep -rn "as_teardown" ./dagsChange: Period renamed to Interval, testing helpers removed.
Scan Command (Code):
grep -rn -E "pendulum\.Period|pendulum\.period" ./dags
Scan Command (Tests):
grep -rn -E "\.test\(|set_test_now\(" ./tests 2>/dev/null || true
Remediation: Replace Period with Interval, and period(...) with
interval(...).
grep -rn "SSHHook" ./dags | grep "timeout"grep -rn "with SSHHook" ./dagsgrep -rn "\.get_tunnel" ./dagstimeout with conn_timeout in SSHHook.with hook as conn: with with hook.get_conn() as conn:.get_tunnel() as context manager: with hook.get_tunnel(...) as tunnel:.grep -rn "SimpleHttpOperator" ./dagsSimpleHttpOperator with HttpOperator.Scan Command (BigQuery query):
grep -rn "BigQueryExecuteQueryOperator" ./dags
BigQueryInsertJobOperator (use
configuration dict).Scan Command (BigQuery table):
grep -rn -E "BigQueryCreateEmptyTableOperator|BigQueryCreateExternalTableOperator" ./dags
BigQueryCreateTableOperator (use
table_resource dict).Scan Command (AutoML):
grep -rn -E "AutoMLTrainModelOperator|AutoMLPredictOperator|AutoMLCreateDatasetOperator|AutoMLBatchPredictOperator" ./dags
Scan Command (Dataflow):
grep -rn -E "CreateDataPipelineOperator|RunDataPipelineOperator" ./dags
DataflowCreatePipelineOperator/DataflowRunPipelineOperator.Scan Command (Life Sciences):
grep -rn "LifeSciencesRunPipelineOperator" ./dags`
BatchCreateJobOperator).Scan Command (ADLS to GCS): grep -rn "ADLSToGCSOperator" ./dags
file_system_name is provided.Use instructions from references/airflow-3.md when migrating to Airflow 3.
Perform deployment and verification steps only if explicitly requested to do so.
After applying code changes for Airflow 3, verify syntax correctness. If available in the development environment, run static lint checks:
ruff check {target_dag_file} --select AIR30
Resolve any reported deprecation warnings before finalization. If ruff is not available, recommend installing one.
gcloud composer environments describe <TARGET_ENV> \
--location <TARGET_REGION> \
--format="value(config.dagGcsPrefix)"
Expected Output: gs://<target-bucket-name>/dags
Perform this step only if explicitly requested to do so. Copy the modified
DAGs and any backed-up bucket dependencies from your local workspace to the
target GCS bucket. If you skipped the inspection step, ensure you have the
correct <target-bucket-name>.
Upload DAGs:
gcloud storage cp -r ./dags/* gs://<target-bucket-name>/dags/
Upload Other Bucket Dependencies (If applicable):
gcloud storage cp -r ./migration_workspace/<dependency-folder> gs://<target-bucket-name>/<dependency-folder>
Perform this step only if explicitly requested to upload modified DAGS to a target environment (and after uploading).
You can verify that your DAGs have been successfully uploaded, parsed, and registered by the Airflow scheduler in the target environment using the Airflow CLI.
List Registered DAGs: Run the following command to list all DAGs registered in the target environment. Verify that your migrated DAGs appear in this list.
gcloud composer environments run <TARGET_ENV> \
--location <TARGET_REGION> \
dags list
Check for Import Errors: If some DAGs are missing from the list, or to ensure there are no parsing issues, check for import errors:
gcloud composer environments run <TARGET_ENV> \
--location <TARGET_REGION> \
dags list-import-errors
Expected Output:
No data found.Note: It may take a couple of minutes for the Airflow scheduler to parse the new files and for changes to reflect in these commands.
Perform this step only if explicitly requested to upload modified DAGS to a target environment (and after uploading). Monitor Cloud Logging for the target environment to detect any runtime errors or import errors.
Run the following query in the GCP Cloud Logging Console (or via gcloud logging read):
resource.type="cloud_composer_environment"
resource.labels.environment_name="<TARGET_ENV>"
log_id("airflow-scheduler")
severity>=ERROR
If you want to verify your changes locally before deploying to the target
environment, you can use the Composer Local Development CLI tool
(composer-dev). Use references/local-development-environment.md as a reference
for interactions with local development environments.
claude plugin install data-agent-kit-starter-pack@claude-plugins-official3plugins reuse this skill
First indexed Jun 30, 2026
Migrates Apache Airflow 2.x DAG code to 3.x using Ruff AIR rules for auto-fixes on imports, operators, hooks, context; refactors metadata DB access via Task Execution API and fixes scheduling/config gotchas.
Provides expert guidance for troubleshooting Cloud Composer (Apache Airflow) pipelines. Uses gcloud logging and storage to fetch remote logs and code for Root Cause Analysis (RCA).
Builds production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.