sourcegraph/dev/authtest
Noah S-C 98e0f75d1e
bazel: use transitions to apply cross-compile platform automatically to oci_image (#60569)
Removes the need to pass `--config=docker-darwin` through the following mechanisms:

1. `--enable_platform_specific_config` to enable certain flags on macos only e.g. `--extra_toolchains @zig_sdk//toolchain:linux_amd64_gnu.2.34` and `--sandbox_add_mount_pair=/tmp` (see [.bazelrc change](https://github.com/sourcegraph/sourcegraph/pull/60569/files?file-filters%5B%5D=dotfile&show-viewed-files=true))
2. Apply a transition (using https://github.com/fmeum/with_cfg.bzl, please view [the following great video on it](https://www.youtube.com/watch?v=U5bdQRQY-io)) on `oci_image` targets when on the `@platforms//os:macos` platform to transition to the `@zig_sdk//platform:linux_amd64` platform. 
	- This will start at `oci_image` targets and propagate down to e.g. `go_{binary,library}` etc targets with the "transitioned" platform configuration, resulting in them being built with the transitioned-to platform
3. Remove `darwin_docker_e2e_go` config_setting and `darwin-docker` bool_flag.
	- These aren't necessary anymore, as the places where these were used were not in the transitive closure rooted at an `oci_image` target, meaning they wouldn't be transitioned.

To review, view [the following (filtered) files](https://github.com/sourcegraph/sourcegraph/pull/60569/files?file-filters%5B%5D=.bzl&file-filters%5B%5D=.sh&file-filters%5B%5D=.yaml&file-filters%5B%5D=No+extension&file-filters%5B%5D=dotfile&show-viewed-files=true)  along with [the root BUILD.bazel](https://github.com/sourcegraph/sourcegraph/pull/60569/files#diff-7fc57714ef13c3325ce2a1130202edced92fcccc0c6db34a72f7b57f60d552a3). All the other files are just changing the `load` statements from `@rules_oci` to `//dev:oci_defs.bzl`

## Test plan

CI, checked image locally and `sg test bazel-backend-integration` & `sg test bazel-e2e`
2024-02-20 13:57:56 +00:00
..
BUILD.bazel bazel: use transitions to apply cross-compile platform automatically to oci_image (#60569) 2024-02-20 13:57:56 +00:00
code_intel_test.go executors: refactor queue router to explicit test endpoint (#49721) 2023-03-24 18:11:13 +00:00
CODENOTIFY authtest: add tests for site admin endpoints (#20266) 2021-04-26 13:14:57 +00:00
main_test.go all: use any instead of interface{} (#35102) 2022-05-09 10:59:39 +02:00
organization_test.go Remove dead code from org invites (#57279) 2023-10-04 15:50:44 +02:00
README.md authtest: wait longer for site config to be updated (#28119) 2021-11-29 22:26:45 +08:00
repository_test.go graphqlbackend: support async deletion of external service (#35293) 2022-05-12 12:54:12 +04:00
site_admin_test.go Implement expiry for access tokens (#59565) 2024-01-18 18:54:07 -05:00

While this test suite focuses on authentication and authorization related tests, you may still refer to dev/gqltest's README for background and how to run it both locally and in CI.