Skip to content

Cache Turborepo packages across Vercel builds#12077

Open
sebastianekstrom wants to merge 1 commit into
mainfrom
chore/turbo-cache-fix
Open

Cache Turborepo packages across Vercel builds#12077
sebastianekstrom wants to merge 1 commit into
mainfrom
chore/turbo-cache-fix

Conversation

@sebastianekstrom

@sebastianekstrom sebastianekstrom commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This PR stops hashing Vercel's per build env (which changes every commit) into the package cache key, so packages now reuse their cache instead of rebuilding every deploy.

Summary by CodeRabbit

  • Chores
    • Updated build pipeline configuration to optimize dependency handling and environment variable management.

@sebastianekstrom sebastianekstrom requested a review from a team as a code owner June 1, 2026 15:31
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
polar Ready Ready Preview, Comment Jun 1, 2026 3:31pm
polar-sandbox Ready Ready Preview, Comment Jun 1, 2026 3:31pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e4e3a21a-82fc-439c-8b32-8c65d537435a

📥 Commits

Reviewing files that changed from the base of the PR and between acadf00 and 5845700.

📒 Files selected for processing (2)
  • clients/apps/web/turbo.json
  • clients/turbo.json
💤 Files with no reviewable changes (1)
  • clients/turbo.json

📝 Walkthrough

Walkthrough

This pull request adds a TurboRepo configuration file for the web app and restructures the global configuration by removing Vercel environment variable tracking and local dependency file monitoring from the root clients configuration.

Changes

TurboRepo Configuration Restructuring

Layer / File(s) Summary
Web app TurboRepo build configuration
clients/apps/web/turbo.json
New configuration file that extends the root TurboRepo setup and defines the build task pipeline with schema version, task dependencies, output globs (excluding .next/cache), input globs for environment files, and Vercel PR/commit metadata environment variables.
Global TurboRepo environment variable cleanup
clients/turbo.json
Removes globalDependencies entry for .env.*local files and removes three Vercel-related variables (VERCEL_GIT_PULL_REQUEST_ID, VERCEL_URL, VERCEL_GIT_COMMIT_SHA) from the globalEnv array, consolidating these into app-specific configurations.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. It lacks the required template structure with Summary, What, Why, How sections and a checklist, containing only a brief one-sentence explanation. Expand the description to follow the template with all required sections: Summary (including Related Issue), What, Why, How, and a completion checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the PR: preventing cache invalidation by stopping Vercel per-build env variables from being hashed into the cache key.
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.

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


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

@pieterbeulque pieterbeulque 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.

🫡

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