<#18775 Union-izing test's `extra_env_vars` and `r...
# github-notifications
c
#18775 Union-izing test's `extra_env_vars` and `runtime_package_dependencies` New discussion created by xlevus Background I have a suite of tests that do integrations against an external environment. Currently our CICD will deploy the packaged dependencies to the system and then run the tests on the local machine. Which means our 'test' step is a bit more involved than just
./pants test ::
. One suggested solution to this was to create a codegen target that deploys the resources, but this would then cause things to be deployed unnecessarily every time
export-codegen
is run. It also doesn't solve how to inject the location of the deployed resources into the tests. idea Currently you can define [test].extra_env_vars to inject extra stuff into the env, and runtime_package_dependencies to add packageable targets to the test process digest. But from a quick skim of the code, all of this is replicated in each backends subprocess call. e.g.: https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/goals/pytest_runner.py#L245 https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/go/goals/test.py#L595 It would be ideal if
extra_env_vars
and
runtime_package_dependencies
were somehow Unionized. Allowing 3rd party plugins to provide ways to add additional data into test runs. pantsbuild/pants