fix: fix vercel's use of corepack during the ignoreCommand #2497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
It seems like vercel does not correctly use corepack during the
ignoreCommand
, which was the cause of the flakiness with ignoring builds for so long.We thought we had fixed it in #2468 , but it turns out this doesn't actually work -- it seems like Vercel does not properly apply env vars from the
vercel.json
config file -- so in effect that just disabled corepack entirely. It wasn't a huge issue as Vercel was choosing a close enough version of pnpm by default, but it would be better to actually use corepack and ensure Vercel is using the exact same version of pnpm that we are locked to in the monorepo.This PR, along with readding the
ENABLE_EXPERIMENTAL_COREPACK
env var via the Vercel dashboard, should both re-enable corepack on builds AND fix theignoreCommand
to properly use corepack.Rationale
Using corepack correctly ensures that Vercel builds are using the same version of pnpm that we're locked to in the monorepo, which prevents subtle issues caused by differing tooling versions.
How has this been tested?
I can't test this until it builds on Vercel, so I'll look at the logs to see if it worked!