managed-airflow-dag-troubleshooting
Skill này làm gì
Skill này điều tra các lần chạy Airflow bị lỗi trên Managed Service for Apache Airflow, trước đây gọi là Cloud Composer. Skill dành cho người có quy trình định kỳ bị hỏng và cần một lý do rõ ràng.
Khi nào nên dùng
- ✓Khi một lần chạy DAG hoặc một tác vụ trong Managed Airflow bị lỗi.
- ✓Khi bạn cần đọc log tác vụ Airflow để tìm traceback hoặc lỗi API.
- ✓Khi một tác vụ liên tục hết thời gian chờ, chẳng hạn gặp lỗi AirflowTaskTimeout.
Liên kết skill
https://github.com/google/skills/blob/main/skills/cloud/managed-airflow-dag-troubleshooting/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“DAG Airflow chạy hằng đêm của tôi bị lỗi ở tác vụ nạp dữ liệu. Hãy đọc log và cho tôi biết đã sai ở đâu.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill lấy log tác vụ bằng gcloud logging và mã DAG từ bộ nhớ, sau đó tìm các mẫu lỗi như traceback và mã lỗi API. Kết luận chỉ dựa trên những gì skill tìm thấy.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Managed Service for Apache Airflow (formerly Cloud Composer) DAG troubleshooting guide
This skill provides instructions for troubleshooting Managed Airflow DAGs (DAG
runs and task instances), utilizing gcloud composer, gcloud logging and
gcloud storage commands to fetch remote logs and code.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:managed-airflow-dag-troubleshooting)"
and append agent-skills/1.0 (skill:managed-airflow-dag-troubleshooting) to User-Agent headers.
General rules
Provide suggestions on how to troubleshoot the failed jobs. Provide only the steps that the user can actually take. Ground all troubleshooting advice in direct findings.
When troubleshooting a failure, follow the following practices to always provide a deterministic diagnosis:
Fetch relevant logs: Always fetch the logs for a task under investigation using
gcloud logging read; check the logs for specific error patterns: Python tracebacks, API error codes (e.g., 400, 403, 404, 500), or Airflow signals (e.g.,AirflowTaskTimeout).Fetch task metadata: When troubleshooting a task, fetch the task state and metadata (execution state, try number, timestamps, and execution details) using:
gcloud composer environments run {env_name} \ --location {location} \ tasks states-for-dag-run -- -d {dag_id} -r {run_id}or for an individual task instance:
gcloud composer environments run {env_name} \ --location {location} \ tasks state -- {dag_id} {task_id} {execution_date}Retrieve and compare DAG source code: Download the remote DAG source code using
gcloud storage cp gs://{bucket_name}/dags/{dag_file}.py .(find the environment bucket viagcloud composer environments describe {env_name} --location {location} --format="value(config.dagGcsPrefix)"). Compare the parameters in the code (e.g., table IDs, disk sizes, URI paths) against the error messages found in the task logs.Explain code mistakes and potential fixes: Explain mistakes in the code (if any are actually visible); suggest potential fixes (if they are very likely to be meaningful); discuss source code availability if needed - if some source code is unavailable (e.g. imported from a file other than the main source code file), mention this (you can mention the package name) - in such a case take into account most likely trigger rules if they are unknown.
Check for environment-level errors: Query Cloud Logging with
gcloud logging readto see if there are high-level environment issues or known platform errors correlating with the failure (see Known issues below). You MUST return ALL found issues.Identify failing tasks in a DAG run: When troubleshooting a failed DAG run, mention the task that caused a failure (use
tasks states-for-dag-runor Cloud Logging to identify failed tasks). Provide a task instance name. If many tasks failed, mention which task was critical (mandatory for successful DAG run execution - look into task dependencies and trigger rules) and focus on this one.Verify service configurations in code: If logs suggest an issue with a specific service (e.g., BigQuery, Dataform, Compute Engine), use the log details to verify the configuration in the DAG source code.
Correlate logs with code: E.g., if BigQuery returns a 404, verify the dataset ID or table ID in the DAG source code matches reality.
Prioritize known platform issues: Check against Known issues below. If Cloud Logging queries return matching platform error signals, prioritize that diagnosis.
Summarize with Evidence (Deterministic Response): Your response must be specific. Avoid general advice like 'check your permissions.' or 'check the logs.' Instead, say 'The service account is missing X permission
Câu hỏi thường gặp
Skill có kiểm tra hiệu năng tổng thể của môi trường không?
Không. Các khuyến nghị về hiệu năng do một skill khác đảm nhiệm.
Skill có cần quyền truy cập vào log không?
Có. Skill dùng gcloud logging và gcloud storage để đọc log và mã DAG.
Skill có đoán nguyên nhân không?
Không. Skill nói rõ kết luận dựa trên phát hiện trực tiếp từ log và mã nguồn.
Chi tiết
Mô tả gốc của tác giả
Provides guidance for troubleshooting Apache Airflow DAGs (failed DAG runs and task instances) in Managed Service for Apache Airflow (MSAA; formerly Cloud Composer). Use when figuring out reasons for DAG run or task instance failures. Don't use when looking for overall recommendations for Managed Airflow environment performance.
repo: google/skills
Độ phổ biến
- Sao GitHub
- 22k
- Vị trí xếp hạng
- #10343
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
finding-google-skills
22kGiúp agent của bạn tìm hướng dẫn Google phù hợp cho việc thiết lập, như hosting, cơ sở dữ liệu, lưu trữ, đăng nhập hoặc phục vụ mô hình AI.
gcloud
22kGiúp agent của bạn viết và kiểm tra các lệnh gcloud của Google Cloud, tra cứu cú pháp chính xác trước khi chạy bất cứ thứ gì để không đoán các flag.
google-cloud-recipe-auth
22kHướng dẫn agent của bạn qua quản lý danh tính và quyền truy cập của Google Cloud, gồm cách con người và dịch vụ đăng nhập và những quyền họ nhận được.
google-cloud-recipe-onboarding
22kHướng dẫn một lập trình viên mới qua các bước đầu tiên trên Google Cloud, gồm chọn dự án, liên kết thanh toán và triển khai tài nguyên đầu tiên.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.