Skip to content

docs(flaky-tests): onboard with the trunk CLI and an API key (TRUNK-23375) - #495

Merged
acatxnamedvirtue merged 4 commits into
mainfrom
tylerbeebe/trunk-23375-trunk-cli-onboarding
Nov 19, 2026
Merged

acatxnamedvirtue merged 4 commits into
mainfrom
tylerbeebe/trunk-23375-trunk-cli-onboarding

Conversation

@acatxnamedvirtue

@acatxnamedvirtue acatxnamedvirtue commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Part of TRUNK-23375

Summary

Onboarding docs: upload test results with the new trunk CLI and a v2 API key.

  • New page flaky-tests/get-started/trunk-cli.mdx (in Getting Started): install (macOS/Linux; Windows marked experimental), create an API key with Upload test results, trunk auth api-key set, trunk flakytests upload / test, CI use, version pins, self-update, telemetry, env vars.
  • Getting Started, Other CI, GitHub Actions (trunk-io/analytics-uploader@v3, plus an "Upgrading from v2" section), the CLI reference and fork PR uploads now use that flow. "Organization API token (v1)" becomes "an API key with the Upload test results permission".
  • A short "Running trunk-analytics-cli directly" path remains (--token = API key).
    • Its download snippets resolve the version from channel-1.json, not channel.json. analytics-cli 1.0.0 was promoted for its major only, so channel.json stays on 0.17.0, which doesn't accept an API key.
    • The curl calls carry --connect-timeout 10 --max-time 60 --retry 3, as TRD-0031 requires.
  • api/authentication.mdx: Upload test results no longer says the CLI and uploader "don't use it yet".

Ready to merge

Everything these pages depend on has shipped:

  • analytics-cli 1.0.0 is promoted to channel-1.json (channel.json stays on 0.17.0 on purpose).
  • trunk CLI 0.0.14 is on the prod channel, and https://install.trunk.io serves both install.sh and install.ps1.
  • trunk-io/analytics-uploader v3.0.0 is released and marked latest, and the v3 tag resolves.

@v3 everywhere

The docs recommend trunk-io/analytics-uploader@v3, with an API key with Upload test results stored as TRUNK_API_KEY. Besides the onboarding pages above, three pages that still showed @v2 with the organization token now match:

  • Depot CI: the credential step creates an API key instead of the "Organization API token (v1)", and the secret is TRUNK_API_KEY.
  • Quarantining: both uploader examples, plus the dry-run note, now ask for an API key with Upload test results.
  • Explain a Failed Pull Request: one TRUNK_API_KEY now serves both the uploader and the script, since reading tests needs no permission. The note about two different credentials is replaced.

Only the dated changelog entries still mention @v2.

Rebased onto main after the Agents → Recipes move and the new API permission rows. In api/authentication.mdx, main's new Flaky Tests permission rows are kept, with this PR's Upload test results row. In the CLI reference, main's warning about pre-1.0 CLIs uploading without a collection ID is kept, since it still applies to 0.17.x.

Testing

  • Ran the Linux direct-download snippet as written. It resolved 1.0.0 from channel-1.json and trunk-analytics-cli --version printed 1.0.0. All four Linux and macOS 1.0.0 assets the snippets name exist.
  • docs.json parses, the new page is in the navigation, and every internal link in the changed pages resolves (API reference links aside, which come from the spec).

Follow-up (not in this PR)

  • Some other CI provider pages, framework pages and the MCP setup pages still describe the organization token or ./trunk-analytics-cli. A follow-up PR will update them.
  • TRD-0031 in trunk2 lists the docs as reading channel.json. Its consumers table needs the switch to channel-1.json.

🤖 Generated with Claude Code

@mintlify

mintlify Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
trunk 🟢 Ready View Preview Nov 19, 2026, 4:33 PM

acatxnamedvirtue and others added 4 commits November 19, 2026 16:32
…3375)

Add a Trunk CLI page for Flaky Tests: install (macOS/Linux, Windows
experimental), store a v2 API key with `trunk auth api-key set`, upload
with `trunk flakytests`, CI use, version pinning, self-update and
telemetry. Move Getting Started, Other CI, GitHub Actions (analytics-uploader
@V3), the CLI reference and fork PR uploads to that flow, replacing the
organization token with an API key that has Upload test results. Keep a
path for running trunk-analytics-cli directly with `--token`, with the
release-download curl calls bounded by --connect-timeout/--max-time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rs for v3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
analytics-cli 1.0.0 was promoted for its major only, so channel.json
stays on 0.17.0, which takes no API key. The direct-download snippets
read channel-1.json, as the trunk CLI and analytics-uploader v3 do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uarantining and failed-PR pages

v3.0.0 is released. These pages still showed @v2 with the organization
token; they now use @V3 with an API key with Upload test results, stored
as TRUNK_API_KEY like the GitHub Actions page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@acatxnamedvirtue
acatxnamedvirtue force-pushed the tylerbeebe/trunk-23375-trunk-cli-onboarding branch from 64b465e to 51d715f Compare November 19, 2026 16:32
@acatxnamedvirtue
acatxnamedvirtue marked this pull request as ready for review November 19, 2026 16:35
@acatxnamedvirtue
acatxnamedvirtue merged commit f373c91 into main Nov 19, 2026
5 checks passed
@mintlify

mintlify Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Docs PR opened: #540

I added a November 19 changelog post about uploading Flaky Tests results with the new trunk CLI and an API key.

This branch was successfully deployed

1 active deployment
staging — 51d715fb Deployed Nov 19, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant