task-debugger

ahal 的头像作者 ahal

调试和修复Taskcluster任务中的故障。当用户要求调试任务、修复失败任务或调查任务错误/故障时使用此技能。此技能使用Taskcluster CLI获取任务日志和定义,分析错误,并使用`taskgraph load-task --develop`在本地重现和调试问题。在涉及Taskcluster任务调试、任务故障或给定要调查的任务ID的任何请求时调用。

📖 中文导读:调试和修复Taskcluster任务中的故障。当用户要求调试任务、修复失败任务或调查任务错误/故障时使用此技能。此技能使用Taskcluster CLI获取任务日志和定义,分析错误,并使用`taskgraph load-task --develop`在本地重现和调试问题。在涉及Taskcluster任务调试、任务故障或给定要调查的任务ID的任何请求时调用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: task-debugger description: Debug and fix Taskcluster task failures

Setup

Taskcluster CLI:

taskcluster version  # check if installed
export TASKCLUSTER_ROOT_URL=https://firefox-ci-tc.services.mozilla.com

If not installed: https://github.com/taskcluster/taskcluster/releases/latest/

Commands:

  • taskcluster task log <task-id> - Get logs
  • taskcluster task def <task-id> - Get definition (optional)

Debug Process

  1. Extract task ID from message or URL
  2. Fetch logs: taskcluster task log <task-id>
  3. Analyze errors (tracebacks, test failures, build errors)
  4. If fix is obvious → apply it. Otherwise → reproduce locally:
    • Docker-worker tasks: taskgraph load-task --develop <task-id> (Firefox: ./mach taskgraph, others: check virtualenv or uv run taskgraph)
    • Flags: --interactive, --volume, --root, --image, --keep
    • Non-docker: extract command from task def and run locally
  5. For non-obvious issues: add debug statements → iterate → fix
  6. Verify fix using same reproduction method
  7. Clean up debug artifacts (don't re-verify after cleanup)
  8. Report: root cause, fix, verification, files changed