mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:11:49 +00:00
Another step towards https://github.com/sourcegraph/sourcegraph/issues/59155, previously `bazel test //...` would error at analysis time on `//client/web/src/end-to-end:e2e` due to it attempting to perform variable substitution for env vars e.g. `"HEADLESS": "$(E2E_HEADLESS)"`, for values not defined via `--define` (we only set these explicitly in .aspect/bazelrc/ci.sourcegraph.bazelrc and some `sg` targets). By leveraging https://bazel.build/rules/lib/builtins/actions#run.use_default_shell_env, we can allow the test to read values from `--action_env` while _also_ having explicit values set via `env` macro parameter. Previously, setting `env` macro parameter would completely shadow any `--action_env` values. Unfortunately, we cant use `--test_env` for this, as `js_run_binary` is an action not a test (or something like that?). We also cant do env renaming anymore, meaning we have to drop the `E2E_` prefix for some env vars. At least one script needed some reworking to accommodate that `e2e_test.sh`  ## Test plan 👁️ CI once again 👁️ |
||
|---|---|---|
| .. | ||
| code-intel | ||
| tools | ||
| backend_integration_test_p4.sh | ||
| backend_integration_test.sh | ||
| BUILD.bazel | ||
| codeintel_integration_test.sh | ||
| defs.bzl | ||
| e2e_test.sh | ||