gcp-composer-troubleshooting

Diagnoses Cloud Composer and Airflow DAG failures using gcloud logs and remote code retrieval.

9|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/jerrylin96/dotgemini --skill gcp-composer-troubleshooting-jerrylin96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gcp-composer-troubleshooting
Source: https://github.com/jerrylin96/dotgemini/tree/main/skills/gcp-composer-troubleshooting
Command: npx skills add https://github.com/jerrylin96/dotgemini --skill gcp-composer-troubleshooting-jerrylin96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a Cloud Composer (Apache Airflow) DAG fails, finding the root cause requires digging through scattered logs and verifying which code version actually ran. This Skill guides an evidence-based Root Cause Analysis (RCA) workflow that fetches remote logs and code before proposing any fix. ## Core Features & Use Cases - Log-Based Evidence Gathering: Uses gcloud logging read with severity, environment, and DAG ID filters to locate failures and stack traces. - Remote Code Retrieval: Downloads the actual DAG code from the Composer GCS bucket via gcloud storage, treating remote code as the source of truth rather than assuming local files match. - RCA Report Generation: Correlates log errors with specific code lines, explains the root cause, proposes a fix, and produces a saved RCA report. - Pipeline Template Validation: Provides compliant deployment.yaml and orchestration-pipeline.yaml templates for declarative pipelines (dbt, PySpark, BigQuery actions). - Use Case: A user says "My DAG daily_sales_agg failed yesterday around 2pm." The Skill queries Composer logs, finds a KeyError: 'region' in the failed task, downloads the remote DAG, pinpoints line 45, and generates an RCA report with a recommended fix. ## Quick Start Ask the agent to troubleshoot why your Cloud Composer DAG failed and generate a Root Cause Analysis report, providing the DAG ID and approximate failure time.

Frequently Asked Questions about gcp-composer-troubleshooting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I troubleshoot a failed Cloud Composer DAG?

Start by gathering the DAG ID, run ID, and task ID, then use `gcloud logging read` with filters like `resource.type="cloud_composer_environment"` and `severity>=ERROR` to find the failure. Download the remote DAG code from the environment's GCS bucket to analyze the exact code that ran.

How to generate a Root Cause Analysis report for Airflow failures?

Correlate error logs with the remote DAG code to pinpoint the exact failing line or configuration, then document the root cause with cited log entries and code snippets. The Skill generates the RCA report and saves it to a file without modifying any code.

What gcloud commands fetch Cloud Composer logs and DAG runs?

Use `gcloud composer environments list --locations=<region>` to find environments, `gcloud composer environments run <env> --location <region> dags list-runs -- -d <dag_id>` for runs, and `gcloud logging read` with environment and dag_id label filters for logs.

Why does my local DAG code not match the Composer environment?

The remote environment may run an older or different version than your local files. The Skill treats remote code as the source of truth and can download remote DAGs to a temporary folder, or sync your local DAG to the environment after confirmation.

Can this Skill fix my broken DAG code automatically?

No, it operates read-only by default: it analyzes logs and code, explains the root cause, and proposes a fix, but does not modify code unless you explicitly ask it to apply the fix.