You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, to pass env vars from host to tests, we set extra_env_vars, either on the test or in pants.toml. If we have a monorepo with multiple projects, to have the env vars applied to all tests for a project, we set it in pants.toml. But then the extra_env_vars field becomes a giant set of all env vars for all projects.
Describe the solution you'd like
It would be good if there were a way to set the env vars to pass to tests from the host at a per project level. e.g. if the project structure is like this:
If we could set something in projectA/Build or similar that would ensure that a set of env vars are passed to the environment when projectA tests are run, and a different set of env vars can be set in projectB/Build that would apply when projectB tests are run.
Describe alternatives you've considered
Josh suggested on the slack channel that something like this might be doable if we set:
python_tests.__defaults__.extra_env_vars
in the relevant Build file. I'll test whether this works, but it would be preferable if there was a more formal way to specify something like this.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, to pass env vars from host to tests, we set
extra_env_vars
, either on the test or in pants.toml. If we have a monorepo with multiple projects, to have the env vars applied to all tests for a project, we set it in pants.toml. But then the extra_env_vars field becomes a giant set of all env vars for all projects.Describe the solution you'd like
It would be good if there were a way to set the env vars to pass to tests from the host at a per project level. e.g. if the project structure is like this:
If we could set something in projectA/Build or similar that would ensure that a set of env vars are passed to the environment when projectA tests are run, and a different set of env vars can be set in projectB/Build that would apply when projectB tests are run.
Describe alternatives you've considered
Josh suggested on the slack channel that something like this might be doable if we set:
in the relevant Build file. I'll test whether this works, but it would be preferable if there was a more formal way to specify something like this.
The text was updated successfully, but these errors were encountered: