Skip to content

feat(ci): support release candidates via changesets pre mode#3628

Merged
ericallam merged 1 commit into
mainfrom
feat/rc-release-support
May 15, 2026
Merged

feat(ci): support release candidates via changesets pre mode#3628
ericallam merged 1 commit into
mainfrom
feat/rc-release-support

Conversation

@ericallam
Copy link
Copy Markdown
Member

Summary

Enables shipping X.Y.Z-rc.N prereleases of @trigger.dev/* via changesets pre mode. RCs publish under the rc npm dist-tag, never claim latest, and don't trigger marketing-site changelog PRs. The plumbing is hyphen-in-version detection in release.yml — no separate workflow, no opt-in flag at publish time.

Validated end-to-end against a sandbox repo (real npm publishes, Docker builds, Helm chart pushes, GitHub releases) before porting back. Full RC lifecycle tested: pre enter → rc.0 → iterate to rc.1 → pre exit → stable. Plus interaction with the existing release-branch hotfix flow.

What changes

release.yml

  • New is_prerelease output (hyphen-in-version)
  • GitHub release adds --prerelease flag for RC publishes (Pre-release badge, not Latest)
  • dispatch-changelog job gated on is_prerelease != 'true' — no marketing-site PR per RC

Docker workflows

  • Removes the :v4-beta floating tag entirely from publish-webapp.yml and publish-worker-v4.yml. v4 is GA; the tag is a misnomer and is already inconsistent with the npm side (npm v4-beta dist-tag was frozen at 4.0.4 months ago while Docker :v4-beta kept bumping). Self-hosters should pin to a versioned tag going forward — the last value of :v4-beta stays frozen wherever it currently points.

CLI version-check fix (packages/cli-v3/src/utilities/initialBanner.ts)

Switches the "new version available" comparison from JavaScript localeCompare to semver.lt. The old comparison handled X.Y.Z-rc.N vs X.Y.Z incorrectly — a user on 4.5.0-rc.0 would never be prompted to upgrade once 4.5.0 stable shipped (lex order put the prerelease ahead of the bare version). Real semver gets this right.

Stable users were never affected: the check queries the @latest dist-tag, which by convention never points at a prerelease.

How an RC actually publishes after this

  1. pnpm exec changeset pre enter rc on main, push the pre.json
  2. Bot regenerates the release PR as chore: release v<X.Y.Z>-rc.0
  3. Merge → release.yml runs changeset publish which reads pre.json.tag and publishes under --tag rc. GitHub release marked Pre-release. No marketing-site dispatch.
  4. Iterate by adding changesets normally; bot bumps to rc.1, rc.2, …
  5. When ready: pnpm exec changeset pre exit, push, merge regenerated PR → stable ships under latest and the marketing-site dispatch fires.

Detect prereleases by hyphen-in-version in release.yml and:
- mark the GitHub release with --prerelease (no Latest badge)
- skip the marketing-site changelog dispatch (no PR per RC)
- keep the dispatch firing for stable releases

Also fix the CLI version-check (initialBanner.ts) to use semver.lt instead of locale string compare so users on an RC are correctly told to upgrade once the matching stable ships.

Removes the stale :v4-beta Docker floating tag from the webapp and worker-v4 publish workflows. v4 is GA; the tag is misleading and inconsistent with the npm side (where v4-beta is already frozen at 4.0.4). Self-hosters should pin to a versioned tag.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: 424de1a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 19887a89-668b-45dd-b58c-fc3bffa2b51b

📥 Commits

Reviewing files that changed from the base of the PR and between 454f0c9 and 424de1a.

📒 Files selected for processing (4)
  • .github/workflows/publish-webapp.yml
  • .github/workflows/publish-worker-v4.yml
  • .github/workflows/release.yml
  • packages/cli-v3/src/utilities/initialBanner.ts
💤 Files with no reviewable changes (2)
  • .github/workflows/publish-worker-v4.yml
  • .github/workflows/publish-webapp.yml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

**/*.{ts,tsx}: Import from @trigger.dev/core subpaths only, never from the root. Subpath imports must be used to maintain proper module boundaries.
When writing Trigger.dev tasks, always import from @trigger.dev/sdk. Never use @trigger.dev/sdk/v3 or deprecated client.defineJob.
Prisma is version 6.14.0. Use the Prisma client from internal-packages/database for all database operations.
For ClickHouse client, schema migrations, and analytics queries, use internal-packages/clickhouse.

Files:

  • packages/cli-v3/src/utilities/initialBanner.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Add crumbs as you write code — not just when debugging. Mark lines with // @Crumbs or wrap blocks in `// `#region` `@crumbs. They stay on the branch throughout development and are stripped by agentcrumbs strip before merge.

Files:

  • packages/cli-v3/src/utilities/initialBanner.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • packages/cli-v3/src/utilities/initialBanner.ts
**/*.{ts,tsx,js,jsx,json,md,css,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Code formatting is enforced using Prettier. Run pnpm run format before committing

Files:

  • packages/cli-v3/src/utilities/initialBanner.ts
packages/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

When modifying any public package (packages/* or integrations/*), add a changeset using pnpm run changeset:add. Default to patch for bug fixes and minor changes; confirm with maintainers before selecting minor; never select major without explicit approval.

Files:

  • packages/cli-v3/src/utilities/initialBanner.ts
🧠 Learnings (2)
📚 Learning: 2026-03-22T13:26:12.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/code/TextEditor.tsx:81-86
Timestamp: 2026-03-22T13:26:12.060Z
Learning: In the triggerdotdev/trigger.dev codebase, do not flag `navigator.clipboard.writeText(...)` calls for `missing-await`/`unhandled-promise` issues. These clipboard writes are intentionally invoked without `await` and without `catch` handlers across the project; keep that behavior consistent when reviewing TypeScript/TSX files (e.g., usages like in `apps/webapp/app/components/code/TextEditor.tsx`).

Applied to files:

  • packages/cli-v3/src/utilities/initialBanner.ts
📚 Learning: 2026-03-22T19:24:14.403Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: apps/webapp/app/v3/services/alerts/deliverErrorGroupAlert.server.ts:200-204
Timestamp: 2026-03-22T19:24:14.403Z
Learning: In the triggerdotdev/trigger.dev codebase, webhook URLs are not expected to contain embedded credentials/secrets (e.g., fields like `ProjectAlertWebhookProperties` should only hold credential-free webhook endpoints). During code review, if you see logging or inclusion of raw webhook URLs in error messages, do not automatically treat it as a credential-leak/secrets-in-logs issue by default—first verify the URL does not contain embedded credentials (for example, no username/password in the URL, no obvious secret/token query params or fragments). If the URL is credential-free per this project’s conventions, allow the logging.

Applied to files:

  • packages/cli-v3/src/utilities/initialBanner.ts
🔇 Additional comments (2)
.github/workflows/release.yml (1)

67-67: LGTM!

Also applies to: 128-133, 143-143, 147-155, 255-255

packages/cli-v3/src/utilities/initialBanner.ts (1)

3-3: LGTM!

Also applies to: 109-113, 118-118


Walkthrough

This PR introduces proper semantic versioning handling across build and CLI infrastructure. It removes redundant v4-beta tag generation from two Docker image publishing workflows, adds prerelease detection to the release workflow to conditionally flag GitHub releases and skip changelog dispatch for prerelease versions, and upgrades the CLI's update-check logic to use semantic version comparison instead of string comparison, improving handling of prerelease versions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective: enabling release candidate support through changesets pre mode in CI workflows.
Description check ✅ Passed The description includes a comprehensive Summary section with technical details, a detailed 'What changes' section covering all modified files, and a clear 'How an RC actually publishes' workflow explanation, though it omits the standard template sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rc-release-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericallam ericallam marked this pull request as ready for review May 15, 2026 15:21
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@ericallam ericallam merged commit dfa3ede into main May 15, 2026
47 checks passed
@ericallam ericallam deleted the feat/rc-release-support branch May 15, 2026 15:43
ericallam added a commit that referenced this pull request May 15, 2026
## Summary

Adds `.changeset/pre.json` to put the repo into changesets pre mode with
dist-tag `rc`. After this merges, the changesets bot regenerates the
existing release PR as `chore: release v4.5.0-rc.0`. Merging that PR
publishes the first release candidate of 4.5.0 to npm under `@rc`.

The pre-mode plumbing landed in #3628. The release content (chat.agent +
sessions + ai prompts + dashboard server-changes) landed in #3629.

## What ships when the bot PR merges

Under dist-tag `rc`:
-
`@trigger.dev/{sdk,core,build,react-hooks,redis-worker,plugins,python,rsc,schema-to-json}@4.5.0-rc.0`
- `trigger.dev@4.5.0-rc.0`

Plus:
- Docker image `ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.0`
(immutable tag only — `:v4-beta` is not touched)
- Helm chart `oci://ghcr.io/triggerdotdev/charts/trigger.dev:4.5.0-rc.0`
- GitHub release `v4.5.0-rc.0` marked as Pre-release (no Latest badge)

What does NOT happen:
- npm `latest` stays at 4.4.6
- No marketing-site changelog PR (gated on `is_prerelease != 'true'`)
- Docker `:latest` not touched (we never push it anyway in this repo)

## Iteration

For subsequent rc.N: add a regular changeset to main, bot regenerates
the release PR as `v4.5.0-rc.N`. Merge to ship.

## Exiting pre mode

When ready to ship stable: `pnpm exec changeset pre exit`, push, merge
regenerated PR. That publishes `4.5.0` under `latest` and fires the
marketing-site dispatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants