treeherder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTreeherder
Treeherder
Query Mozilla Treeherder for CI job results, failure analysis, and performance data.
查询Mozilla Treeherder的CI任务结果、故障分析及性能数据。
Tools
工具
This skill uses two CLI tools:
| Tool | Role | Install | Strengths |
|---|---|---|---|
| treeherder-cli | Primary | | Failure analysis, revision comparison, test history, log fetching, artifact downloads |
| lumberjackth | Secondary | | Push listing, failures-by-bug, error suggestions, perf alerts, result/tier/state filtering |
Use treeherder-cli for revision-based failure analysis, comparing revisions, test history, log searching, and artifact downloads.
Use lumberjackth for listing pushes, querying failures by bug ID, viewing error lines with bug suggestions, performance alerts, and filtering by result/state/tier.
本技能使用两款CLI工具:
| 工具 | 用途 | 安装方式 | 优势 |
|---|---|---|---|
| treeherder-cli | 主要工具 | | 故障分析、版本对比、测试历史查询、日志获取、产物下载 |
| lumberjackth | 次要工具 | | 推送列表查询、按Bug ID查询故障、错误建议、性能告警、按结果/层级/状态过滤 |
使用treeherder-cli 进行基于版本的故障分析、版本对比、测试历史查询、日志搜索及产物下载。
使用lumberjackth 进行推送列表查询、按Bug ID查询故障、查看带Bug建议的错误行、性能告警及按结果/状态/层级过滤。
Quick Start
快速开始
treeherder-cli (primary)
treeherder-cli(主要工具)
bash
undefinedbash
undefinedGet failed jobs for a revision
获取指定版本的失败任务
treeherder-cli a13b9fc22101 --json
treeherder-cli a13b9fc22101 --json
Filter by job name or platform
按任务名称或平台过滤
treeherder-cli a13b9fc22101 --filter "mochitest" --json
treeherder-cli a13b9fc22101 --platform "linux.*64" --json
treeherder-cli a13b9fc22101 --filter "mochitest" --json
treeherder-cli a13b9fc22101 --platform "linux.*64" --json
Group failures by test (cross-platform view)
按测试用例分组查看故障(跨平台视图)
treeherder-cli a13b9fc22101 --group-by test --json
treeherder-cli a13b9fc22101 --group-by test --json
Compare revisions to find regressions
对比版本以定位回归问题
treeherder-cli a13b9fc22101 --compare b2c3d4e5f678 --json
treeherder-cli a13b9fc22101 --compare b2c3d4e5f678 --json
Check test history for intermittent detection
检查测试历史以检测间歇性故障
treeherder-cli --history "test_audio_playback" --history-count 10 --repo try --json
treeherder-cli --history "test_audio_playback" --history-count 10 --repo try --json
Show similar job history for a failed job ID
查看指定失败任务ID的同类任务历史
treeherder-cli --similar-history 543981186 --similar-count 100 --repo try --json
treeherder-cli --similar-history 543981186 --similar-count 100 --repo try --json
Fetch logs with pattern matching
按模式匹配获取日志
treeherder-cli a13b9fc22101 --fetch-logs --pattern "ASSERTION|CRASH" --json
treeherder-cli a13b9fc22101 --fetch-logs --pattern "ASSERTION|CRASH" --json
Download artifacts
下载产物
treeherder-cli a13b9fc22101 --download-artifacts --artifact-pattern "screenshot|errorsummary"
treeherder-cli a13b9fc22101 --download-artifacts --artifact-pattern "screenshot|errorsummary"
Watch mode with notification
监听模式并发送通知
treeherder-cli a13b9fc22101 --watch --notify
treeherder-cli a13b9fc22101 --watch --notify
Switch repository (default: autoland)
切换仓库(默认:autoland)
treeherder-cli a13b9fc22101 --repo try --json
undefinedtreeherder-cli a13b9fc22101 --repo try --json
undefinedlumberjackth (secondary)
lumberjackth(次要工具)
bash
undefinedbash
undefinedList recent pushes
查看近期推送记录
uvx --from lumberjackth lj pushes autoland -n 10
uvx --from lumberjackth lj pushes autoland -n 10
Get jobs for a push with result/tier filtering
按结果/层级过滤获取指定推送的任务
uvx --from lumberjackth lj jobs autoland --push-id 12345 --result testfailed --tier 1
uvx --from lumberjackth lj jobs autoland --push-id 12345 --result testfailed --tier 1
Watch jobs with auto-refresh
自动刷新监听任务
uvx --from lumberjackth lj jobs try -r abc123 -w -i 60
uvx --from lumberjackth lj jobs try -r abc123 -w -i 60
Query failures by bug ID
按Bug ID查询故障
uvx --from lumberjackth lj failures 2012615 -t autoland -p "windows.*24h2"
uvx --from lumberjackth lj failures 2012615 -t autoland -p "windows.*24h2"
Show errors and bug suggestions
查看错误信息及Bug建议
uvx --from lumberjackth lj errors autoland 545896732
uvx --from lumberjackth lj errors autoland 545896732
Performance alerts
性能告警
uvx --from lumberjackth lj perf-alerts -r autoland -n 10
uvx --from lumberjackth lj perf-alerts -r autoland -n 10
JSON output
JSON格式输出
uvx --from lumberjackth lj --json jobs autoland --push-id 12345
undefineduvx --from lumberjackth lj --json jobs autoland --push-id 12345
undefinedWhen to Use Which Tool
工具适用场景
| Task | Tool | Example |
|---|---|---|
| Analyze failures for a revision | treeherder-cli | |
| Compare two revisions | treeherder-cli | |
| Check test history | treeherder-cli | |
| Compare a failed job to similar jobs | treeherder-cli | |
| Fetch/search logs | treeherder-cli | |
| Download artifacts | treeherder-cli | |
| Watch a revision | treeherder-cli | |
| Performance/resource data | treeherder-cli | |
| List recent pushes | lumberjackth | |
| Filter by result/state/tier | lumberjackth | |
| Get single job details | lumberjackth | |
| Failures by bug ID | lumberjackth | |
| Error lines + bug suggestions | lumberjackth | |
| Performance alerts | lumberjackth | |
| List repositories | lumberjackth | |
| 任务 | 工具 | 示例 |
|---|---|---|
| 分析指定版本的故障 | treeherder-cli | |
| 对比两个版本 | treeherder-cli | |
| 检查测试历史 | treeherder-cli | |
| 对比失败任务与同类任务 | treeherder-cli | |
| 获取/搜索日志 | treeherder-cli | |
| 下载产物 | treeherder-cli | |
| 监听指定版本 | treeherder-cli | |
| 性能/资源数据查询 | treeherder-cli | |
| 查看近期推送记录 | lumberjackth | |
| 按结果/状态/层级过滤 | lumberjackth | |
| 获取单个任务详情 | lumberjackth | |
| 按Bug ID查询故障 | lumberjackth | |
| 错误行信息+Bug建议 | lumberjackth | |
| 性能告警 | lumberjackth | |
| 查看仓库列表 | lumberjackth | |
Prerequisites
前置条件
- treeherder-cli:
cargo install --git https://github.com/padenot/treeherder-cli - lumberjackth: No install needed, uses for zero-install execution
uvx
No authentication required for either tool.
- treeherder-cli:
cargo install --git https://github.com/padenot/treeherder-cli - lumberjackth:无需安装,使用实现零安装执行
uvx
两款工具均无需身份验证。
References
参考资料
- - Complete CLI reference for both tools
references/cli-reference.md - - Sheriff workflow examples
references/sheriff-workflows.md - - REST API documentation
references/api-reference.md - - Compare failed jobs using Treeherder's
references/similar-jobs-comparison.mdAPIsimilar_jobs
- - 两款工具的完整CLI参考文档
references/cli-reference.md - - 值班工程师工作流示例
references/sheriff-workflows.md - - REST API文档
references/api-reference.md - - 使用Treeherder的
references/similar-jobs-comparison.mdAPI对比失败任务similar_jobs
External Documentation
外部文档
- Treeherder: https://treeherder.mozilla.org/
- treeherder-cli: https://github.com/padenot/treeherder-cli
- lumberjackth: https://pypi.org/project/lumberjackth/
- Treeherder:https://treeherder.mozilla.org/
- treeherder-cli:https://github.com/padenot/treeherder-cli
- lumberjackth:https://pypi.org/project/lumberjackth/