ci(repo): include package sources in integration test cache keys#9081
Conversation
🦋 Changeset detectedLatest commit: 465c227 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR expands Turbo cache inputs for build and multiple Playwright integration tasks, and adds a changeset file. The integration tasks now track package metadata, source, config, and tsconfig changes, with test/mock/snapshot paths excluded. ChangesIntegration Test Cache Inputs
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@turbo.json`:
- Around line 213-226: The integration task inputs in turbo.json are missing
package bundler config files, so changes to build scripts like rspack.config and
vite.config won’t invalidate the cache. Update the integration inputs array to
include the relevant config patterns for packages/clerk-js/rspack.config.mjs,
packages/ui/rspack.config.js, and packages/headless/vite.config.ts alongside the
existing package globs so task hashing stays correct.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Repository UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 39c86f9a-6e5b-4e51-997b-85a1aad23c7a
📒 Files selected for processing (2)
.changeset/long-sheep-build.mdturbo.json
Since dc4bbc4 removed the
dependsOnarrays from the//#test:integration:*tasks, their turbo hash has coveredintegration/**only, so a PR that only touchespackages/reuses the remote-cached pass from an earlier run instead of executing the tests. #9064 hit this: the billing leg replayed a stale pass in 78s while the change broke the pricing-table assertions, which only surfaced once #9076 touchedintegration/and forced a real run (thread).This adds the package sources to every integration task's inputs so package changes miss the cache. Globs cover new packages automatically, unlike per-task
dependsOnlists, which had already drifted out of date before December. Unit tests, mocks, snapshots, and changelogs stay excluded (mirroring thebuildtask's inputs), so test-only and release-only diffs keep their cache hits. Bundler configs are covered too: clerk-js and ui build through rspack and@clerk/headlessthrough vite, so their configs join the integration keys, andvite.config.*also joins the rootbuildinputs since headless has no package-level turbo.json override (clerk-js and ui already list their rspack configs in their own overrides) and its vite output is inlined into ui's published bundle vianoExternal.Verified with
turbo --dry=json: the billing hash moves forsrc, rspack, and vite config edits and stays put for test-file and CHANGELOG edits; the vite edit also moves@clerk/headless#build. One heads-up for the transition: every task definition changes here, so all existing cache entries (including the stale ones) are invalidated and the first runs after merge will execute all 25 legs.Summary by CodeRabbit
Tests
Chores