-
Notifications
You must be signed in to change notification settings - Fork 1.8k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Merge env and passthroughEvent from package turbo.json with root turbo.json #6798
Comments
We need to figure out a syntax for this. We've noodled on it before and the options are something like:
We discussed deeply about merge behaviors when doing Workspace Configs and ultimately decided it would be confusing to do something automatically without a way to opt out, so we tabled it. It's also possible that some v2 of Workspace Configs can allow merging with a template, but that's probably only going to solve the 80% case, and may not work for a repo like yours. |
I think a flag that decides the behaviour would be sufficient? It's either merging with root config or the existing behaviour? |
A flag is not sufficient because it cannot target the merge behavior of individual fields or even more granular, individual fields per task per workspace. We will likely be creating an unworkable situation if we add a global flag. We are open to an RFC that thinks through these things however: https://turbo.build/governance#roadmap-and-rfc-process |
Why can't you merge the Does look like you are introducing a This solves the problem needing to re-add all the entries from the root |
@tapico-weyert yeah, we had resisted adding microsyntaxes for too long, but @tknickman managed to convince us of
It would definitely need a different token to inherit from root, since this one is about turbo's built-in behavior, not the user's config. |
Yeah, that seems reasonable. I am not too fussed about naming :) I think earlier a |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
I would like to have an option were the
env
andpassthroughEnv
defined in aturbo.json
-file located in a workspace can be merged with the ones defined in the rootturbo.json
file.Currently the root
turbo.json
is over 900 lines of code. Mostly consisting of defining the environment variables, the rest is the actual actions.Describe the solution you'd like
I want to be able to define
env
andpassthroughEnv
variables on a per workspace level and combine it with a standard set of environment variables used by all projects, such asNODE_ENV
,NAMESPACE
etc.Now you need to define all the environment variables in root
turbo.json
as anything defined in a workspaceturbo.json
will override the ones in rootturbo.json
.This makes it difficult to maintain the environment variables for a mono repo that uses Turborepo with over in total 649 environment variables. All
NEXT_PUBLIC_*
used in Next.js application and feature flag environments get burdensome to main in the rootturbo.json
Describe alternatives you've considered
Allow to opt-in behaviour to merge the configuration settings instead of replacing/overriden
The text was updated successfully, but these errors were encountered: