gcp-composer-troubleshooting

Diagnose failed Cloud Composer DAGs and generate root cause analysis reports using gcloud logs.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/DingJun1028/esggo-kv --skill gcp-composer-troubleshooting-dingjun1028
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gcp-composer-troubleshooting
Source: https://github.com/DingJun1028/esggo-kv/tree/main/.agents/skills/gcp-composer-troubleshooting
Command: npx skills add https://github.com/DingJun1028/esggo-kv --skill gcp-composer-troubleshooting-dingjun1028

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When an Airflow DAG fails in a Cloud Composer environment, finding the actual cause requires digging through remote logs and comparing them against the code actually deployed in the environment. This Skill guides a methodical, evidence-based Root Cause Analysis (RCA) so you fix the real problem instead of guessing. ## Core Features & Use Cases - Evidence-Based Log Analysis: Uses gcloud logging read with severity, DAG ID, and task filters to retrieve the exact errors and stack traces behind a failure. - Remote Code Verification: Downloads the actual DAG code from the Composer GCS bucket via gcloud storage to confirm the remote version matches local files before analyzing. - RCA Report Generation: Correlates log entries with specific code lines, explains the root cause, proposes a fix, and produces a saved RCA report. - Use Case: Your daily_sales_agg DAG failed yesterday at 2pm. The Skill pulls the error logs, finds a KeyError: 'region' in the process_sales task, pinpoints line 45 in the remote DAG code, and recommends adding record.get('region', 'unknown'). ## Quick Start Ask the agent to troubleshoot why your Composer DAG failed by providing the DAG ID, environment name, 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 severity>=ERROR filters scoped to the cloud_composer_environment resource. Correlate the log errors with the actual DAG code downloaded from the environment's GCS bucket to identify the root cause.

How to fetch Airflow task logs from Google Cloud Composer?▼

Use gcloud logging read with a filter like resource.type="cloud_composer_environment" combined with labels.dag_id and severity>=ERROR. Add --limit and a time range to narrow results, and format output with timestamp, severity, task_id, and textPayload fields.

Why does my local DAG code differ from the Composer environment?▼

The Composer environment runs code synced to its GCS bucket, which may not match your local files if deployments are pending. Download the remote DAG with gcloud storage cp and confirm which version to analyze before performing the RCA.

Can this skill automatically fix my broken Airflow DAG?▼

No, the skill is read-only by design and focuses on proving the root cause using logs and remote code first. It proposes a fix and generates an RCA report, but only modifies code when you explicitly ask it to.

What gcloud commands list Composer environments and DAG runs?▼

Use gcloud composer environments list with the --locations flag to list environments, and gcloud composer environments run <env> --location <region> dags list-runs -- -d <dag_id> to list DAG runs. Always include the location flag for Composer commands.