Skip to content

ci(release): promote to latest only when asked (TRUNK-23152) - #1339

Merged
trunk-io[bot] merged 1 commit into
mainfrom
tylerbeebe/promote-latest-checkbox
Nov 17, 2026
Merged

trunk-io[bot] merged 1 commit into
mainfrom
tylerbeebe/promote-latest-checkbox

Conversation

@acatxnamedvirtue

Copy link
Copy Markdown
Contributor

Part of TRUNK-23152

Many orgs pin analytics-uploader to v2.1.7 or older. Those versions resolve latest from channel.json (v2.1.6, v2.1.7) or GitHub's latest release (v2.1.5 and older). So today, promoting 1.0.0 moves them all onto it at once. Most of them use an organization token, which 1.0.0 refuses.

This adds a promote-latest checkbox to Promote Release, off by default.

channel-<major>.json channel.json GitHub release
off (default) moves stays released, not latest (--prerelease=false --latest=false)
on moves moves, if newest latest (today's behaviour)

So 1.0.0 can be promoted for analytics-uploader v3, which reads channel-1.json, while v2.1.7 and older stay on 0.17.0 until we tick the box.

  • set-latest-in-s3.sh skips channel.json when PROMOTE_LATEST=false. When the variable is unset it still moves it, which Mirror Releases to S3's set-latest-to-github-latest relies on.
  • The run name says "to latest" or "for its major".
  • CONTRIBUTING.md's release steps describe the checkbox.

While it's off: the trunk CLI's trunk flakytests resolves latest from channel.json, so it keeps getting 0.17.0 unless the caller sets TRUNK_ANALYTICS_CLI_VERSION. On 0.x the trunk CLI passes analytics-cli no credential. So the onboarding docs' plain trunk flakytests flow (trunk-io/docs2#495) doesn't get 1.0.0 until we promote to latest, or until the docs pin a version. analytics-uploader v3 isn't affected: it passes the channel-1.json version itself.

Testing

  • Ran set-latest-in-s3.sh against a stub aws for 1.0.0, with channel.json at 0.17.0:
    • PROMOTE_LATEST=false writes only channel-1.json and outputs global_moved=false.
    • true, or unset, writes both and outputs global_moved=true.
  • bash -n, shellcheck and actionlint (via trunk check) are clean.

🤖 Generated with Claude Code

Promote Release gets a promote-latest checkbox, off by default. Off, only
channel-<major>.json moves, and the GitHub release is marked released but not
latest, so analytics-uploader v2.1.7 and older, which follow channel.json or
GitHub's latest, stay on the previous release. On is the old behaviour.
set-latest-in-s3.sh still moves channel.json when PROMOTE_LATEST is unset,
which Mirror Releases to S3 relies on.

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.

@trunk-io
trunk-io Bot merged commit a1ea634 into main Nov 17, 2026
23 checks passed
acatxnamedvirtue added a commit that referenced this pull request Nov 17, 2026
…ly when promoted to latest (TRUNK-23152)

- The rspec gem 1.0.0 raises RSpec::Trunk::ConfigurationError without a
  collection id or with an organization token (#1337), with
  DISABLE_RSPEC_TRUNK_FLAKY_TESTS=true to opt out and a ~> 0.17.0 pin to stay.
- analytics-uploader v2.1.7 and older follow channel.json or GitHub's latest,
  which move only when 1.0.0 is promoted to latest (#1339).
- trunk CLI 0.0.14 runs analytics-cli 1.x unless pinned (trunk-io/trunk2#8640).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acatxnamedvirtue added a commit that referenced this pull request Nov 17, 2026
…ly when promoted to latest (TRUNK-23152)

- The rspec gem 1.0.0 raises RSpec::Trunk::ConfigurationError without a
  collection id or with an organization token (#1337), with
  DISABLE_RSPEC_TRUNK_FLAKY_TESTS=true to opt out and a ~> 0.17.0 pin to stay.
- analytics-uploader v2.1.7 and older follow channel.json or GitHub's latest,
  which move only when 1.0.0 is promoted to latest (#1339).
- trunk CLI 0.0.14 runs analytics-cli 1.x unless pinned (trunk-io/trunk2#8640).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trunk-io Bot pushed a commit that referenced this pull request Nov 17, 2026
* docs: add 0.17.x to 1.0.0 upgrade notes (TRUNK-23152)

UPGRADING.md lists what a 0.17.x user has to change for 1.0.0: a v2 API key
or JWT, a required test collection, the removed flags and variables, the
fork lane with no v1 fallback, the summary on stdout, GUID links, the
telemetry host, and which analytics-uploader versions pick up 1.0.0.

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

* docs: name the telemetry route's new path in the upgrade notes (TRUNK-23152)

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

* docs: name the metrics telemetry route in the upgrade notes (TRUNK-23152)

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

* docs: link the API keys page and date the 0.17.x pin in the upgrade notes (TRUNK-23152)

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

* docs: the rspec gem fails the run, and 1.0.0 reaches old uploaders only when promoted to latest (TRUNK-23152)

- The rspec gem 1.0.0 raises RSpec::Trunk::ConfigurationError without a
  collection id or with an organization token (#1337), with
  DISABLE_RSPEC_TRUNK_FLAKY_TESTS=true to opt out and a ~> 0.17.0 pin to stay.
- analytics-uploader v2.1.7 and older follow channel.json or GitHub's latest,
  which move only when 1.0.0 is promoted to latest (#1339).
- trunk CLI 0.0.14 runs analytics-cli 1.x unless pinned (trunk-io/trunk2#8640).

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

* docs: the trunk CLI reads channel-1.json, not channel.json (TRUNK-23152)

trunk-io/trunk2#8640 moves the trunk CLI's flakytests to channel-1.json,
so promote-latest no longer holds it back, and channel-1.json becomes a
pointer that must not be removed.

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

* docs: keep implementation details out of the upgrade notes (TRUNK-23152)

Users only ever pass a v2 API key: the Trunk JWT is how the trunk CLI
hands a credential to analytics-cli, so the user-facing docs drop it.
Also drop the channel pointer names, the fork lane's token swap, the
telemetry route and format, and the test link paths, keeping what a
user has to do.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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