Allow to run e2e tests locally (#55998)

Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch>
Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
This commit is contained in:
Jean-Hadrien Chabran 2023-08-29 11:08:47 -05:00 committed by GitHub
parent 6ca6befac2
commit 54005e461f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 415 additions and 232 deletions

View File

@ -24,7 +24,6 @@ build:incompat-zig-linux-amd64 --incompatible_enable_cc_toolchain_resolution
build:incompat-zig-linux-amd64 --platforms @zig_sdk//platform:linux_amd64
build:incompat-zig-linux-amd64 --extra_toolchains @zig_sdk//toolchain:linux_amd64_musl
# Except in CI run E2E tests in headless mode
try-import %workspace%/user.bazelrc
@ -35,6 +34,8 @@ try-import %workspace%/.bazelrc-nix
build:darwin-docker --incompatible_enable_cc_toolchain_resolution
build:darwin-docker --platforms @zig_sdk//platform:linux_amd64
build:darwin-docker --extra_toolchains @zig_sdk//toolchain:linux_amd64_gnu.2.31
# build setting to tell some go test runner to force targeting to macos even if we're building containers with the linux/amd64 toolchain.
build:darwin-docker --//:darwin_docker=True
# Helper to run only fast go unit tests
test:go-short --test_tag_filters=go --test_timeout_filters=short

View File

@ -286,6 +286,24 @@ go_proto_compiler(
],
)
# darwin_docker config
#
# To be able to run e2e tests locally, we need to simultaneously be able to build linux/amd64 container images
# and to build go test runners targeting the local machine architecture and OS. Unless you're working on a linux machine
# these two won't be the same. So we use this flag to indicate that this particular runner should target darwin/arm64 if we see
# that we have this build setting enabled.
#
# This is part of the `--config darwin-docker` configuration alias, that you can find in .bazelrc.
bool_flag(
name = "darwin_docker",
build_setting_default = False,
)
config_setting(
name = "darwin_docker_e2e_go",
flag_values = {":darwin_docker": "true"},
)
# nogo config
#
# For nogo to be able to run a linter, it needs to have `var Analyzer analysis.Analyzer` defined in the main package.

View File

