upgrade-cloud-composer
БесплатноЗапускает вложенные скриптыНе проверенUpgrade Cloud Composer (Apache Airflow) to a new version. Use when the user asks to upgrade, update, or bump Airflow, Cloud Composer, or Airflow dependencies…
Об этом скилле
Skill: Upgrade Cloud Composer
Overview
This skill defines how to upgrade Cloud Composer (Google Cloud's managed Apache Airflow) to a new version in the pulse-data repository. This involves updating the Composer image version and syncing all Python dependencies.
What Claude does: Updates terraform config and pyproject.toml with new versions. What the user does: Provides package list, commits/pushes changes, triggers GitHub Actions, creates PR, verifies DB size.
Instructions
Step 1: Identify Current and Target Versions
Check current version: Read
recidiviz/tools/deploy/terraform/cloud-composer.tfand find theimage_versionfield (e.g.,composer-2.13.8-airflow-2.10.5)Suggest latest version: Check https://docs.cloud.google.com/composer/docs/composer-versions#images-composer-2 for the latest Cloud Composer 2 version available. Suggest this version to the user but allow them to specify a different target version.
Version format:
composer-X.Y.Z-airflow-A.B.CSearch for Dependabot alerts: Check for Dependabot security alerts that might be resolved by this upgrade:
- Get unfixed alerts:
gh api --paginate /repos/Recidiviz/pulse-data/dependabot/alerts --jq '.[] | select(.state == "open" or .state == "dismissed" or .state == "auto_dismissed") | select(.dependency.manifest_path | contains("recidiviz/airflow/pyproject.toml")) | {number, state, package: .dependency.package.name, manifest: .dependency.manifest_path, severity: .security_advisory.severity, url: .html_url}'- IMPORTANT: Use
--paginateto get all alerts (the API paginates at 30 items per page) - Get all unfixed alerts by filtering for states: "open", "dismissed", and "auto_dismissed" (everything except "fixed")
- Why check dismissed/auto_dismissed? These represent unfixed vulnerabilities. Dismissing an alert doesn't update the Composer environment. Only a Cloud Composer upgrade can resolve them.
- Filter for alerts where
manifest_pathcontainsrecidiviz/airflow/pyproject.toml- these are relevant to Cloud Composer upgrades
- IMPORTANT: Use
- Also check for open Dependabot PRs:
gh pr list --author app/dependabot --state open- Look for PRs that update packages in
recidiviz/airflow/pyproject.toml(these often fail to actually fix the issue because they only update the pyproject.toml, not the production Composer environment) - Cross-reference PR package names with the alerts from above
- Look for PRs that update packages in
- Note the Dependabot alert URLs (format:
https://github.com/Recidiviz/pulse-data/security/dependabot/XXXX) - Keep track of which packages have alerts, their states, what versions are needed to resolve them, and any associated PRs
- Get unfixed alerts:
Gather upgrade context: Ask the user for the reason for this upgrade:
- Security alerts (from Dependabot search above)?
- New features or bug fixes?
- Maintenance (e.g., approaching support end date)? If so, get the issue number
- Any other context?
This information will be used in the PR description later
Step 2: Get Package Versions for Target Cloud Composer Version
CRITICAL: Cloud Composer environments include specific pinned versions of all Python packages. You MUST use the exact versions from Google's documentation.
Construct the URL for the package list by replacing dots with dashes in the version string:
- URL pattern:
https://docs.cloud.google.com/composer/docs/versions-packages#composer-X-Y-Z-airflow-A-B-C - Example: For
composer-2.15.3-airflow-2.10.5, the URL is:https://docs.cloud.google.com/composer/docs/versions-packages#composer-2-15-3-airflow-2-10-5
Ask the user to:
- Open the URL above
- Find the section "Packages in composer-X.Y.Z-airflow-A.B.C"
- Copy-paste all the package names and versions from that section
Once the user provides the package list:
- Parse the package versions
- Verify which Dependabot alerts will be resolved: Compare the new package versions against the alerts found in Step 1.3
- Check if the new versions meet the minimum required versions from the alerts
- Note which Dependabot alert URLs will be resolved (these will go in the PR's "Related issues" section)
- Proceed to update the files
Step 3: Update Terraform Configuration
Update recidiviz/tools/deploy/terraform/cloud-composer.tf:
Find the image_version line under google_composer_environment.default_v2.config.software_config and update it:
image_version = "composer-X.Y.Z-airflow-A.B.C"
Use the Edit tool to make this change.
Step 4: Update Python Dependencies in pyproject.toml
CRITICAL: The recidiviz/airflow/pyproject.toml contains ALL dependencies pinned to exact versions. These MUST match the Cloud Composer environment.
Use the update script to update the pyproject.toml efficiently:
- Save the package list that the user provided to a temporary file:
cat > /tmp/composer_packages.txt << 'EOF' [paste user-provided pack
Установить upgrade-cloud-composer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл upgrade-cloud-composer?
Upgrade Cloud Composer (Apache Airflow) to a new version. Use when the user asks to upgrade, update, or bump Airflow, Cloud Composer, or Airflow dependencies to a new version. Handles updating terraform config and Python dependencies.
Как установить скилл upgrade-cloud-composer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл upgrade-cloud-composer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic