mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:51:50 +00:00
`bazel build` on percy mocha targets (such as //client/web/src/integration:integration-tests) no longer result in actually running the test! Originally, we used `js_run_binary` with `build_test` as `js_test` doesnt support stamping, and we need to be able to read volatile variables for percy. Then, we worked around https://github.com/bazelbuild/bazel/issues/16231 in https://github.com/sourcegraph/sourcegraph/pull/58505 by not explicitly depending on the stamp variables, but exploiting a bit of a hack to read them anyways (will this work with RBE?) Now, given that we're not explicitly stamping and still using the hack, we can use `js_test` instead, to avoid having the tests run as part of `bazel build`, instead only when we run `bazel test` (as is good 😌) It is apparently possible to work around https://github.com/bazelbuild/bazel/issues/16231 when using disk/remote caches, but only for local builds (so no remote builds) according to [the following comment](https://github.com/bazelbuild/bazel/issues/16231#issuecomment-1772835555), but we would still need: 1. `js_test` to support stamping and 2. this workaround to also apply to remote execution (as we're considering that once its supported in Aspect Workflows) todo: update doc/dev/background-information/bazel/web_overview.md in new docs repo ## Test plan CI 🎉 |
||
|---|---|---|
| .. | ||
| build_code_intel_extensions.bzl | ||
| BUILD.bazel | ||
| buildCodeIntelExtensions.js | ||
| customMochaSpecReporter.js | ||
| extractGraphQlOperationCodegenPlugin.js | ||
| generate_graphql_operations.bzl | ||
| generate_schema.bzl | ||
| generateCssModulesTypes.ts | ||
| generateGraphQlOperations.ts | ||
| generateSchema.ts | ||
| runMochaTestsWithPercy.js | ||
| suppressPollyErrors.js | ||
| tools.bzl | ||