All skills
google avatar

/managed-airflow-migrations

@becc4b8
by googlegoogle/skills21k stars
1,698

Provides guidance for migrating Apache Airflow DAGs in Managed Service for Apache Airflow (MSAA; formerly Cloud Composer). Covers migration to Airflow 2.11.1 (MSAA Gen 2 and 3) and Airflow 3 (MSAA Gen 3), including environment inspection, GCS download/upload and scanning patterns for breaking changes. Use when migrating the DAG code to newer Airflow version. Don't use when checking DAG run failures unrelated to code migration.

Use this Skill: https://skilld.dev/gh/google/skills/managed-airflow-migrations

This session only. Nothing lands on disk.

referencesenvironment-inspection.md

≈747 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Environment inspection & downloading files

1. List and Inspect Source Environment (Only when requested)

Perform this step only if explicitly requested to do so. Run the following commands to list environments, get detailed configuration, and identify the starting versions of your source environment (<SOURCE_ENV>) in region <SOURCE_REGION>.

  1. List Environments: Identify the available Composer environments in your project.

    gcloud composer environments list \
        --locations=<SOURCE_REGION> \
        --format="table(name,location,state)"

    Note: Always use the --locations flag (plural) for listing. You can omit --locations to list across all regions.

  2. Describe Environment: Get the complete configuration details for a specific environment.

    gcloud composer environments describe <SOURCE_ENV> \
        --location <SOURCE_REGION>

    Note: Always use the --location flag (singular) for describing a specific environment.

  3. Get Specific Configuration Details: Extract specific fields from the environment description.

    • Get Image Version:

      gcloud composer environments describe <SOURCE_ENV> \
          --location <SOURCE_REGION> \
          --format="value(config.softwareConfig.imageVersion)"
    • Get PyPI Packages:

      gcloud composer environments describe <SOURCE_ENV> \
          --location <SOURCE_REGION> \
          --format="value(config.softwareConfig.pypiPackages)"
    • Get GCS Bucket Path:

      gcloud composer environments describe <SOURCE_ENV> \
          --location <SOURCE_REGION> \
          --format="value(config.dagGcsPrefix)"

      Expected Output: gs://<source-bucket-name>/dags

  4. List Active DAGs: Identify which DAGs are currently registered and active in the source environment.

    gcloud composer environments run <SOURCE_ENV> \
        --location <SOURCE_REGION> \
        dags list

2. Download DAGs and Bucket Dependencies (only when requested)

Perform this step only if explicitly requested to do so. Download DAG files and any other dependency files/folders from the source environment GCS bucket to a local workspace directory (./migration_workspace).

  1. Download DAGs:

    mkdir -p ./migration_workspace/dags
    gcloud storage cp -r gs://<source-bucket-name>/dags/* ./migration_workspace/dags/
  2. Download Other Bucket Dependencies (if applicable):

    gcloud storage cp -r gs://<source-bucket-name>/<dependency-folder> ./migration_workspace/<dependency-folder>

[!IMPORTANT] Additional Environment Dependencies: DAGs may also depend on Airflow Connections, Variables, or custom PyPI packages. Ensure these are identified and documented for the target environment setup.

Source: SKILL.md on GitHub

No alerts10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    This skill provides a structured workflow for migrating Apache Airflow DAGs to newer versions within Managed Service for Apache Airflow (MSAA). It uses standard command-line tools like gcloud and grep to inspect environments, download DAGs, and scan for breaking changes. The skill's operations on local and cloud-based files are routine for cloud administration and are performed only upon user request.

  • Socket10d

    No alerts

  • Snyk10d

    Risk: LOW · No issues

Signed by skilld at becc4b8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "version": "1.0.0",
  "category": "BigDataAndAnalytics"
}

README badge

README badge for google/skills/managed-airflow-migrations