@ -60,6 +60,10 @@ mocha_test(
name = "e2e",
timeout = "moderate",
env = {"INCLUDE_ADMIN_ONBOARDING": "false"},
node_toolchain = select({
"//:darwin_docker_e2e_go": "@nodejs_darwin_arm64//:node_toolchain",
"//conditions:default": None,
}),
tags = [
"manual",
"requires-network",

View File

@ -10,6 +10,14 @@ go_test(
"repository_test.go",
"site_admin_test.go",
],
goarch = select({
"//:darwin_docker_e2e_go": "arm64",
"//conditions:default": None,
}), # Force targeting darwin/arm64 if we're building for locally running e2e tests.
goos = select({
"//:darwin_docker_e2e_go": "darwin",
"//conditions:default": None,
}), # Force targeting darwin/arm64 if we're building for locally running e2e tests.
visibility = ["//testing:__subpackages__"],
deps = [
"//internal/auth",

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "clear_lib",
@ -19,3 +19,10 @@ go_binary(
embed = [":clear_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "clear-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":clear",
visibility = ["//testing:__pkg__"],
)

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "clone-and-index_lib",
@ -19,3 +19,10 @@ go_binary(
embed = [":clone-and-index_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "clone-and-index-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":clone-and-index",
visibility = ["//testing:__pkg__"],
)

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "download_lib",
@ -20,3 +20,10 @@ go_binary(
embed = [":download_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "download-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":download",
visibility = ["//testing:__pkg__"],
)

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "query_lib",
@ -26,3 +26,10 @@ go_binary(
embed = [":query_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "query-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":query",
visibility = ["//testing:__pkg__"],
)

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "upload-gcs_lib",
@ -19,3 +19,10 @@ go_binary(
embed = [":upload-gcs_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "upload-gcs-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":upload-gcs",
visibility = ["//testing:__pkg__"],
)

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "upload_lib",
@ -20,3 +20,10 @@ go_binary(
embed = [":upload_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "upload-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":upload",
visibility = ["//testing:__pkg__"],
)

View File

@ -18,6 +18,14 @@ go_test(
"site_config_test.go",
"sub_repo_permissions_test.go",
],
goarch = select({
"//:darwin_docker_e2e_go": "arm64",
"//conditions:default": None,
}), # Force targeting darwin/arm64 if we're building for locally running e2e tests.
goos = select({
"//:darwin_docker_e2e_go": "darwin",
"//conditions:default": None,
}), # Force targeting darwin/arm64 if we're building for locally running e2e tests.
visibility = [
"//testing:__pkg__",
"//testing:__subpackages__",

View File

@ -1,5 +1,5 @@
{
"checksum": "debbef2872be12edab17fa92b31cbf88f6b0b2d54049a10dcdab230ed507a2ac",
"checksum": "edfef804723dc794cca785f7de2dc8def338c0fa9829ef5b2afab75ca692c755",
"crates": {
"addr2line 0.20.0": {
"name": "addr2line",
@ -818,7 +818,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -1213,13 +1213,13 @@
},
"license": "MIT OR Apache-2.0"
},
"cc 1.0.82": {
"cc 1.0.83": {
"name": "cc",
"version": "1.0.82",
"version": "1.0.83",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/cc/1.0.82/download",
"sha256": "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01"
"url": "https://crates.io/api/v1/crates/cc/1.0.83/download",
"sha256": "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
}
},
"targets": [
@ -1250,7 +1250,7 @@
}
},
"edition": "2018",
"version": "1.0.82"
"version": "1.0.83"
},
"license": "MIT OR Apache-2.0"
},
@ -1475,13 +1475,13 @@
},
"license": "MIT OR Apache-2.0"
},
"clap 4.3.21": {
"clap 4.3.23": {
"name": "clap",
"version": "4.3.21",
"version": "4.3.23",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/clap/4.3.21/download",
"sha256": "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd"
"url": "https://crates.io/api/v1/crates/clap/4.3.23/download",
"sha256": "03aef18ddf7d879c15ce20f04826ef8418101c7e528014c3eeea13321047dca3"
}
},
"targets": [
@ -1516,7 +1516,7 @@
"deps": {
"common": [
{
"id": "clap_builder 4.3.21",
"id": "clap_builder 4.3.23",
"target": "clap_builder"
},
{
@ -1536,17 +1536,17 @@
],
"selects": {}
},
"version": "4.3.21"
"version": "4.3.23"
},
"license": "MIT OR Apache-2.0"
},
"clap_builder 4.3.21": {
"clap_builder 4.3.23": {
"name": "clap_builder",
"version": "4.3.21",
"version": "4.3.23",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/clap_builder/4.3.21/download",
"sha256": "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa"
"url": "https://crates.io/api/v1/crates/clap_builder/4.3.23/download",
"sha256": "f8ce6fffb678c9b80a70b6b6de0aad31df727623a70fd9a842c30cd573e2fa98"
}
},
"targets": [
@ -1598,7 +1598,7 @@
"selects": {}
},
"edition": "2021",
"version": "4.3.21"
"version": "4.3.23"
},
"license": "MIT OR Apache-2.0"
},
@ -1913,7 +1913,7 @@
"target": "percent_encoding"
},
{
"id": "time 0.3.25",
"id": "time 0.3.26",
"target": "time"
}
],
@ -2423,13 +2423,13 @@
},
"license": "MIT OR Apache-2.0"
},
"deranged 0.3.7": {
"deranged 0.3.8": {
"name": "deranged",
"version": "0.3.7",
"version": "0.3.8",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/deranged/0.3.7/download",
"sha256": "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929"
"url": "https://crates.io/api/v1/crates/deranged/0.3.8/download",
"sha256": "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
}
},
"targets": [
@ -2456,7 +2456,7 @@
"selects": {}
},
"edition": "2021",
"version": "0.3.7"
"version": "0.3.8"
},
"license": "MIT OR Apache-2.0"
},
@ -3034,7 +3034,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -3895,7 +3895,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -4031,13 +4031,13 @@
},
"license": "MIT OR Apache-2.0"
},
"h2 0.3.20": {
"h2 0.3.21": {
"name": "h2",
"version": "0.3.20",
"version": "0.3.21",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/h2/0.3.20/download",
"sha256": "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049"
"url": "https://crates.io/api/v1/crates/h2/0.3.21/download",
"sha256": "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
}
},
"targets": [
@ -4106,7 +4106,7 @@
"selects": {}
},
"edition": "2018",
"version": "0.3.20"
"version": "0.3.21"
},
"license": "MIT"
},
@ -4558,7 +4558,7 @@
"target": "futures_util"
},
{
"id": "h2 0.3.20",
"id": "h2 0.3.21",
"target": "h2"
},
{
@ -6450,7 +6450,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
},
{
@ -6673,7 +6673,7 @@
],
"cfg(windows)": [
{
"id": "windows-targets 0.48.2",
"id": "windows-targets 0.48.5",
"target": "windows_targets"
}
]
@ -7036,7 +7036,7 @@
"target": "serde"
},
{
"id": "time 0.3.25",
"id": "time 0.3.26",
"target": "time"
}
],
@ -8631,11 +8631,11 @@
"target": "state"
},
{
"id": "tempfile 3.7.1",
"id": "tempfile 3.8.0",
"target": "tempfile"
},
{
"id": "time 0.3.25",
"id": "time 0.3.26",
"target": "time"
},
{
@ -8862,7 +8862,7 @@
"target": "state"
},
{
"id": "time 0.3.25",
"id": "time 0.3.26",
"target": "time"
},
{
@ -9548,7 +9548,7 @@
"target": "bitvec"
},
{
"id": "clap 4.3.21",
"id": "clap 4.3.23",
"target": "clap"
},
{
@ -9740,11 +9740,11 @@
"target": "tree_sitter_ruby"
},
{
"id": "tree-sitter-rust 0.20.3",
"id": "tree-sitter-rust 0.20.4",
"target": "tree_sitter_rust"
},
{
"id": "tree-sitter-scala 0.20.1",
"id": "tree-sitter-scala 0.20.2",
"target": "tree_sitter_scala"
},
{
@ -10985,7 +10985,7 @@
"target": "base64"
},
{
"id": "clap 4.3.21",
"id": "clap 4.3.23",
"target": "clap"
},
{
@ -11079,13 +11079,13 @@
},
"license": "MIT"
},
"tempfile 3.7.1": {
"tempfile 3.8.0": {
"name": "tempfile",
"version": "3.7.1",
"version": "3.8.0",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/tempfile/3.7.1/download",
"sha256": "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651"
"url": "https://crates.io/api/v1/crates/tempfile/3.8.0/download",
"sha256": "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
}
},
"targets": [
@ -11137,7 +11137,7 @@
}
},
"edition": "2018",
"version": "3.7.1"
"version": "3.8.0"
},
"license": "MIT OR Apache-2.0"
},
@ -11323,13 +11323,13 @@
},
"license": "MIT OR Apache-2.0"
},
"time 0.3.25": {
"time 0.3.26": {
"name": "time",
"version": "0.3.25",
"version": "0.3.26",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/time/0.3.25/download",
"sha256": "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea"
"url": "https://crates.io/api/v1/crates/time/0.3.26/download",
"sha256": "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07"
}
},
"targets": [
@ -11362,7 +11362,7 @@
"deps": {
"common": [
{
"id": "deranged 0.3.7",
"id": "deranged 0.3.8",
"target": "deranged"
},
{
@ -11380,13 +11380,13 @@
"proc_macro_deps": {
"common": [
{
"id": "time-macros 0.2.11",
"id": "time-macros 0.2.12",
"target": "time_macros"
}
],
"selects": {}
},
"version": "0.3.25"
"version": "0.3.26"
},
"license": "MIT OR Apache-2.0"
},
@ -11420,13 +11420,13 @@
},
"license": "MIT OR Apache-2.0"
},
"time-macros 0.2.11": {
"time-macros 0.2.12": {
"name": "time-macros",
"version": "0.2.11",
"version": "0.2.12",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/time-macros/0.2.11/download",
"sha256": "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd"
"url": "https://crates.io/api/v1/crates/time-macros/0.2.12/download",
"sha256": "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451"
}
},
"targets": [
@ -11462,7 +11462,7 @@
"selects": {}
},
"edition": "2021",
"version": "0.2.11"
"version": "0.2.12"
},
"license": "MIT OR Apache-2.0"
},
@ -11956,7 +11956,7 @@
"target": "toml_datetime"
},
{
"id": "winnow 0.5.12",
"id": "winnow 0.5.14",
"target": "winnow"
}
],
@ -12338,7 +12338,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12404,7 +12404,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12470,7 +12470,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12536,7 +12536,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12602,7 +12602,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12715,7 +12715,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12781,7 +12781,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12849,7 +12849,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12917,7 +12917,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -12985,7 +12985,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13053,7 +13053,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13121,7 +13121,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13187,7 +13187,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13253,7 +13253,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13262,13 +13262,13 @@
},
"license": "MIT"
},
"tree-sitter-rust 0.20.3": {
"tree-sitter-rust 0.20.4": {
"name": "tree-sitter-rust",
"version": "0.20.3",
"version": "0.20.4",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/tree-sitter-rust/0.20.3/download",
"sha256": "797842733e252dc11ae5d403a18060bf337b822fc2ae5ddfaa6ff4d9cc20bda6"
"url": "https://crates.io/api/v1/crates/tree-sitter-rust/0.20.4/download",
"sha256": "b0832309b0b2b6d33760ce5c0e818cb47e1d72b468516bfe4134408926fa7594"
}
},
"targets": [
@ -13303,14 +13303,14 @@
"target": "tree_sitter"
},
{
"id": "tree-sitter-rust 0.20.3",
"id": "tree-sitter-rust 0.20.4",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2018",
"version": "0.20.3"
"edition": "2021",
"version": "0.20.4"
},
"build_script_attrs": {
"data_glob": [
@ -13319,7 +13319,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13328,13 +13328,13 @@
},
"license": "MIT"
},
"tree-sitter-scala 0.20.1": {
"tree-sitter-scala 0.20.2": {
"name": "tree-sitter-scala",
"version": "0.20.1",
"version": "0.20.2",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/tree-sitter-scala/0.20.1/download",
"sha256": "4e1f1de7a274c95937c40bc75dcaee97b5f23107ffcc78fc99a7b982d4f745ef"
"url": "https://crates.io/api/v1/crates/tree-sitter-scala/0.20.2/download",
"sha256": "93df43ab4f2b3299fe97e73eb9b946bbca453b402bea8debf1fa69ab4e28412b"
}
},
"targets": [
@ -13369,14 +13369,14 @@
"target": "tree_sitter"
},
{
"id": "tree-sitter-scala 0.20.1",
"id": "tree-sitter-scala 0.20.2",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2018",
"version": "0.20.1"
"version": "0.20.2"
},
"build_script_attrs": {
"data_glob": [
@ -13385,7 +13385,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13453,7 +13453,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13519,7 +13519,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13587,7 +13587,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -13655,7 +13655,7 @@
"deps": {
"common": [
{
"id": "cc 1.0.82",
"id": "cc 1.0.83",
"target": "cc"
}
],
@ -14822,7 +14822,7 @@
"deps": {
"common": [
{
"id": "windows-targets 0.48.2",
"id": "windows-targets 0.48.5",
"target": "windows_targets"
}
],
@ -14941,7 +14941,7 @@
"deps": {
"common": [
{
"id": "windows-targets 0.48.2",
"id": "windows-targets 0.48.5",
"target": "windows_targets"
}
],
@ -15059,13 +15059,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows-targets 0.48.2": {
"windows-targets 0.48.5": {
"name": "windows-targets",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows-targets/0.48.2/download",
"sha256": "d1eeca1c172a285ee6c2c84c341ccea837e7c01b12fbb2d0fe3c9e550ce49ec8"
"url": "https://crates.io/api/v1/crates/windows-targets/0.48.5/download",
"sha256": "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
}
},
"targets": [
@ -15089,50 +15089,50 @@
"selects": {
"aarch64-pc-windows-gnullvm": [
{
"id": "windows_aarch64_gnullvm 0.48.2",
"id": "windows_aarch64_gnullvm 0.48.5",
"target": "windows_aarch64_gnullvm"
}
],
"cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": [
{
"id": "windows_aarch64_msvc 0.48.2",
"id": "windows_aarch64_msvc 0.48.5",
"target": "windows_aarch64_msvc"
}
],
"cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(windows_raw_dylib)))": [
{
"id": "windows_i686_gnu 0.48.2",
"id": "windows_i686_gnu 0.48.5",
"target": "windows_i686_gnu"
}
],
"cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))": [
{
"id": "windows_i686_msvc 0.48.2",
"id": "windows_i686_msvc 0.48.5",
"target": "windows_i686_msvc"
}
],
"cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))": [
{
"id": "windows_x86_64_gnu 0.48.2",
"id": "windows_x86_64_gnu 0.48.5",
"target": "windows_x86_64_gnu"
}
],
"cfg(all(target_arch = \"x86_64\", target_env = \"msvc\", not(windows_raw_dylib)))": [
{
"id": "windows_x86_64_msvc 0.48.2",
"id": "windows_x86_64_msvc 0.48.5",
"target": "windows_x86_64_msvc"
}
],
"x86_64-pc-windows-gnullvm": [
{
"id": "windows_x86_64_gnullvm 0.48.2",
"id": "windows_x86_64_gnullvm 0.48.5",
"target": "windows_x86_64_gnullvm"
}
]
}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"license": "MIT OR Apache-2.0"
},
@ -15189,13 +15189,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_aarch64_gnullvm 0.48.2": {
"windows_aarch64_gnullvm 0.48.5": {
"name": "windows_aarch64_gnullvm",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_aarch64_gnullvm/0.48.2/download",
"sha256": "b10d0c968ba7f6166195e13d593af609ec2e3d24f916f081690695cf5eaffb2f"
"url": "https://crates.io/api/v1/crates/windows_aarch64_gnullvm/0.48.5/download",
"sha256": "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
}
},
"targets": [
@ -15226,14 +15226,14 @@
"deps": {
"common": [
{
"id": "windows_aarch64_gnullvm 0.48.2",
"id": "windows_aarch64_gnullvm 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15295,13 +15295,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_aarch64_msvc 0.48.2": {
"windows_aarch64_msvc 0.48.5": {
"name": "windows_aarch64_msvc",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_aarch64_msvc/0.48.2/download",
"sha256": "571d8d4e62f26d4932099a9efe89660e8bd5087775a2ab5cdd8b747b811f1058"
"url": "https://crates.io/api/v1/crates/windows_aarch64_msvc/0.48.5/download",
"sha256": "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
}
},
"targets": [
@ -15332,14 +15332,14 @@
"deps": {
"common": [
{
"id": "windows_aarch64_msvc 0.48.2",
"id": "windows_aarch64_msvc 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15401,13 +15401,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_i686_gnu 0.48.2": {
"windows_i686_gnu 0.48.5": {
"name": "windows_i686_gnu",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_i686_gnu/0.48.2/download",
"sha256": "2229ad223e178db5fbbc8bd8d3835e51e566b8474bfca58d2e6150c48bb723cd"
"url": "https://crates.io/api/v1/crates/windows_i686_gnu/0.48.5/download",
"sha256": "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
}
},
"targets": [
@ -15438,14 +15438,14 @@
"deps": {
"common": [
{
"id": "windows_i686_gnu 0.48.2",
"id": "windows_i686_gnu 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15507,13 +15507,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_i686_msvc 0.48.2": {
"windows_i686_msvc 0.48.5": {
"name": "windows_i686_msvc",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_i686_msvc/0.48.2/download",
"sha256": "600956e2d840c194eedfc5d18f8242bc2e17c7775b6684488af3a9fff6fe3287"
"url": "https://crates.io/api/v1/crates/windows_i686_msvc/0.48.5/download",
"sha256": "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
}
},
"targets": [
@ -15544,14 +15544,14 @@
"deps": {
"common": [
{
"id": "windows_i686_msvc 0.48.2",
"id": "windows_i686_msvc 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15613,13 +15613,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_x86_64_gnu 0.48.2": {
"windows_x86_64_gnu 0.48.5": {
"name": "windows_x86_64_gnu",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_x86_64_gnu/0.48.2/download",
"sha256": "ea99ff3f8b49fb7a8e0d305e5aec485bd068c2ba691b6e277d29eaeac945868a"
"url": "https://crates.io/api/v1/crates/windows_x86_64_gnu/0.48.5/download",
"sha256": "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
}
},
"targets": [
@ -15650,14 +15650,14 @@
"deps": {
"common": [
{
"id": "windows_x86_64_gnu 0.48.2",
"id": "windows_x86_64_gnu 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15719,13 +15719,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_x86_64_gnullvm 0.48.2": {
"windows_x86_64_gnullvm 0.48.5": {
"name": "windows_x86_64_gnullvm",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_x86_64_gnullvm/0.48.2/download",
"sha256": "8f1a05a1ece9a7a0d5a7ccf30ba2c33e3a61a30e042ffd247567d1de1d94120d"
"url": "https://crates.io/api/v1/crates/windows_x86_64_gnullvm/0.48.5/download",
"sha256": "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
}
},
"targets": [
@ -15756,14 +15756,14 @@
"deps": {
"common": [
{
"id": "windows_x86_64_gnullvm 0.48.2",
"id": "windows_x86_64_gnullvm 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15825,13 +15825,13 @@
},
"license": "MIT OR Apache-2.0"
},
"windows_x86_64_msvc 0.48.2": {
"windows_x86_64_msvc 0.48.5": {
"name": "windows_x86_64_msvc",
"version": "0.48.2",
"version": "0.48.5",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/windows_x86_64_msvc/0.48.2/download",
"sha256": "d419259aba16b663966e29e6d7c6ecfa0bb8425818bb96f6f1f3c3eb71a6e7b9"
"url": "https://crates.io/api/v1/crates/windows_x86_64_msvc/0.48.5/download",
"sha256": "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
}
},
"targets": [
@ -15862,14 +15862,14 @@
"deps": {
"common": [
{
"id": "windows_x86_64_msvc 0.48.2",
"id": "windows_x86_64_msvc 0.48.5",
"target": "build_script_build"
}
],
"selects": {}
},
"edition": "2021",
"version": "0.48.2"
"edition": "2018",
"version": "0.48.5"
},
"build_script_attrs": {
"data_glob": [
@ -15878,13 +15878,13 @@
},
"license": "MIT OR Apache-2.0"
},
"winnow 0.5.12": {
"winnow 0.5.14": {
"name": "winnow",
"version": "0.5.12",
"version": "0.5.14",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/winnow/0.5.12/download",
"sha256": "83817bbecf72c73bad717ee86820ebf286203d2e04c3951f3cd538869c897364"
"url": "https://crates.io/api/v1/crates/winnow/0.5.14/download",
"sha256": "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97"
}
},
"targets": [
@ -15912,7 +15912,7 @@
"selects": {}
},
"edition": "2021",
"version": "0.5.12"
"version": "0.5.14"
},
"license": "MIT"
},

View File

@ -229,9 +229,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
version = "1.0.82"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"libc",
]
@ -283,9 +283,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.3.21"
version = "4.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd"
checksum = "03aef18ddf7d879c15ce20f04826ef8418101c7e528014c3eeea13321047dca3"
dependencies = [
"clap_builder",
"clap_derive",
@ -294,9 +294,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.3.21"
version = "4.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa"
checksum = "f8ce6fffb678c9b80a70b6b6de0aad31df727623a70fd9a842c30cd573e2fa98"
dependencies = [
"anstream",
"anstyle",
@ -461,9 +461,9 @@ dependencies = [
[[package]]
name = "deranged"
version = "0.3.7"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929"
checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
[[package]]
name = "devise"
@ -745,9 +745,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "h2"
version = "0.3.20"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049"
checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
dependencies = [
"bytes",
"fnv",
@ -1213,7 +1213,7 @@ dependencies = [
"libc",
"redox_syscall 0.3.5",
"smallvec",
"windows-targets 0.48.2",
"windows-targets 0.48.5",
]
[[package]]
@ -1728,7 +1728,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bitvec",
"clap 4.3.21",
"clap 4.3.23",
"insta",
"itertools",
"once_cell",
@ -2006,7 +2006,7 @@ name = "syntect_server"
version = "1.0.1"
dependencies = [
"base64 0.13.1",
"clap 4.3.21",
"clap 4.3.23",
"criterion",
"futures",
"futures-task",
@ -2033,9 +2033,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
version = "3.7.1"
version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651"
checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
dependencies = [
"cfg-if",
"fastrand",
@ -2082,9 +2082,9 @@ dependencies = [
[[package]]
name = "time"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea"
checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07"
dependencies = [
"deranged",
"itoa",
@ -2101,9 +2101,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
[[package]]
name = "time-macros"
version = "0.2.11"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd"
checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451"
dependencies = [
"time-core",
]
@ -2422,9 +2422,9 @@ dependencies = [
[[package]]
name = "tree-sitter-rust"
version = "0.20.3"
version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "797842733e252dc11ae5d403a18060bf337b822fc2ae5ddfaa6ff4d9cc20bda6"
checksum = "b0832309b0b2b6d33760ce5c0e818cb47e1d72b468516bfe4134408926fa7594"
dependencies = [
"cc",
"tree-sitter",
@ -2432,9 +2432,9 @@ dependencies = [
[[package]]
name = "tree-sitter-scala"
version = "0.20.1"
version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e1f1de7a274c95937c40bc75dcaee97b5f23107ffcc78fc99a7b982d4f745ef"
checksum = "93df43ab4f2b3299fe97e73eb9b946bbca453b402bea8debf1fa69ab4e28412b"
dependencies = [
"cc",
"tree-sitter",
@ -2670,7 +2670,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [
"windows-targets 0.48.2",
"windows-targets 0.48.5",
]
[[package]]
@ -2688,7 +2688,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets 0.48.2",
"windows-targets 0.48.5",
]
[[package]]
@ -2708,17 +2708,17 @@ dependencies = [
[[package]]
name = "windows-targets"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1eeca1c172a285ee6c2c84c341ccea837e7c01b12fbb2d0fe3c9e550ce49ec8"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm 0.48.2",
"windows_aarch64_msvc 0.48.2",
"windows_i686_gnu 0.48.2",
"windows_i686_msvc 0.48.2",
"windows_x86_64_gnu 0.48.2",
"windows_x86_64_gnullvm 0.48.2",
"windows_x86_64_msvc 0.48.2",
"windows_aarch64_gnullvm 0.48.5",
"windows_aarch64_msvc 0.48.5",
"windows_i686_gnu 0.48.5",
"windows_i686_msvc 0.48.5",
"windows_x86_64_gnu 0.48.5",
"windows_x86_64_gnullvm 0.48.5",
"windows_x86_64_msvc 0.48.5",
]
[[package]]
@ -2729,9 +2729,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b10d0c968ba7f6166195e13d593af609ec2e3d24f916f081690695cf5eaffb2f"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_msvc"
@ -2741,9 +2741,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "571d8d4e62f26d4932099a9efe89660e8bd5087775a2ab5cdd8b747b811f1058"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_i686_gnu"
@ -2753,9 +2753,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
[[package]]
name = "windows_i686_gnu"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2229ad223e178db5fbbc8bd8d3835e51e566b8474bfca58d2e6150c48bb723cd"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_msvc"
@ -2765,9 +2765,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
[[package]]
name = "windows_i686_msvc"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "600956e2d840c194eedfc5d18f8242bc2e17c7775b6684488af3a9fff6fe3287"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_x86_64_gnu"
@ -2777,9 +2777,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea99ff3f8b49fb7a8e0d305e5aec485bd068c2ba691b6e277d29eaeac945868a"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnullvm"
@ -2789,9 +2789,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1a05a1ece9a7a0d5a7ccf30ba2c33e3a61a30e042ffd247567d1de1d94120d"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_msvc"
@ -2801,15 +2801,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.2"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d419259aba16b663966e29e6d7c6ecfa0bb8425818bb96f6f1f3c3eb71a6e7b9"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "winnow"
version = "0.5.12"
version = "0.5.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83817bbecf72c73bad717ee86820ebf286203d2e04c3951f3cd538869c897364"
checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97"
dependencies = [
"memchr",
]

View File

@ -1,11 +1,8 @@
---
source: crates/sg-syntax/src/sg_treesitter.rs
assertion_line: 362
expression: "snapshot_treesitter_syntax_kinds(&document, &contents)"
---
#![allow(all)]
// ^^^^^ Identifier
// ^^^ Identifier
#![allow(unreachable_patterns)]
// ^^^^^ Identifier
// ^^^^^^^^^^^^^^^^^^^^ Identifier
@ -363,6 +360,7 @@ expression: "snapshot_treesitter_syntax_kinds(&document, &contents)"
// ^^^^ IdentifierType
$x * 2
// ^^ IdentifierAttribute
// ^ IdentifierOperator
// ^ NumericLiteral
};
}

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "init-sg_lib",
@ -16,3 +16,10 @@ go_binary(
embed = [":init-sg_lib"],
visibility = ["//:__subpackages__"],
)
go_cross_binary(
name = "init-sg-darwin-arm64",
platform = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
target = ":init-sg",
visibility = ["//testing:__pkg__"],
)

View File

@ -11,6 +11,7 @@ server_integration_test(
"//:mocha_config",
"//client/web/src/end-to-end:e2e",
"//client/web/src/end-to-end:testing_e2e_bundle",
"//enterprise/cmd/server:image_tarball",
],
env = {
"SG_FEATURE_FLAG_GRPC": "false",
@ -49,6 +50,7 @@ server_integration_test(
data = [
"//dev/authtest:authtest_test",
"//dev/gqltest:gqltest_test",
"//enterprise/cmd/server:image_tarball",
],
env = {
"SG_FEATURE_FLAG_GRPC": "false",
@ -83,6 +85,7 @@ server_integration_test(
data = [
"//dev/authtest:authtest_test",
"//dev/gqltest:gqltest_test",
"//enterprise/cmd/server:image_tarball",
],
env = {
"SG_FEATURE_FLAG_GRPC": "true",
@ -115,7 +118,7 @@ server_integration_test(
name = "codeintel_integration_test",
args = [
"$(location //internal/cmd/init-sg)",
"$(rlocationpath @src-cli-linux-amd64//:src-cli-linux-amd64)",
"$(rlocationpath //dev/tools:src-cli)",
"$(location //dev/codeintel-qa/cmd/download)",
"$(location //dev/codeintel-qa/cmd/clear)",
"$(location //dev/codeintel-qa/cmd/upload)",
@ -128,14 +131,17 @@ server_integration_test(
"//dev/codeintel-qa/cmd/download",
"//dev/codeintel-qa/cmd/query",
"//dev/codeintel-qa/cmd/upload",
"//dev/tools:src-cli",
"//enterprise/cmd/server:image_tarball",
"//internal/cmd/init-sg",
"@src-cli-linux-amd64//:src-cli-linux-amd64",
],
env = {
"SG_FEATURE_FLAG_GRPC": "false",
"TEST_USER_EMAIL": "test@sourcegraph.com",
"TEST_USER_PASSWORD": "supersecurepassword",
"SOURCEGRAPH_SUDO_USER": "admin",
"HOME": ".",
"__LOCAL__": "false",
},
env_inherit = [
"AWS_ACCESS_KEY_ID",
@ -160,3 +166,89 @@ server_integration_test(
"manual",
],
)
# This one is bit perculiar, when running the codeintel-qa locally, we need to disable the sandbox
# so the runner can access the gcloud creds which are living in the users HOME, under
# .config/gcloud/application_default_credentials.json.
#
# It's more complicated to make the server_integration_test macro handle this automatically than it is to
# duplicate it, so we just duplicate and tweak it instead. It uses the same port, because those two tasks will
# never be run at the same time anyway. There is a safe guard in the original one that informs the user
# to use this variant instead.
server_integration_test(
name = "codeintel_integration_test_local",
args = select({
"//:darwin_docker_e2e_go": [
"$(location //internal/cmd/init-sg:init-sg-darwin-arm64)",
"$(rlocationpath @src-cli-darwin-arm64//:src-cli-darwin-arm64)",
"$(location //dev/codeintel-qa/cmd/download:download-darwin-arm64)",
"$(location //dev/codeintel-qa/cmd/clear:clear-darwin-arm64)",
"$(location //dev/codeintel-qa/cmd/upload:upload-darwin-arm64)",
"$(location //dev/codeintel-qa/cmd/query:query-darwin-arm64)",
"$(location //dev/ci/integration/code-intel:repos.json)",
],
"//conditions:default": [
"$(location //internal/cmd/init-sg)",
"$(rlocationpath //dev/tools:src-cli)",
"$(location //dev/codeintel-qa/cmd/download)",
"$(location //dev/codeintel-qa/cmd/clear)",
"$(location //dev/codeintel-qa/cmd/upload)",
"$(location //dev/codeintel-qa/cmd/query)",
"$(location //dev/ci/integration/code-intel:repos.json)",
],
}),
data = select({
"//:darwin_docker_e2e_go": [
"//dev/ci/integration/code-intel:repos.json",
"//dev/codeintel-qa/cmd/clear:clear-darwin-arm64",
"//dev/codeintel-qa/cmd/download:download-darwin-arm64",
"//dev/codeintel-qa/cmd/query:query-darwin-arm64",
"//dev/codeintel-qa/cmd/upload:upload-darwin-arm64",
"//enterprise/cmd/server:image_tarball",
"//internal/cmd/init-sg:init-sg-darwin-arm64",
"@src-cli-darwin-arm64//:src-cli-darwin-arm64",
],
"//conditions:default": [
"//dev/ci/integration/code-intel:repos.json",
"//dev/codeintel-qa/cmd/clear",
"//dev/codeintel-qa/cmd/download",
"//dev/codeintel-qa/cmd/query",
"//dev/codeintel-qa/cmd/upload",
"//dev/tools:src-cli",
"//enterprise/cmd/server:image_tarball",
"//internal/cmd/init-sg",
],
}),
env = {
"SG_FEATURE_FLAG_GRPC": "false",
"TEST_USER_EMAIL": "test@sourcegraph.com",
"TEST_USER_PASSWORD": "supersecurepassword",
"SOURCEGRAPH_SUDO_USER": "admin",
"HOME": ".",
"__LOCAL__": "true",
},
env_inherit = [
"AWS_ACCESS_KEY_ID",
"AWS_CODE_COMMIT_PASSWORD",
"AWS_CODE_COMMIT_USERNAME",
"AWS_SECRET_ACCESS_KEY",
"AZURE_DEVOPS_TOKEN",
"AZURE_DEVOPS_USERNAME",
"BITBUCKET_SERVER_TOKEN",
"BITBUCKET_SERVER_URL",
"BITBUCKET_SERVER_USERNAME",
"GITHUB_TOKEN",
"PERFORCE_PASSWORD",
"PERFORCE_PORT",
"PERFORCE_USER",
"SOURCEGRAPH_LICENSE_GENERATION_KEY",
"SOURCEGRAPH_LICENSE_KEY",
"GOOGLE_APPLICATION_CREDENTIALS",
],
port = "7083",
runner_src = ":codeintel_integration_test.sh",
tags = [
"manual",
"no-sanbdox",
],
)

View File

@ -3,6 +3,17 @@
set -eu
source ./testing/tools/integration_runner.sh || exit 1
if [ "$(uname)" = "Darwin" ] && [ "$__LOCAL__" != "true" ]; then
echo -e "⚠️ It seems you're running this test target on a MacOs machine.\n👉 This target only works in CI, and you should instead use //testing:codeintel_integration_test_local."
exit 1
fi
if [ "$__LOCAL__" = "true" ] && [ "${GOOGLE_APPLICATION_CREDENTIALS:-}" = "" ]; then
echo -e "⚠️ This targets requires \$GOOGLE_APPLICATION_CREDENTIALS to be set to where your gcloud creds are stored. Usually, this is \$HOME/.config/gcloud/application_default_credentials.json."
echo -e "👉 Set this var with\n\texport GOOGLE_APPLICATION_CREDENTIALS=\$HOME/.config/gcloud/application_default_credentials.json\nand run this target again."
exit 1
fi
tarball="$1"
image_name="$2"

View File

@ -9,9 +9,6 @@ def server_integration_test(name, port, runner_src, **kwargs):
tags = kwargs.pop("tags", [])
deps = kwargs.pop("deps", [])
# We need the server image for the script to spawn it.
data.append("//enterprise/cmd/server:image_tarball")
# First two arguments are always the server image and the image name
args = ["$(location //enterprise/cmd/server:image_tarball)", "server:candidate"] + args

View File

@ -112,6 +112,7 @@ function _run_server_image() {
-d \
--name "$container_name" \
--publish "$server_port":7080 \
--platform linux/amd64 \
-e BAZEL_SKIP_OOB_INFER_VERSION=true \
-e ALLOW_SINGLE_DOCKER_CODE_INSIGHTS="$ALLOW_SINGLE_DOCKER_CODE_INSIGHTS" \
-e SOURCEGRAPH_LICENSE_GENERATION_KEY="$SOURCEGRAPH_LICENSE_GENERATION_KEY" \
@ -163,11 +164,7 @@ function run_server_image() {
local server_port
server_port="$4"
must_be_CI
must_not_be_running "$url"
# This causes flakes on the container tests, because it catches other docker jobs
# TODO move this to a agent
# ensure_clean_slate
local container_name
container_name=$(generate_unique_container_name "server-integration")