Skip to content

ci(smoke-test): pick the token by the release under test (TRUNK-23149) - #1335

Merged
trunk-io[bot] merged 1 commit into
mainfrom
tyler/smoke-test-token-by-release
Nov 17, 2026
Merged

trunk-io[bot] merged 1 commit into
mainfrom
tyler/smoke-test-token-by-release

Conversation

@TylerJang27

@TylerJang27 TylerJang27 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

The release smoke test has failed since 14:00 UTC on 2026-11-17 (run), on staging and production, for the CLI and the Ruby gem.

#1314 moved smoke_test.yml to TRUNK_{PROD,STAGING}_API_V2_TOKEN. This workflow runs the latest published release, which is still 0.17.0, and 0.17.x sends --token on x-api-token as an organization token. trunk1's GetOrganizationByApiToken finds no org for a v2 key, and GetOrganizationByUrlSlug then returns PERMISSION_DENIED. The public API maps that to 404 on /v1/metrics/createBundleUpload, and the CLI reports "Unauthorized access…". The quarantine lookup fails the same way. Customer traffic is unaffected: production 404s on that route are at their usual background level.

Change

  • determine_releases outputs cli_v2 / rspec_v2, which are true when the release's major version is 1 or higher. The CLI and gem get separate outputs because a manual run can set release and rspec_release to different versions.
  • The CLI and gem smoke steps use the v2 key when that output is true, and the organization token (TRUNK_{PROD,STAGING}_ORG_API_TOKEN, org-level secrets) otherwise.
  • test_ruby_gem_{staging,production} now list determine_releases in needs, because a job can only read outputs from jobs it lists directly. Without it, the expression would be empty and the jobs would stay on the org token after 1.0.0.

When 1.0.0 is published, the run switches to the v2 keys with no further PR. smoke_test_main.yml builds from main, which already only accepts v2 keys, so it is unchanged.

Testing

  • The version check returns false for 0.17.0, 0.17.0-beta.4 and v0.16.3, and true for 1.0.0, 1.0.0-beta.1, 1.0.0.pre.beta.1 and 2.3.4.
  • actionlint reports the same notes as on main, and nothing new.
  • trunk check couldn't run in this environment (no Rust toolchain), so it was not run.
  • After merge, a manual run of Smoke Test should pass on both environments.

🤖 Generated with Claude Code

Part of TRUNK-23149

#1314 moved the release smoke test to the v2 API keys, but it runs the
latest published CLI and gem (0.17.0), which send --token as an
organization token. trunk1 finds no org for a v2 key, so
createBundleUpload and the quarantine lookup 404 on staging and
production.

determine_releases now records whether each release is 1.0.0 or later.
Releases before 1.0.0 get the organization token, and later ones get the
v2 key, so the run switches over when 1.0.0 is published. The gem jobs
now list determine_releases in needs so they can read that output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@TylerJang27

Copy link
Copy Markdown
Collaborator Author

/trunk merge

@trunk-io
trunk-io Bot merged commit 08c15f3 into main Nov 17, 2026
23 checks passed
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.

2 participants