Skip to content

Only build stuff that requires Vercel env to build on Vercel #2524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

cprussin
Copy link
Collaborator

@cprussin cprussin commented Mar 26, 2025

Summary

Do not build packages that rely on the Vercel environment using turbo build, instead move them to build with turbo build:vercel

Rationale

For many of our UI applications, in order to build the package, a number of environment variables must be present.

The values for these env vars are stored in Vercel, however not everyone who contributes to this repository will have access to Vercel.

This PR modifies the turbo config to not build those packages on turbo build. This is generally probably the right thing since we don't want those packages to build in Github Actions either, given the environment is not going to be present in GHA and so the builds would likely fail there too.

After this PR, to build any packages that rely on Vercel environments, you will run turbo build:vercel. Running turbo build will build everything else and will exclude anything that depends on the Vercel env.

How has this been tested?

CI will be the test

@cprussin cprussin requested a review from a team as a code owner March 26, 2025 16:26
Copy link

vercel bot commented Mar 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 4:49pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 4:49pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 4:49pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 4:49pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 4:49pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 4:49pm

For many of our UI applications, in order to build the package, a number of
environment variables must be present.

The values for these env vars are stored in Vercel, however not everyone who
contributes to this repository will have access to Vercel.

This PR modifies the turbo config to not build those packages on `turbo build`.
This is generally probably the right thing since we don't want those packages to
build in Github Actions either, given the environment is not going to be present
in GHA and so the builds would likely fail there too.

After this PR, to build any packages that rely on Vercel environments, you will
run `turbo build:vercel`.  Running `turbo build` will build everything else and
will exclude anything that depends on the Vercel env.
Copy link
Contributor

@guibescos guibescos left a comment

Choose a reason for hiding this comment

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

lgtm

@cprussin cprussin merged commit 3b92ed5 into main Mar 26, 2025
9 checks passed
@cprussin cprussin deleted the cprussin/dont-build-vercel-stuff branch March 26, 2025 19:14
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