본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)22k · #10343

managed-airflow-dag-troubleshooting

하는 일

이 스킬은 Managed Service for Apache Airflow(이전 이름 Cloud Composer)의 실패한 Airflow 실행을 조사합니다. 예약된 워크플로가 깨져서 명확한 이유가 필요한 사람을 위한 스킬입니다.

사용하는 경우

  • ✓Managed Airflow의 DAG 실행이나 작업 인스턴스가 실패했을 때.
  • ✓Airflow 작업 로그를 읽어 traceback이나 API 오류를 찾아야 할 때.
  • ✓AirflowTaskTimeout 같은 오류로 작업이 계속 시간 초과될 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/managed-airflow-dag-troubleshooting/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/managed-airflow-dag-troubleshooting/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“매일 밤 실행되는 Airflow DAG가 load 작업에서 실패했습니다. 로그를 읽고 무엇이 잘못되었는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

gcloud logging으로 작업 로그를, gcloud storage로 저장소의 DAG 코드를 가져온 뒤, traceback과 API 오류 코드 같은 오류 패턴을 찾습니다. 조언은 찾은 내용에만 근거합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

  1. 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.

  2. 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 via gcloud 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 read to 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-run or 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.

  3. 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

자주 묻는 질문

전체 환경 성능도 점검하나요?

아닙니다. 성능 권장 사항은 별도 스킬이 맡습니다.

로그에 접근할 수 있어야 하나요?

네. gcloud logging과 gcloud storage로 로그와 DAG 코드를 읽습니다.

원인을 추측하나요?

아닙니다. 조언은 로그와 코드에서 직접 찾은 내용에 근거한다고 밝힙니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
22k
순위
#10343
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