Skip to content

ci(repo): include package sources in integration test cache keys#9081

Merged
jacekradko merged 2 commits into
mainfrom
jacek/fix-integration-cache-inputs
Jul 3, 2026
Merged

ci(repo): include package sources in integration test cache keys#9081
jacekradko merged 2 commits into
mainfrom
jacek/fix-integration-cache-inputs

Conversation

@jacekradko

@jacekradko jacekradko commented Jul 3, 2026

Copy link
Copy Markdown
Member

Since dc4bbc4 removed the dependsOn arrays from the //#test:integration:* tasks, their turbo hash has covered integration/** only, so a PR that only touches packages/ 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 touched integration/ 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 dependsOn lists, which had already drifted out of date before December. Unit tests, mocks, snapshots, and changelogs stay excluded (mirroring the build task'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/headless through vite, so their configs join the integration keys, and vite.config.* also joins the root build inputs 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 via noExternal.

Verified with turbo --dry=json: the billing hash moves for src, 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

    • Improved integration test caching by expanding what changes are tracked (including key per-package and tooling configuration files) and excluding test/mocks/snapshot patterns, leading to more accurate and fewer unnecessary cache hits.
  • Chores

    • Added a changeset entry for this release.

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 465c227

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When 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

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 3, 2026 2:14am
swingset Ready Ready Preview, Comment Jul 3, 2026 2:14am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This 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.

Changes

Integration Test Cache Inputs

Layer / File(s) Summary
Build task input update
turbo.json, .changeset/long-sheep-build.md
The build task includes vite.config.* in its cache inputs, and a new changeset file is added.
Integration task input expansion
turbo.json
The //#test:integration:ap-flows through //#test:integration:nextjs:canary tasks expand cache inputs to cover package metadata, source, tsconfig, and tooling config globs, with exclusions for test, mock, and snapshot paths.
Remaining integration task input expansion
turbo.json
The //#test:integration:quickstart, //#test:integration:astro, //#test:integration:localhost, and //#test:integration:electron tasks receive the same standardized cache input expansion and exclusions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hopped through Turbo’s leafy maze,
Sniffing globs and configs in a tidy blaze.
Build and tests now know what changed,
With cache winds carefully arranged.
Hop hop—fresh inputs, nicely laid! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: expanding integration test cache keys to include package sources.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9081

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9081

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9081

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9081

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9081

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9081

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9081

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9081

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9081

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9081

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9081

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9081

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9081

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9081

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9081

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9081

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9081

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9081

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9081

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9081

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9081

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9081

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9081

commit: 465c227

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8089baa and 427eb73.

📒 Files selected for processing (2)
  • .changeset/long-sheep-build.md
  • turbo.json

Comment thread turbo.json
@jacekradko jacekradko merged commit 60e55e2 into main Jul 3, 2026
53 checks passed
@jacekradko jacekradko deleted the jacek/fix-integration-cache-inputs branch July 3, 2026 12:40
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