treeherder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Treeherder

Treeherder

Query Mozilla Treeherder for CI job results, failure analysis, and performance data.
查询Mozilla Treeherder的CI任务结果、故障分析及性能数据。

Tools

工具

This skill uses two CLI tools:
ToolRoleInstallStrengths
treeherder-cliPrimary
cargo install --git https://github.com/padenot/treeherder-cli
Failure analysis, revision comparison, test history, log fetching, artifact downloads
lumberjackthSecondary
uvx --from lumberjackth lj
(zero-install)
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主要工具
cargo install --git https://github.com/padenot/treeherder-cli
故障分析、版本对比、测试历史查询、日志获取、产物下载
lumberjackth次要工具
uvx --from lumberjackth lj
(无需安装)
推送列表查询、按Bug ID查询故障、错误建议、性能告警、按结果/层级/状态过滤
使用treeherder-cli 进行基于版本的故障分析、版本对比、测试历史查询、日志搜索及产物下载。
使用lumberjackth 进行推送列表查询、按Bug ID查询故障、查看带Bug建议的错误行、性能告警及按结果/状态/层级过滤。

Quick Start

快速开始

treeherder-cli (primary)

treeherder-cli(主要工具)

bash
undefined
bash
undefined

Get 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
undefined
treeherder-cli a13b9fc22101 --repo try --json
undefined

lumberjackth (secondary)

lumberjackth(次要工具)

bash
undefined
bash
undefined

List 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
undefined
uvx --from lumberjackth lj --json jobs autoland --push-id 12345
undefined

When to Use Which Tool

工具适用场景

TaskToolExample
Analyze failures for a revisiontreeherder-cli
treeherder-cli abc123 --json
Compare two revisionstreeherder-cli
treeherder-cli abc123 --compare def456 --json
Check test historytreeherder-cli
treeherder-cli --history "test_name" --json
Compare a failed job to similar jobstreeherder-cli
treeherder-cli --similar-history 543981186 --repo try --json
Fetch/search logstreeherder-cli
treeherder-cli abc123 --fetch-logs --pattern "ERROR"
Download artifactstreeherder-cli
treeherder-cli abc123 --download-artifacts
Watch a revisiontreeherder-cli
treeherder-cli abc123 --watch --notify
Performance/resource datatreeherder-cli
treeherder-cli abc123 --perf --json
List recent pusheslumberjackth
lj pushes autoland -n 10
Filter by result/state/tierlumberjackth
lj jobs autoland --push-id 123 --result testfailed --tier 1
Get single job detailslumberjackth
lj job autoland "guid" --logs
Failures by bug IDlumberjackth
lj failures 2012615 -t autoland
Error lines + bug suggestionslumberjackth
lj errors autoland 545896732
Performance alertslumberjackth
lj perf-alerts -r autoland
List repositorieslumberjackth
lj repos
任务工具示例
分析指定版本的故障treeherder-cli
treeherder-cli abc123 --json
对比两个版本treeherder-cli
treeherder-cli abc123 --compare def456 --json
检查测试历史treeherder-cli
treeherder-cli --history "test_name" --json
对比失败任务与同类任务treeherder-cli
treeherder-cli --similar-history 543981186 --repo try --json
获取/搜索日志treeherder-cli
treeherder-cli abc123 --fetch-logs --pattern "ERROR"
下载产物treeherder-cli
treeherder-cli abc123 --download-artifacts
监听指定版本treeherder-cli
treeherder-cli abc123 --watch --notify
性能/资源数据查询treeherder-cli
treeherder-cli abc123 --perf --json
查看近期推送记录lumberjackth
lj pushes autoland -n 10
按结果/状态/层级过滤lumberjackth
lj jobs autoland --push-id 123 --result testfailed --tier 1
获取单个任务详情lumberjackth
lj job autoland "guid" --logs
按Bug ID查询故障lumberjackth
lj failures 2012615 -t autoland
错误行信息+Bug建议lumberjackth
lj errors autoland 545896732
性能告警lumberjackth
lj perf-alerts -r autoland
查看仓库列表lumberjackth
lj repos

Prerequisites

前置条件

  • treeherder-cli:
    cargo install --git https://github.com/padenot/treeherder-cli
  • lumberjackth: No install needed, uses
    uvx
    for zero-install execution
No authentication required for either tool.
  • treeherder-cli
    cargo install --git https://github.com/padenot/treeherder-cli
  • lumberjackth:无需安装,使用
    uvx
    实现零安装执行
两款工具均无需身份验证。

References

参考资料

  • references/cli-reference.md
    - Complete CLI reference for both tools
  • references/sheriff-workflows.md
    - Sheriff workflow examples
  • references/api-reference.md
    - REST API documentation
  • references/similar-jobs-comparison.md
    - Compare failed jobs using Treeherder's
    similar_jobs
    API
  • references/cli-reference.md
    - 两款工具的完整CLI参考文档
  • references/sheriff-workflows.md
    - 值班工程师工作流示例
  • references/api-reference.md
    - REST API文档
  • references/similar-jobs-comparison.md
    - 使用Treeherder的
    similar_jobs
    API对比失败任务

External Documentation

外部文档