Skip to content

Turborepo misses cache to restore Next.js applications with Skew Protection enabled on Vercel #10478

@ben-horner-crimson

Description

@ben-horner-crimson

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/vercel/turborepo/tree/main/examples/basic

Which canary version will you have in your reproduction?

turbo 2.5.4-canary.0

Environment information

CLI:
   Version: 2.5.4-canary.0
   Path to executable: **projects/crimson/cga-turbo-test/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: npm

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 3342
   Available CPU cores: 8

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): vscode
   Terminal program version (TERM_PROGRAM_VERSION): 1.100.1
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

Following the documentation here and here and following the video here using the example repo here linked to a project in vercel with these settings:

Image

I expect to do the following:

  • run turbo login
  • run turbo link
  • navigate to my package sub dir and run vercel login and vercel link
  • create a project linked to the cloned repo in github
  • run turbo build locally
  • see my locally built cached artifacts in remote cache
  • trigger a CI build in vercel, making no changes to build inputs or env
  • see a cache hit in the CI build
  • make a local change, push without build
  • wait for vercel CI build to complete
  • see CI built artifacts in remote cache
  • run turbo build locally and see a cache hit from the remote cache

Actual behavior

I actually see the following:

  • run turbo login
  • run turbo link
  • navigate to my package sub dir and run vercel login and vercel link
  • create a project linked to the cloned repo in github
  • run turbo build locally
  • see my locally built cached artifacts in remote cache but classified as no-project
  • trigger a CI build in vercel, making no changes to build inputs or env
  • see a cache miss in the CI build
  • make a local change, push without build
  • wait for vercel CI build to complete
  • see CI built artifacts in remote cache linked to project name
  • run turbo build locally and see a cache miss from the remote cache

To Reproduce

  • clone this repo
  • create a project vercel, linked to the above repo with these settings:
Image - `turbo login` - `turbo link` - `cd apps/docs` - `vercel login` - `vercel link` - make a change and commit - `turbo build` - push your change to trigger a vercel CI build - check CI pipeline to verify miss or hit - make change locally - commit and push to trigger new build and cache remotely - `turbo build` locally - check locally for cache hit from remote cache

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: vercelThings related specifically to Vercel integrationkind: bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions