mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 13:11:49 +00:00
Port back compat tests to Bazel (#50932)
Clones and patches Sourcegraph git repository under @sourcegraph_back_compat so we can run tests targets from that particular release against the new database schema. Flakes can be defined to skip known problematic tests which are either flaky or simply cannot run against the new schema in case of a breaking change. See //dev/backcompat:flakes.bzl for more details about how to define them. The final result is the definition of a @sourcegraph_back_compat target, whose test targets are exactly the same as back then, but with instead a new schema. Example: `bazel test @sourcegraph_back_compat//enterprise/internal/batches/...`. See https://github.com/sourcegraph/sourcegraph/pull/50932/files#diff-2f07315ec320aa4080768fec54f32ebb2cbf4e3e6df7c51a314beda827c48c41R104 for the command generating the mandatory patch file in CI for these tests to run. If the patch file were to be missing, a placeholder diff is in place to make it explicit (in the eventuality of someone running those locally). A new CI job has been added because this one is fully independent from the other targets to build, and will be cached most of the time. Depending how it goes, I might bring that one over the main bazel job to avoid getting an agent just for that. Because it's cached, we can run this within PRs and have it take 10s max for 99% of the PRs and main builds. TODO: The flakefiles are still there, they're just defined in different place. I need to port the annotation as well, that has proven to be really useful. Also right now it's a bit manual as the 5.0.0 target is a bit peculiar, but that'll get much simpler as we progress, as the next old release will be requiring less and less patching. This turns about a dozen of 10m individual jobs into a single one ranging from 30s if there's not database changes to 10m if there's some of them and cold cache. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> QA: fails on old code when a new migration breaks something: - https://buildkite.com/sourcegraph/sourcegraph/builds/214283#01879f2d-67be-4caf-b5d5-93f045e19348/118-126
This commit is contained in:
parent
923da0ea4d
commit
1e4479947f
4
.gitignore
vendored
4
.gitignore
vendored
@ -189,3 +189,7 @@ index.scip
|
||||
/an
|
||||
/tr
|
||||
/cache-*.tar
|
||||
|
||||
# Backward compatibility database tests patch, generated on the fly in CI
|
||||
# for `bazel test @sourcegraph_back_compat//...` targets.
|
||||
/dev/backcompat/back_compat_migrations.patch
|
||||
|
||||
@ -251,3 +251,6 @@ crates_repository(
|
||||
load("@crate_index//:defs.bzl", "crate_repositories")
|
||||
|
||||
crate_repositories()
|
||||
|
||||
load("//dev/backcompat:defs.bzl", "back_compat_defs")
|
||||
back_compat_defs()
|
||||
|
||||
0
dev/backcompat/BUILD.bazel
generated
Normal file
0
dev/backcompat/BUILD.bazel
generated
Normal file
133
dev/backcompat/defs.bzl
Normal file
133
dev/backcompat/defs.bzl
Normal file
@ -0,0 +1,133 @@
|
||||
"""Database schema backward compatibility definitions.
|
||||
|
||||
Clones and patches Sourcegraph git repository under @sourcegraph_back_compat so we can run tests targets
|
||||
from that particular release against the new database schema.
|
||||
|
||||
Flakes can be defined to skip known problematic tests which are either flaky or simply cannot run against
|
||||
the new schema in case of a breaking change. See //dev/backcompat:flakes.bzl for more details about
|
||||
how to define them.
|
||||
|
||||
The final result is the definition of a @sourcegraph_back_compat target, whose test targets are exactly
|
||||
the same as back then, but with instead a new schema.
|
||||
|
||||
Example: `bazel test @sourcegraph_back_compat//enterprise/internal/batches/...`.
|
||||
|
||||
See https://sourcegraph.com/search?q=context:global+dev/backcompat/patches/back_compat_migrations.patch+repo:github.com/sourcegraph/sourcegraph+lang:Go&patternType=standard&sm=0&groupBy=repo
|
||||
for the command generating the mandatory patch file in CI for these tests to run.
|
||||
|
||||
If the patch file were to be missing, a placeholder diff is in place to make it explicit (in the
|
||||
eventuality of someone running those locally).
|
||||
"""
|
||||
|
||||
load("test_release_version.bzl", "MINIMUM_UPGRADEABLE_VERSION", "MINIMUM_UPGRADEABLE_VERSION_REF")
|
||||
load("flakes.bzl", "FLAKES")
|
||||
|
||||
load("@bazel_gazelle//:deps.bzl", "go_repository")
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
|
||||
# Shell snippet to disable a test on the fly. Needs to be formatted before being used.
|
||||
#
|
||||
# OSX ships BSD sed and the GNU sed that is traditionally available on Linux is named gsed instead.
|
||||
PATCH_GO_TEST = """_sed_binary="sed"
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
_sed_binary="gsed"
|
||||
fi
|
||||
$_sed_binary -i "s/func {}/func _{}/g" {}/*.go
|
||||
"""
|
||||
|
||||
# Assemble go test patches, based on the currently defined version.
|
||||
# See //dev/backcompat:test_release_version.bzl for the version definition.
|
||||
PATCH_GO_TEST_CMDS = [
|
||||
PATCH_GO_TEST.format(test["prefix"], test["prefix"], test["path"], test["prefix"], test["reason"])
|
||||
for test in FLAKES[MINIMUM_UPGRADEABLE_VERSION]
|
||||
]
|
||||
|
||||
# Join all individual go test patches into a single shell snippet.
|
||||
PATCH_ALL_GO_TESTS_CMD = "\n".join(PATCH_GO_TEST_CMDS)
|
||||
|
||||
# Replaces all occurences of @com_github_sourcegraph_(scip|conc) by @back_compat_com_github_sourcegraph_(scip|conc).
|
||||
PATCH_BUILD_FIXES_CMD = """_sed_binary="sed"
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
_sed_binary="gsed"
|
||||
fi
|
||||
find . -type f -name "*.bazel" -exec $_sed_binary -i 's|@com_github_sourcegraph_conc|@back_compat_com_github_sourcegraph_conc|g' {} +
|
||||
find . -type f -name "*.bazel" -exec $_sed_binary -i 's|@com_github_sourcegraph_scip|@back_compat_com_github_sourcegraph_scip|g' {} +
|
||||
"""
|
||||
|
||||
def back_compat_defs():
|
||||
# github.com/sourcegraph/scip and github.com/sourcegraph/conc both rely on a few
|
||||
# internal libraries from github.com/sourcegraph/sourcegraph/lib and their
|
||||
# respective go_repository rules are annoted with build directives for Gazelle
|
||||
# that fixes package resolution.
|
||||
#
|
||||
# When we're cloning the git repository of sourcegraph/sourcegraph on the release version
|
||||
# we're testing against, those directives are not working as intended, as they appear to be
|
||||
# evaluate target resolution in the global scope instead of @sourcegraph_back_compat, leading
|
||||
# to compiling these two packages with the right targets, but linking them against the ones
|
||||
# from our root workspace.
|
||||
#
|
||||
# So to work around that, we introduce two additional go_repository rules, which are the one that
|
||||
# @sourcegraph_back_compat declares, but we rewrite the directives to resolve toward
|
||||
# @sourcegraph_back_compat explicitly. The version/sum are exactly the same ones as defined
|
||||
# by @sourcegraph_back_compat on the commit tagged by the release.
|
||||
#
|
||||
# And to make this work, we patch on the fly buildfiles in @sourcegraph_back_compat to reference
|
||||
# the newly declared repos, by replacing all occurences of @com_github_sourcegraph_scip by
|
||||
# @back_compat_com_github_sourcegraph_scip (and same thing for sourcegraph/conc).
|
||||
go_repository(
|
||||
name = "back_compat_com_github_sourcegraph_scip",
|
||||
# This fixes the build for sourcegraph/scip which depends on sourcegraph/sourcegraph/lib but
|
||||
# gazelle doesn't know how to resolve those packages from within sourcegraph/scip.
|
||||
build_directives = [
|
||||
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/errors @sourcegraph_back_compat//lib/errors",
|
||||
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol @sourcegraph_back_compat//lib/codeintel/lsif/protocol",
|
||||
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol/reader @sourcegraph_back_compat//lib/codeintel/lsif/protocol/reader",
|
||||
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol/writer @sourcegraph_back_compat//lib/codeintel/lsif/protocol/writer",
|
||||
],
|
||||
build_file_proto_mode = "disable_global",
|
||||
importpath = "github.com/sourcegraph/scip",
|
||||
sum = "h1:fWPxLkDObzzKTGe9vb6wpzK0FYkwcfSxmxUBvAOc8aw=", # Need to be manually updated when bumping the back compat release target.
|
||||
version = "v0.2.4-0.20221213205653-aa0e511dcfef", # Need to be manually updated when bumping the back compat release target.
|
||||
)
|
||||
|
||||
# Same logic for this repository.
|
||||
go_repository(
|
||||
name = "back_compat_com_github_sourcegraph_conc",
|
||||
build_directives = [
|
||||
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/errors @sourcegraph_back_compat//lib/errors",
|
||||
],
|
||||
build_file_proto_mode = "disable_global",
|
||||
importpath = "github.com/sourcegraph/conc",
|
||||
sum = "h1:96VpOCAtXDCQ8Oycz0ftHqdPyMi8w12ltN4L2noYg7s=", # Need to be manually updated when bumping the back compat release target.
|
||||
version = "v0.2.0", # Need to be manually updated when bumping the back compat release target.
|
||||
)
|
||||
|
||||
|
||||
# Now that we have declared a replacement for the two problematic go packages that
|
||||
# @sourcegraph_back_compat depends on, we can define the repository itself. Because it
|
||||
# comes with its Bazel rules (logical, that's just the current repository but with a different
|
||||
# commit), we can simply use git_repository to fetch it and apply patches on the fly to
|
||||
# inject migrations and build fixes.
|
||||
git_repository(
|
||||
name = "sourcegraph_back_compat",
|
||||
remote = "https://github.com/sourcegraph/sourcegraph.git",
|
||||
patches = ["//dev/backcompat/patches:back_compat_migrations.patch"],
|
||||
patch_args = ["-p1"],
|
||||
commit = MINIMUM_UPGRADEABLE_VERSION_REF,
|
||||
patch_cmds = [
|
||||
# webpack rules are complaining about a missing entry point, which is irrelevant as we're
|
||||
# simply running go tests only. Therefore, we can simply drop the client folder.
|
||||
#
|
||||
# Because the target release at the time of writing this comment is 5.0.0 which was
|
||||
# before we fully switched to Bazel, it's not exactly in a buildable state, and we're using
|
||||
# a backported fix to make it buildable. That fix is merely about running `bazel configure`
|
||||
# and dropping the client folder.
|
||||
#
|
||||
# "rm -Rf client",
|
||||
PATCH_ALL_GO_TESTS_CMD,
|
||||
PATCH_BUILD_FIXES_CMD,
|
||||
# Seems to be affecting the root workspace somehow.
|
||||
# TODO(JH) Look into bzlmod.
|
||||
"rm .bazelversion",
|
||||
],
|
||||
)
|
||||
17
dev/backcompat/flakes.bzl
Normal file
17
dev/backcompat/flakes.bzl
Normal file
@ -0,0 +1,17 @@
|
||||
"""Defines flaky tests to disable when running tests from the release we're testing the new database schema against.
|
||||
"""
|
||||
|
||||
FLAKES = {
|
||||
"5.0.0": [
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestRepositoryPermissions",
|
||||
"reason": "Test was having incomplete data, fails now that constraints are in place"
|
||||
},
|
||||
{
|
||||
"path": "dev/sg/linters",
|
||||
"prefix": "TestLibLogLinter",
|
||||
"reason": "Test was having incomplete data, fails now that constraints are in place"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
dev/backcompat/patches/BUILD.bazel
generated
Normal file
4
dev/backcompat/patches/BUILD.bazel
generated
Normal file
@ -0,0 +1,4 @@
|
||||
exports_files([
|
||||
# See https://sourcegraph.com/search?q=context:global+dev/backcompat/patches/back_compat_migrations.patch+repo:github.com/sourcegraph/sourcegraph+lang:Go&patternType=standard&sm=0&groupBy=repo
|
||||
"back_compat_migrations.patch", # git diff ci/backcompat-v5.0.0 ..HEAD -- migrations/ > migrations/back_compat_migrations.patch
|
||||
])
|
||||
3
dev/backcompat/patches/back_compat_migrations.patch
Normal file
3
dev/backcompat/patches/back_compat_migrations.patch
Normal file
@ -0,0 +1,3 @@
|
||||
diff --git a/failme b/failme
|
||||
--- This patch to port new migrations onto old release needs to be generated to insert the back compat tests, see docs in dev backcompat
|
||||
+++ Read the docs in dev/backcompat
|
||||
13
dev/backcompat/test_release_version.bzl
Normal file
13
dev/backcompat/test_release_version.bzl
Normal file
@ -0,0 +1,13 @@
|
||||
"""Defines the minimum ugradeable version of Sourcegraph.
|
||||
|
||||
This designates the mininum version from which we guarantees the newest database
|
||||
schema can run.
|
||||
|
||||
See https://docs.sourcegraph.com/dev/background-information/sql/migrations
|
||||
"""
|
||||
|
||||
# Defines which version we target with the backward compatibility tests.
|
||||
MINIMUM_UPGRADEABLE_VERSION = "5.0.0"
|
||||
|
||||
# Defines a reproducible reference to clone Sourcegraph at to run those tests.
|
||||
MINIMUM_UPGRADEABLE_VERSION_REF = "177663e4329d712f3493787410f71da60fe5dc7f"
|
||||
20
dev/ci/go-backcompat/BUILD.bazel
generated
20
dev/ci/go-backcompat/BUILD.bazel
generated
@ -1,20 +0,0 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go-backcompat_lib",
|
||||
srcs = ["reorganize.go"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/dev/ci/go-backcompat",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//internal/database/migration/definition",
|
||||
"//internal/database/migration/schemas",
|
||||
"@com_github_keegancsmith_sqlf//:sqlf",
|
||||
"@in_gopkg_yaml_v2//:yaml_v2",
|
||||
],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "go-backcompat",
|
||||
embed = [":go-backcompat_lib"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
@ -1,15 +0,0 @@
|
||||
The `flakefiles` directory contains _flakefiles_ that lists tests to disable when running Postgres backwards compatibility tests (see [go-backcompat/test.sh](../go-backcompat/test.sh)).
|
||||
|
||||
Since we are running _historic_ tests, we are unable to change or fix them in the presence of flake or acceptable/spurious failures. In these cases, we can add the tests to an explicit lists of tests that we disable prior to invoking `go test`. The content of each flakefile looks similar to the following:
|
||||
|
||||
```json
|
||||
[
|
||||
{ "path": "cmd/A/server", "prefix": "TestA", "reason": "Unused outside of Cloud." },
|
||||
{ "path": "cmd/B/server", "prefix": "TestB", "reason": "Test was determiened to be flaky." },
|
||||
{ "path": "cmd/C/server", "prefix": "TestC", "reason": "Dropped column presenting security issue." }
|
||||
]
|
||||
```
|
||||
|
||||
Each line indicates a _path_ and _prefix_ pair, where any test starting with the given prefix in a Go test file under the given path will be disabled (renamed so that it's invoked on the following `go test` invocations). This is limited to top-level tests defined as functions in a test package (and not sub-tests invoked by `t.Run(...)`.
|
||||
|
||||
Each flakefile should have a name of the form `v3.{minor}.0.json`, where the version indicates the time at which tests should be disabled. Note that the most recent release will only ever be relevant day-to-day.
|
||||
@ -1 +0,0 @@
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "enterprise/internal/insights",
|
||||
"prefix": "Test",
|
||||
"reason": "Code insights is deprecating TimescaleDB"
|
||||
},
|
||||
{
|
||||
"path": "internal/repos",
|
||||
"prefix": "TestIntegration",
|
||||
"reason": "TestIntegration/Syncer/MultipleServices failed with flake in https://buildkite.com/sourcegraph/sourcegraph/builds/125666#035ef196-3c58-4dc4-93d9-eabc97652d03."
|
||||
}
|
||||
]
|
||||
@ -1,12 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/database/migration/store",
|
||||
"prefix": "TestIndexStatus",
|
||||
"reason": "Failed with flake in https://buildkite.com/sourcegraph/sourcegraph/builds/133420."
|
||||
},
|
||||
{
|
||||
"path": "internal/database/connections/live",
|
||||
"prefix": "TestMigrations",
|
||||
"reason": "Breaking migration definition change (only affects self-validation of schemas, which does not affect backcompat at runtime) in https://github.com/sourcegraph/sourcegraph/pull/31782u."
|
||||
}
|
||||
]
|
||||
@ -1,22 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "enterprise/internal/database",
|
||||
"prefix": "TestCodeMonitorStoreLastSearched",
|
||||
"reason": "Feature is experimental and not enabled for any customers"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codemonitors",
|
||||
"prefix": "TestCodeMonitorHook",
|
||||
"reason": "Feature is experimental and not enabled for any customers"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUsers_CheckAndDecrementInviteQuota",
|
||||
"reason": "Test is written in a bad way (depends on default value definition, but does not affect backwards compatibility) in https://github.com/sourcegraph/sourcegraph/pull/33786."
|
||||
},
|
||||
{
|
||||
"path": "internal/database/migration/store",
|
||||
"prefix": "TestIndexStatus",
|
||||
"reason": "Flaky condition reported in https://github.com/sourcegraph/sourcegraph/issues/33837, fixed in https://github.com/sourcegraph/sourcegraph/pull/33843."
|
||||
}
|
||||
]
|
||||
@ -1,27 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "cmd/gitserver/server",
|
||||
"prefix": "TestCleanup_computeStats",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "cmd/gitserver/server",
|
||||
"prefix": "TestCleanup_setRepoSizes",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestIterateRepoGitserverStatus",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestSetRepoSize",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestListIndexableRepos",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
}
|
||||
]
|
||||
@ -1,32 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "cmd/gitserver/server",
|
||||
"prefix": "TestCleanup_computeStats",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "cmd/gitserver/server",
|
||||
"prefix": "TestCleanup_setRepoSizes",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestIterateRepoGitserverStatus",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestSetRepoSize",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestListIndexableRepos",
|
||||
"reason": "Database semantics changed: every created repo has a corresponding gitserver_repo entry right after being inserted in repo table (https://github.com/sourcegraph/sourcegraph/pull/35633)"
|
||||
},
|
||||
{
|
||||
"path": "internal/usagestats",
|
||||
"prefix": "TestGetBatchChangesUsageStatistics",
|
||||
"reason": "Flaky test, reflects disabling PR https://github.com/sourcegraph/sourcegraph/pull/36216 in the backcompat tests."
|
||||
}
|
||||
]
|
||||
@ -1,77 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/codeintel/dependencies/internal/store",
|
||||
"prefix": "TestLockfileDependencies",
|
||||
"reason": "A 2-column unique index has been changed to 3 columns to keep existing 'on conflict upsert' behaviour. We can't easily keep that backwards compatible since we can't keep the 2 and 3-column index and since NULL != NULL the 3-column index won't produce conflicts when only 2/3 columns are inserted."
|
||||
},
|
||||
{
|
||||
"path": "internal/codeintel/dependencies/internal/store",
|
||||
"prefix": "TestSelectRepoRevisionsToResolve",
|
||||
"reason": "A 2-column unique index has been changed to 3 columns to keep existing 'on conflict upsert' behaviour. We can't easily keep that backwards compatible since we can't keep the 2 and 3-column index and since NULL != NULL the 3-column index won't produce conflicts when only 2/3 columns are inserted."
|
||||
},
|
||||
{
|
||||
"path": "internal/codeintel/dependencies/internal/store",
|
||||
"prefix": "TestUpdateResolvedRevisions",
|
||||
"reason": "A 2-column unique index has been changed to 3 columns to keep existing 'on conflict upsert' behaviour. We can't easily keep that backwards compatible since we can't keep the 2 and 3-column index and since NULL != NULL the 3-column index won't produce conflicts when only 2/3 columns are inserted."
|
||||
},
|
||||
{
|
||||
"path": "internal/codeintel/dependencies/internal/store",
|
||||
"prefix": "TestLockfileDependents",
|
||||
"reason": "A 2-column unique index has been changed to 3 columns to keep existing 'on conflict upsert' behaviour. We can't easily keep that backwards compatible since we can't keep the 2 and 3-column index and since NULL != NULL the 3-column index won't produce conflicts when only 2/3 columns are inserted."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestEventLogs_CodeIntelligenceSettingsPageViewCounts",
|
||||
"reason": "Unclear why this is failing; disabling to unblock CI. Re-enabling tracked in https://github.com/sourcegraph/sourcegraph/issues/37623"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestScanFirstBitbucketProjectPermissionsJob",
|
||||
"reason": "Used SELECT * in test, which is not backwards compatible. The actual code doesn't."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestBitbucketProjectPermissionsEnqueue",
|
||||
"reason": "Used SELECT * in test, which is not backwards compatible. The actual code doesn't."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestBatchSpecWorkspaceResolver",
|
||||
"reason": "Forgot to add userIDs to some records in tests, which fails now but is backwards compatible for app code."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestBatchSpecResolver_BatchSpecCreatedFromRaw",
|
||||
"reason": "Forgot to add userIDs to some records in tests, which fails now but is backwards compatible for app code."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/service",
|
||||
"prefix": "TestService",
|
||||
"reason": "Forgot to add userIDs to some records in tests, which fails now but is backwards compatible for app code."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestBatchSpecWorkspaceExecutionWorkerStore_MarkComplete",
|
||||
"reason": "Forgot to add userIDs to some records in tests, which fails now but is backwards compatible for app code."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestBatchSpecWorkspaceExecutionWorkerStore_MarkFailed",
|
||||
"reason": "Forgot to add userIDs to some records in tests, which fails now but is backwards compatible for app code."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestBatchSpecWorkspaceExecutionWorkerStore_MarkComplete_EmptyDiff",
|
||||
"reason": "Forgot to add userIDs to some records in tests, which fails now but is backwards compatible for app code."
|
||||
},
|
||||
{
|
||||
"path": "internal/usagestats",
|
||||
"prefix": "TestGetBatchChangesUsageStatistics",
|
||||
"reason": "Fixed up DB constraints, now the test inserts invalid test data."
|
||||
},
|
||||
{
|
||||
"path": "dev/sg/internal/check",
|
||||
"prefix": "RunnerInteractive",
|
||||
"reason": "Flake was only fixed after 3.41, doesn't interact with databases anyway."
|
||||
}
|
||||
]
|
||||
@ -1,52 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/usagestats",
|
||||
"prefix": "TestGetBatchChangesUsageStatistics",
|
||||
"reason": "Fixed up DB constraints, now the test inserts invalid test data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestPublishChangesets",
|
||||
"reason": "New DB structure doesn't work with old test helper data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestReenqueueChangesets",
|
||||
"reason": "New DB structure doesn't work with old test helper data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/processor",
|
||||
"prefix": "TestBulkProcessor",
|
||||
"reason": "New DB structure doesn't work with old test helper data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/service",
|
||||
"prefix": "TestService",
|
||||
"reason": "New DB structure doesn't work with old test helper data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestIntegration",
|
||||
"reason": "New DB structure doesn't work with old test helper data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestCancelQueuedBatchChangeChangesets",
|
||||
"reason": "New DB structure doesn't work with old test helper data."
|
||||
},
|
||||
{
|
||||
"path": "lib/group",
|
||||
"prefix": "ResultErrorGroup",
|
||||
"reason": "A flaky test that was made unflaky after the release cut"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestDBTransactions",
|
||||
"reason": "This test was fixed in 3d51294 but the fix not make it into 3.42.0. It causes the whole test suite to deadlock and that deadlocks shows up reliably in this test."
|
||||
},
|
||||
{
|
||||
"path": "internal/database/basestore",
|
||||
"prefix": "TestConcurrentTransactions",
|
||||
"reason": "Related test (see above) was fixed in 3d51294 but did not make it into 3.42.0. It causes the whole test suite to deadlock and that deadlocks shows up reliably in this test."
|
||||
}
|
||||
]
|
||||
@ -1,262 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUsers_ValidUsernames",
|
||||
"reason": "The username column constraint has been updated to allow underscores. The change is not auto-reversible."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/webhooks",
|
||||
"prefix": "TestWebhooksIntegration",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/worker/internal/batches/workers",
|
||||
"prefix": "TestBatchSpecWorkspaceCreatorProcess_Caching",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/worker/internal/batches/workers",
|
||||
"prefix": "TestBatchSpecWorkspaceCreatorProcess_Importing",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/worker/internal/batches/workers",
|
||||
"prefix": "TestBatchSpecWorkspaceCreatorProcess_NoDiff",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/worker/internal/batches/workers",
|
||||
"prefix": "TestReconcilerWorkerView",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/worker/internal/batches/workers",
|
||||
"prefix": "TestReconcilerWorkerView",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "internal/usagestats",
|
||||
"prefix": "TestGetBatchChangesUsageStatistics",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestBatchSpecResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestBatchSpecResolver_BatchSpecCreatedFromRaw",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestBulkOperationConnectionResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestBulkOperationResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetApplyPreviewConnectionResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetApplyPreviewResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetApplyPreviewResolverWithPublicationStates",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetConnectionResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetCountsOverTimeIntegration",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetEventConnectionResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetSpecConnectionResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetSpecResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetResolver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestPermissionLevels",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestRepositoryPermissions",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestCreateBatchSpec",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestCreateChangesetSpec",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestApplyBatchChange",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestCreateEmptyBatchChange",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestUpsertEmptyBatchChange",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestCreateBatchChange",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestApplyOrCreateBatchSpecWithPublicationStates",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestApplyBatchChangeWithLicenseFail",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestCreateChangesetComments",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestReenqueueChangesets",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestMergeChangesets",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestCloseChangesets",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestPublishChangesets",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/processor",
|
||||
"prefix": "TestBulkProcessor",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/reconciler",
|
||||
"prefix": "TestExecutor_ExecutePlan",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/reconciler",
|
||||
"prefix": "TestExecutor_ExecutePlan_PublishedChangesetDuplicateBranch",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/reconciler",
|
||||
"prefix": "TestExecutor_ExecutePlan_AvoidLoadingChangesetSource",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/reconciler",
|
||||
"prefix": "TestExecutor_UserCredentialsForGitserver",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/reconciler",
|
||||
"prefix": "TestReconcilerProcess_IntegrationTest",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/service",
|
||||
"prefix": "TestServiceApplyBatchChange",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/service",
|
||||
"prefix": "TestServicePermissionLevels",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/service",
|
||||
"prefix": "TestService",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestStore_ListBatchSpecRepoIDs",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestCancelQueuedBatchChangeChangesets",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestEnqueueChangesetsToClose",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestCleanDetachedChangesets",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestBatchSpecWorkspaceExecutionWorkerStore_MarkComplete",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestBatchSpecWorkspaceExecutionWorkerStore_MarkComplete_EmptyDiff",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestIntegration",
|
||||
"reason": "Removed the `diff_stat_changed` column from changeset and changeset_specs table."
|
||||
}
|
||||
]
|
||||
@ -1,12 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUsers_ValidUsernames",
|
||||
"reason": "The username column constraint has been updated to allow underscores. The change is not auto-reversible."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetApplyPreviewResolverWithPublicationStates",
|
||||
"reason": "A constraint has been added to the published column to prevent string 'null' values. The test tries to set a 'null' string value on the row."
|
||||
}
|
||||
]
|
||||
@ -1,58 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/codeintel/policies/internal/store",
|
||||
"prefix": "TestSelectPoliciesForRepositoryMembershipUpdate",
|
||||
"reason": "The same policies are returned but in an unexpected order."
|
||||
},
|
||||
{
|
||||
"path": "internal/gitserver",
|
||||
"prefix": "TestLFSSmudge",
|
||||
"reason": "Git config seems to be borked after introduction of https://github.com/sourcegraph/sourcegraph/pull/43227"
|
||||
},
|
||||
{
|
||||
"path": "github.com/sourcegraph/sourcegraph/internal/repos",
|
||||
"prefix": "EnqueueWebhookBuildJob",
|
||||
"reason": "Flakes repeatedly in CI"
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookCreate",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookDelete",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookUpdate",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookCount",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookList",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestGetByID",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestGetByUUID",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestIntegration",
|
||||
"reason": "Added a UNIQUE constraint on batch_specs.rand_id and changeset_specs.rand_id, some tests fail because we had some duplicate Rand ID creation in tests."
|
||||
}
|
||||
]
|
||||
@ -1,57 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "cmd/frontend/webhooks",
|
||||
"prefix": "TestWebhooksHandler",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookCount",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookList",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookCreate",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookDelete",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookUpdate",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestWebhookLogStore",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestGetByID",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestGetByUUID",
|
||||
"reason": "New NOT NULL `name` column is added. The test is trying to add an entry without populating this column."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestIntegration",
|
||||
"reason": "Added a UNIQUE constraint on batch_specs.rand_id and changeset_specs.rand_id, some tests fail because we had some duplicate Rand ID creation in tests."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/batches/syncer",
|
||||
"prefix": "SyncerRun/Sync_due_but_reenqueued_when_namespace_deleted",
|
||||
"reason": "Test expectation is too narrow and is broken by new logging code"
|
||||
}
|
||||
]
|
||||
@ -1,82 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "enterprise/internal/batches/store",
|
||||
"prefix": "TestIntegration",
|
||||
"reason": "Added a UNIQUE constraint on batch_specs.rand_id and changeset_specs.rand_id, some tests fail because we had some duplicate Rand ID creation in tests."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/webhooks",
|
||||
"prefix": "TestWebhooksIntegration",
|
||||
"reason": "Test was having incomplete data, fails now that constraints are in place"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetApplyPreviewResolverWithPublicationStates",
|
||||
"reason": "Test was having incomplete data, fails now that constraints are in place"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestChangesetCountsOverTimeIntegration",
|
||||
"reason": "Test was having incomplete data, fails now that constraints are in place"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/batches/resolvers",
|
||||
"prefix": "TestRepositoryPermissions",
|
||||
"reason": "Test was having incomplete data, fails now that constraints are in place"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestDatabaseExists",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestDatabaseHover",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestDatabaseDefinitions",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestDatabaseReferences",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestDatabaseMonikersByPosition",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestGetBulkMonikerLocations",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestGetPackageInformation",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestGetRanges",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "TestStencil",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/uploads/internal/lsifstore",
|
||||
"prefix": "TestWriteSCIPSymbols",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/oobmigration/migrations/codeintel",
|
||||
"prefix": "TestSCIPMigrator",
|
||||
"reason": "Dropped symbol_name column on codeintel_scip_symbols"
|
||||
}
|
||||
]
|
||||
@ -1,142 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByRoleIDAndPermissionID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByRoleID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByPermissionID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleList/basic_no_opts",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleList/with_pagination",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleList",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleCount",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleUpdate",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleUpdate/non-existent_role",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleUpdate/existing_role",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUserRoleGetByRoleIDAndUserID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUserRoleGetByUserID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUserRoleCreate",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUserRoleDelete",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUserRoleDelete/existing_role",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestUserRoleGetByRoleID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionCreate",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleDelete",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleDelete/existing_role",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByRoleIDAndPermissionID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByRoleID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByPermissionID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionGetByRoleID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleGetByID",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRolePermissionDelete",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRoleCreate",
|
||||
"reason": "The column `readonly` has been renamed to `system`, pre 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestPermissionSyncJobs_CreateAndList",
|
||||
"reason": "The column boolean column`high_priority` has been replaced by numeric column `priority`. Table not in use for 4.4."
|
||||
},
|
||||
{
|
||||
"path": "internal/adminanalytics",
|
||||
"prefix": "TestMonthlyActiveUsersLast3Month",
|
||||
"reason": "Month subtraction produces inconsistent results, see https://github.com/sourcegraph/sourcegraph/issues/47152"
|
||||
}
|
||||
]
|
||||
@ -1,52 +0,0 @@
|
||||
[
|
||||
{
|
||||
"path": "internal/codeintel/dependencies/internal/store",
|
||||
"prefix": "TestListPackageRepoRefs",
|
||||
"reason": "References a column directly in the test that is being dropped post 4.5. No application code references the column"
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
|
||||
"prefix": "Test",
|
||||
"reason": "Removing LSIF tables that no longer contain data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/uploads/internal/lsifstore",
|
||||
"prefix": "Test",
|
||||
"reason": "Removing LSIF tables that no longer contain data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/oobmigration/migrations/codeintel",
|
||||
"prefix": "Test",
|
||||
"reason": "Removing LSIF tables that no longer contain data."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/ranking/internal/store",
|
||||
"prefix": "TestDocumentRanks",
|
||||
"reason": "Changed format of table in a feature that wasn't enabled."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/ranking/internal/store",
|
||||
"prefix": "TestBulkSetAndMergeDocumentRanks",
|
||||
"reason": "Changed format of table in a feature that wasn't enabled."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/ranking/internal/store",
|
||||
"prefix": "TestLastUpdatedAt",
|
||||
"reason": "Changed format of table in a feature that wasn't enabled."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/internal/codeintel/ranking/internal/store",
|
||||
"prefix": "TestUpdatedAfter",
|
||||
"reason": "Changed format of table in a feature that wasn't enabled."
|
||||
},
|
||||
{
|
||||
"path": "internal/database",
|
||||
"prefix": "TestRepos_List_LastChanged",
|
||||
"reason": "Changed format of table in a feature that wasn't enabled."
|
||||
},
|
||||
{
|
||||
"path": "enterprise/cmd/frontend/internal/rbac/resolvers",
|
||||
"prefix": "TestCreateRole",
|
||||
"reason": "Changed the column type for role names from `text` to `citext` and introduced a new unique index for the column."
|
||||
}
|
||||
]
|
||||
@ -1,62 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/keegancsmith/sqlf"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/migration/definition"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/migration/schemas"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) != 2 {
|
||||
panic("expected temp directory as argument")
|
||||
}
|
||||
tempDirectory := os.Args[1]
|
||||
|
||||
contents := map[string]string{}
|
||||
for _, schema := range schemas.Schemas {
|
||||
for _, def := range schema.Definitions.All() {
|
||||
metadata, err := renderMetadata(def)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
||||
migrationDirectory := filepath.Join(tempDirectory, schema.Name, strconv.Itoa(def.ID))
|
||||
|
||||
contents[filepath.Join(migrationDirectory, "metadata.yaml")] = string(metadata)
|
||||
contents[filepath.Join(migrationDirectory, "up.sql")] = def.UpQuery.Query(sqlf.PostgresBindVar)
|
||||
contents[filepath.Join(migrationDirectory, "down.sql")] = def.DownQuery.Query(sqlf.PostgresBindVar)
|
||||
}
|
||||
}
|
||||
|
||||
for path, contents := range contents {
|
||||
if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
||||
if err := os.WriteFile(path, []byte(contents), os.FileMode(0644)); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func renderMetadata(definition definition.Definition) ([]byte, error) {
|
||||
return yaml.Marshal(struct {
|
||||
Name string `yaml:"name"`
|
||||
Parents []int `yaml:"parents"`
|
||||
CreateIndexConcurrently bool `yaml:"createIndexConcurrently"`
|
||||
Privileged bool `yaml:"privileged"`
|
||||
NonIdempotent bool `yaml:"nonIdempotent"`
|
||||
}{
|
||||
Name: definition.Name,
|
||||
Parents: definition.Parents,
|
||||
CreateIndexConcurrently: definition.IsCreateIndexConcurrently,
|
||||
Privileged: definition.Privileged,
|
||||
NonIdempotent: definition.NonIdempotent,
|
||||
})
|
||||
}
|
||||
@ -1,165 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script runs the go-build.sh in a clone of the previous minor release as part
|
||||
# of the continuous backwards compatibility regression tests.
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/../../../"
|
||||
set -eu
|
||||
|
||||
MIGRATION_STAGING=$(mktemp -d -t sgdockerbuild_XXXXXXX)
|
||||
cleanup() {
|
||||
rm -rf "$MIGRATION_STAGING"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# `disable_test ${path} ${prefix}` rewrites `func ${prefix}` to `func _${prefix}`
|
||||
# in the given Go test file. This will return 1 if there was a matching test and
|
||||
# return 0 otherwise.
|
||||
function disable_test() {
|
||||
sed -i_bak "s/func ${2}/func _${2}/g" "${1}"
|
||||
|
||||
local ret=1
|
||||
if diff "${1}" "${1}_bak" >/dev/null; then
|
||||
ret=0 # no diff
|
||||
fi
|
||||
|
||||
rm "${1}_bak"
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
# `disable_test_file ${path} ${prefix}` rewrites `func ${prefix}` to `func _${prefix}`
|
||||
# in the given Go test file. If there is no matching test, an unknown test message is
|
||||
# displayed and the script is halted with exit code 1.
|
||||
function disable_test_file() {
|
||||
if disable_test "${1}" "${2}"; then
|
||||
echo "Unknown test in ${1}: ${2}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# `disable_test_dir ${path} ${prefix}` rewrites `func ${prefix}` to `func _${prefix}`
|
||||
# in all Go test files under the given path.
|
||||
function disable_test_dir() {
|
||||
local num_changed=0
|
||||
|
||||
while read -r path; do
|
||||
if ! disable_test "${path}" "${2}"; then
|
||||
num_changed=$((num_changed + 1))
|
||||
fi
|
||||
done < <(find "${1}" -name '*_test.go' -type f)
|
||||
|
||||
if [ ${num_changed} -eq 0 ]; then
|
||||
echo "Unknown test in ${1}: ${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
# `disable_test_path ${path} ${prefix}`
|
||||
function disable_test_path() {
|
||||
echo "Disabling test '${2}*' in ${1}"
|
||||
|
||||
if [ -d "${1}" ]; then
|
||||
disable_test_dir "${1}" "${2}"
|
||||
elif [ -f "${1}" ]; then
|
||||
disable_test_file "${1}" "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
current_head=$(git rev-parse HEAD)
|
||||
latest_minor_release_tag="v${MINIMUM_UPGRADEABLE_VERSION}"
|
||||
flakefile="./dev/ci/go-backcompat/flakefiles/${latest_minor_release_tag}.json"
|
||||
|
||||
# Early exit
|
||||
if git diff --quiet "${latest_minor_release_tag}".."${current_head}" migrations; then
|
||||
echo "--- No schema changes"
|
||||
echo "No schema changes since last minor release"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "--- Running backwards compatibility tests"
|
||||
echo "current_head = ${current_head}"
|
||||
echo "latest_minor_release_tag = ${latest_minor_release_tag}"
|
||||
echo ""
|
||||
echo "Running Go tests to test database schema backwards compatibility:"
|
||||
echo "- database schemas are defined at HEAD / ${current_head}, and"
|
||||
echo "- unit tests are defined at the last minor release ${latest_minor_release_tag}."
|
||||
echo ""
|
||||
echo "New failures of these tests indicate that new changes to the"
|
||||
echo "database schema do not allow for continued proper operation of"
|
||||
echo "Sourcegraph instances deployed at the previous release."
|
||||
echo ""
|
||||
|
||||
PROTECTED_FILES=(
|
||||
./dev/ci/go-test.sh
|
||||
./dev/ci/go-backcompat
|
||||
./dev/ci/asdf-install.sh
|
||||
./internal/database/migration/definition/read.go
|
||||
)
|
||||
|
||||
# Rewrite the current migrations into a temporary folder that we can force
|
||||
# apply over old code.
|
||||
go run ./dev/ci/go-backcompat/reorganize.go "${MIGRATION_STAGING}"
|
||||
|
||||
# Check out the previous code then immediately restore whatever
|
||||
# the current version of the protected files are.
|
||||
git checkout "${latest_minor_release_tag}"
|
||||
git checkout "${current_head}" -- "${PROTECTED_FILES[@]}"
|
||||
|
||||
# Remove the languages submodules, because they mess these tests up
|
||||
rm -rf ./docker-images/syntax-highlighter/crates/sg-syntax/languages/
|
||||
|
||||
for schema in frontend codeintel codeinsights; do
|
||||
# Force apply newer schema definitions
|
||||
rm -rf "./migrations/${schema}"
|
||||
mv "${MIGRATION_STAGING}/${schema}" "./migrations/${schema}"
|
||||
done
|
||||
|
||||
# If migration files have been renamed or deleted between these commits
|
||||
# (which historically we've done in response to reverted migrations), we
|
||||
# might end up with a combination of files from both commits that ruin
|
||||
# some of the assumptions we make (unique prefix ID being one major one).
|
||||
# We delete this directory first prior to the checkout so that we don't
|
||||
# have any current state in the migrations directory to mess us up in this
|
||||
# way.
|
||||
|
||||
if [ -f "${flakefile}" ]; then
|
||||
echo ""
|
||||
echo "Disabling tests listed in flakefile ${flakefile}"
|
||||
|
||||
pairs=$(jq -r '.[] | "\(.path):\(.prefix)"' <"${flakefile}")
|
||||
for pair in $pairs; do
|
||||
IFS=' ' read -ra parts <<<"${pair/:/ }"
|
||||
disable_test_path "${parts[0]}" "${parts[1]}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Re-run asdf to ensure we have the correct set of utilities to
|
||||
# run the currently checked out version of the Go unit tests.
|
||||
echo "--- asdf install checked out tools"
|
||||
./dev/ci/asdf-install.sh
|
||||
go version
|
||||
|
||||
echo "--- run tests"
|
||||
if ! ./dev/ci/go-test.sh "$@"; then
|
||||
annotation=$(
|
||||
cat <<EOF
|
||||
This commit contains database schema definitions that caused an unexpected
|
||||
failure of one or more unit tests at tagged commit \`${latest_minor_release_tag}\`.
|
||||
Rewrite these schema changes to be backwards compatible. For help,
|
||||
see [the migrations guide](https://docs.sourcegraph.com/dev/background-information/sql/migrations).
|
||||
|
||||
If this backwards incompatibility is intentional or if the test is flaky,
|
||||
an exception for this test can be added to the following flakefile:
|
||||
|
||||
\`\`\`
|
||||
${flakefile}
|
||||
\`\`\`
|
||||
|
||||
⚠️ If by the time you are adding an exception, the release has already been cut, but it has not
|
||||
been published yet, the best course of action is to postpone merging the commit creating the issue
|
||||
until the release process is complete.
|
||||
EOF
|
||||
)
|
||||
mkdir -p ./annotations/
|
||||
echo "$annotation" | tee './annotations/go-backcompat.md'
|
||||
exit 1
|
||||
fi
|
||||
@ -16,13 +16,13 @@ The default run type.
|
||||
|
||||
- Pipeline for `Go` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `Client` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Integration tests for the Cody VS Code extension, ESLint (all), ESLint (web), Stylelint (all)
|
||||
- **Pipeline setup**: Trigger async
|
||||
@ -30,79 +30,78 @@ The default run type.
|
||||
|
||||
- Pipeline for `GraphQL` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Integration tests for the Cody VS Code extension, ESLint (all), ESLint (web), Stylelint (all)
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `DatabaseSchema` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **DB backcompat tests**: Backcompat test (all), Backcompat test (all (gRPC)), Backcompat test (enterprise/internal/insights), Backcompat test (enterprise/internal/insights (gRPC)), Backcompat test (internal/repos), Backcompat test (internal/repos (gRPC)), Backcompat test (enterprise/internal/batches), Backcompat test (enterprise/internal/batches (gRPC)), Backcompat test (cmd/frontend), Backcompat test (cmd/frontend (gRPC)), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Backcompat test (dev/sg), Backcompat test (dev/sg (gRPC)), Backcompat test (internal/database), Backcompat test (enterprise/internal/database)
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `Docs` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `Dockerfiles` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `ExecutorVMImage` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `ExecutorDockerRegistryMirror` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `CIScripts` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **CI script tests**: test-trace-command.sh
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `Terraform` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `SVG` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `Shell` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `DockerImages` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `WolfiPackages` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `WolfiBaseImages` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
- Pipeline for `Protobuf` changes:
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- Upload build trace
|
||||
|
||||
@ -118,7 +117,7 @@ sg ci build bzl
|
||||
Base pipeline (more steps might be included based on branch changes):
|
||||
|
||||
- **Metadata**: Pipeline metadata
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- Upload build trace
|
||||
|
||||
### Wolfi Exp Branch
|
||||
@ -201,10 +200,9 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- **Pipeline setup**: Trigger async
|
||||
- **Image builds**: Build alpine-3.14, Build cadvisor, Build codeinsights-db, Build codeintel-db, Build frontend, Build github-proxy, Build gitserver, Build grafana, Build indexed-searcher, Build jaeger-agent, Build jaeger-all-in-one, Build blobstore, Build blobstore2, Build node-exporter, Build postgres-12-alpine, Build postgres_exporter, Build precise-code-intel-worker, Build prometheus, Build prometheus-gcp, Build redis-cache, Build redis-store, Build redis_exporter, Build repo-updater, Build search-indexer, Build searcher, Build symbols, Build syntax-highlighter, Build worker, Build migrator, Build executor, Build executor-kubernetes, Build executor-vm, Build batcheshelper, Build opentelemetry-collector, Build embeddings, Build dind, Build bundled-executor, Build server, Build sg, Build llm-proxy, Build executor image, Build executor binary, Build docker registry mirror image
|
||||
- **Image security scans**: Scan alpine-3.14, Scan cadvisor, Scan codeinsights-db, Scan codeintel-db, Scan frontend, Scan github-proxy, Scan gitserver, Scan grafana, Scan indexed-searcher, Scan jaeger-agent, Scan jaeger-all-in-one, Scan blobstore2, Scan node-exporter, Scan postgres-12-alpine, Scan postgres_exporter, Scan precise-code-intel-worker, Scan prometheus, Scan prometheus-gcp, Scan redis-cache, Scan redis-store, Scan redis_exporter, Scan repo-updater, Scan search-indexer, Scan searcher, Scan symbols, Scan syntax-highlighter, Scan worker, Scan migrator, Scan executor, Scan executor-kubernetes, Scan executor-vm, Scan batcheshelper, Scan opentelemetry-collector, Scan embeddings, Scan dind, Scan bundled-executor, Scan sg, Scan llm-proxy
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Integration tests for the Cody VS Code extension, ESLint (all), ESLint (web), Stylelint (all)
|
||||
- **DB backcompat tests**: Backcompat test (all), Backcompat test (all (gRPC)), Backcompat test (enterprise/internal/insights), Backcompat test (enterprise/internal/insights (gRPC)), Backcompat test (internal/repos), Backcompat test (internal/repos (gRPC)), Backcompat test (enterprise/internal/batches), Backcompat test (enterprise/internal/batches (gRPC)), Backcompat test (cmd/frontend), Backcompat test (cmd/frontend (gRPC)), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Backcompat test (dev/sg), Backcompat test (dev/sg (gRPC)), Backcompat test (internal/database), Backcompat test (enterprise/internal/database)
|
||||
- **CI script tests**: test-trace-command.sh
|
||||
- **Integration tests**: Backend integration tests (gRPC), Backend integration tests, Code Intel QA
|
||||
- **End-to-end tests**: Executors E2E, Sourcegraph E2E, Sourcegraph QA, Sourcegraph Cluster (deploy-sourcegraph) QA, Sourcegraph Upgrade
|
||||
@ -221,10 +219,9 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- **Pipeline setup**: Trigger async
|
||||
- **Image builds**: Build alpine-3.14, Build cadvisor, Build codeinsights-db, Build codeintel-db, Build frontend, Build github-proxy, Build gitserver, Build grafana, Build indexed-searcher, Build jaeger-agent, Build jaeger-all-in-one, Build blobstore, Build blobstore2, Build node-exporter, Build postgres-12-alpine, Build postgres_exporter, Build precise-code-intel-worker, Build prometheus, Build prometheus-gcp, Build redis-cache, Build redis-store, Build redis_exporter, Build repo-updater, Build search-indexer, Build searcher, Build symbols, Build syntax-highlighter, Build worker, Build migrator, Build executor, Build executor-kubernetes, Build executor-vm, Build batcheshelper, Build opentelemetry-collector, Build embeddings, Build dind, Build bundled-executor, Build server, Build sg, Build llm-proxy, Build executor image, Build executor binary, Build docker registry mirror image
|
||||
- **Image security scans**: Scan alpine-3.14, Scan cadvisor, Scan codeinsights-db, Scan codeintel-db, Scan frontend, Scan github-proxy, Scan gitserver, Scan grafana, Scan indexed-searcher, Scan jaeger-agent, Scan jaeger-all-in-one, Scan blobstore2, Scan node-exporter, Scan postgres-12-alpine, Scan postgres_exporter, Scan precise-code-intel-worker, Scan prometheus, Scan prometheus-gcp, Scan redis-cache, Scan redis-store, Scan redis_exporter, Scan repo-updater, Scan search-indexer, Scan searcher, Scan symbols, Scan syntax-highlighter, Scan worker, Scan migrator, Scan executor, Scan executor-kubernetes, Scan executor-vm, Scan batcheshelper, Scan opentelemetry-collector, Scan embeddings, Scan dind, Scan bundled-executor, Scan sg, Scan llm-proxy
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Integration tests for the Cody VS Code extension, ESLint (all), ESLint (web), Stylelint (all)
|
||||
- **DB backcompat tests**: Backcompat test (all), Backcompat test (all (gRPC)), Backcompat test (enterprise/internal/insights), Backcompat test (enterprise/internal/insights (gRPC)), Backcompat test (internal/repos), Backcompat test (internal/repos (gRPC)), Backcompat test (enterprise/internal/batches), Backcompat test (enterprise/internal/batches (gRPC)), Backcompat test (cmd/frontend), Backcompat test (cmd/frontend (gRPC)), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Backcompat test (dev/sg), Backcompat test (dev/sg (gRPC)), Backcompat test (internal/database), Backcompat test (enterprise/internal/database)
|
||||
- **CI script tests**: test-trace-command.sh
|
||||
- **Integration tests**: Backend integration tests (gRPC), Backend integration tests, Code Intel QA
|
||||
- **End-to-end tests**: Executors E2E, Sourcegraph E2E, Sourcegraph QA, Sourcegraph Cluster (deploy-sourcegraph) QA, Sourcegraph Upgrade
|
||||
@ -285,10 +282,9 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- **Pipeline setup**: Trigger async
|
||||
- **Image builds**: Build alpine-3.14, Build cadvisor, Build codeinsights-db, Build codeintel-db, Build frontend, Build github-proxy, Build gitserver, Build grafana, Build indexed-searcher, Build jaeger-agent, Build jaeger-all-in-one, Build blobstore, Build blobstore2, Build node-exporter, Build postgres-12-alpine, Build postgres_exporter, Build precise-code-intel-worker, Build prometheus, Build prometheus-gcp, Build redis-cache, Build redis-store, Build redis_exporter, Build repo-updater, Build search-indexer, Build searcher, Build symbols, Build syntax-highlighter, Build worker, Build migrator, Build executor, Build executor-kubernetes, Build executor-vm, Build batcheshelper, Build opentelemetry-collector, Build embeddings, Build dind, Build bundled-executor, Build server, Build sg, Build llm-proxy, Build executor image, Build executor binary
|
||||
- **Image security scans**: Scan alpine-3.14, Scan cadvisor, Scan codeinsights-db, Scan codeintel-db, Scan frontend, Scan github-proxy, Scan gitserver, Scan grafana, Scan indexed-searcher, Scan jaeger-agent, Scan jaeger-all-in-one, Scan blobstore2, Scan node-exporter, Scan postgres-12-alpine, Scan postgres_exporter, Scan precise-code-intel-worker, Scan prometheus, Scan prometheus-gcp, Scan redis-cache, Scan redis-store, Scan redis_exporter, Scan repo-updater, Scan search-indexer, Scan searcher, Scan symbols, Scan syntax-highlighter, Scan worker, Scan migrator, Scan executor, Scan executor-kubernetes, Scan executor-vm, Scan batcheshelper, Scan opentelemetry-collector, Scan embeddings, Scan dind, Scan bundled-executor, Scan sg, Scan llm-proxy
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Integration tests for the Cody VS Code extension, ESLint (all), ESLint (web), Stylelint (all)
|
||||
- **DB backcompat tests**: Backcompat test (all), Backcompat test (all (gRPC)), Backcompat test (enterprise/internal/insights), Backcompat test (enterprise/internal/insights (gRPC)), Backcompat test (internal/repos), Backcompat test (internal/repos (gRPC)), Backcompat test (enterprise/internal/batches), Backcompat test (enterprise/internal/batches (gRPC)), Backcompat test (cmd/frontend), Backcompat test (cmd/frontend (gRPC)), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Backcompat test (dev/sg), Backcompat test (dev/sg (gRPC)), Backcompat test (internal/database), Backcompat test (enterprise/internal/database)
|
||||
- **CI script tests**: test-trace-command.sh
|
||||
- **Integration tests**: Backend integration tests (gRPC), Backend integration tests, Code Intel QA
|
||||
- **End-to-end tests**: Executors E2E, Sourcegraph E2E, Sourcegraph QA, Sourcegraph Cluster (deploy-sourcegraph) QA, Sourcegraph Upgrade
|
||||
@ -310,10 +306,9 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- **Pipeline setup**: Trigger async
|
||||
- **Image builds**: Build alpine-3.14, Build cadvisor, Build codeinsights-db, Build codeintel-db, Build frontend, Build github-proxy, Build gitserver, Build grafana, Build indexed-searcher, Build jaeger-agent, Build jaeger-all-in-one, Build blobstore, Build blobstore2, Build node-exporter, Build postgres-12-alpine, Build postgres_exporter, Build precise-code-intel-worker, Build prometheus, Build prometheus-gcp, Build redis-cache, Build redis-store, Build redis_exporter, Build repo-updater, Build search-indexer, Build searcher, Build symbols, Build syntax-highlighter, Build worker, Build migrator, Build executor, Build executor-kubernetes, Build executor-vm, Build batcheshelper, Build opentelemetry-collector, Build embeddings, Build dind, Build bundled-executor, Build server, Build sg, Build llm-proxy, Build executor image, Build executor binary
|
||||
- **Image security scans**: Scan alpine-3.14, Scan cadvisor, Scan codeinsights-db, Scan codeintel-db, Scan frontend, Scan github-proxy, Scan gitserver, Scan grafana, Scan indexed-searcher, Scan jaeger-agent, Scan jaeger-all-in-one, Scan blobstore2, Scan node-exporter, Scan postgres-12-alpine, Scan postgres_exporter, Scan precise-code-intel-worker, Scan prometheus, Scan prometheus-gcp, Scan redis-cache, Scan redis-store, Scan redis_exporter, Scan repo-updater, Scan search-indexer, Scan searcher, Scan symbols, Scan syntax-highlighter, Scan worker, Scan migrator, Scan executor, Scan executor-kubernetes, Scan executor-vm, Scan batcheshelper, Scan opentelemetry-collector, Scan embeddings, Scan dind, Scan bundled-executor, Scan sg, Scan llm-proxy
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests
|
||||
- **Bazel**: Ensure buildfiles are up to date, Tests, BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Integration tests for the Cody VS Code extension, ESLint (all), ESLint (web), Stylelint (all)
|
||||
- **DB backcompat tests**: Backcompat test (all), Backcompat test (all (gRPC)), Backcompat test (enterprise/internal/insights), Backcompat test (enterprise/internal/insights (gRPC)), Backcompat test (internal/repos), Backcompat test (internal/repos (gRPC)), Backcompat test (enterprise/internal/batches), Backcompat test (enterprise/internal/batches (gRPC)), Backcompat test (cmd/frontend), Backcompat test (cmd/frontend (gRPC)), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Backcompat test (dev/sg), Backcompat test (dev/sg (gRPC)), Backcompat test (internal/database), Backcompat test (enterprise/internal/database)
|
||||
- **CI script tests**: test-trace-command.sh
|
||||
- **Integration tests**: Backend integration tests (gRPC), Backend integration tests, Code Intel QA
|
||||
- **End-to-end tests**: Executors E2E, Sourcegraph E2E, Sourcegraph QA, Sourcegraph Cluster (deploy-sourcegraph) QA, Sourcegraph Upgrade
|
||||
@ -393,5 +388,4 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Backend integration tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Go checks**: Test (all), Test (all (gRPC)), Test (enterprise/internal/insights), Test (enterprise/internal/insights (gRPC)), Test (internal/repos), Test (internal/repos (gRPC)), Test (enterprise/internal/batches), Test (enterprise/internal/batches (gRPC)), Test (cmd/frontend), Test (cmd/frontend (gRPC)), Test (enterprise/cmd/frontend/internal/batches/resolvers), Test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Test (dev/sg), Test (dev/sg (gRPC)), Test (internal/database), Test (enterprise/internal/database), Build
|
||||
- **DB backcompat tests**: Backcompat test (all), Backcompat test (all (gRPC)), Backcompat test (enterprise/internal/insights), Backcompat test (enterprise/internal/insights (gRPC)), Backcompat test (internal/repos), Backcompat test (internal/repos (gRPC)), Backcompat test (enterprise/internal/batches), Backcompat test (enterprise/internal/batches (gRPC)), Backcompat test (cmd/frontend), Backcompat test (cmd/frontend (gRPC)), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers), Backcompat test (enterprise/cmd/frontend/internal/batches/resolvers (gRPC)), Backcompat test (dev/sg), Backcompat test (dev/sg (gRPC)), Backcompat test (internal/database), Backcompat test (enterprise/internal/database)
|
||||
- Upload build trace
|
||||
|
||||
@ -12,6 +12,13 @@ func BazelOperations() *operations.Set {
|
||||
ops := operations.NewNamedSet("Bazel")
|
||||
ops.Append(bazelConfigure())
|
||||
ops.Append(bazelTest("//..."))
|
||||
ops.Append(bazelBackCompatTest(
|
||||
"@sourcegraph_back_compat//cmd/...",
|
||||
"@sourcegraph_back_compat//lib/...",
|
||||
"@sourcegraph_back_compat//internal/...",
|
||||
"@sourcegraph_back_compat//enterprise/cmd/...",
|
||||
"@sourcegraph_back_compat//enterprise/internal/...",
|
||||
))
|
||||
return ops
|
||||
}
|
||||
|
||||
@ -88,6 +95,28 @@ func bazelTest(targets ...string) func(*bk.Pipeline) {
|
||||
}
|
||||
}
|
||||
|
||||
func bazelBackCompatTest(targets ...string) func(*bk.Pipeline) {
|
||||
cmds := []bk.StepOpt{
|
||||
bk.DependsOn("bazel-configure"),
|
||||
bk.Agent("queue", "bazel"),
|
||||
|
||||
// Generate a patch that backports the migration from the new code into the old one.
|
||||
bk.RawCmd("git diff origin/ci/backcompat-v5.0.0..HEAD -- migrations/ > dev/backcompat/patches/back_compat_migrations.patch"),
|
||||
}
|
||||
|
||||
bazelRawCmd := bazelRawCmd(fmt.Sprintf("test %s", strings.Join(targets, " ")))
|
||||
cmds = append(
|
||||
cmds,
|
||||
bk.RawCmd(bazelRawCmd),
|
||||
)
|
||||
|
||||
return func(pipeline *bk.Pipeline) {
|
||||
pipeline.AddStep(":bazel: BackCompat Tests",
|
||||
cmds...,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
func bazelTestWithDepends(optional bool, dependsOn string, targets ...string) func(*bk.Pipeline) {
|
||||
cmds := []bk.StepOpt{
|
||||
bk.Agent("queue", "bazel"),
|
||||
|
||||
@ -115,15 +115,6 @@ func CoreTestOperations(diff changed.Diff, opts CoreTestOperationsOptions) *oper
|
||||
addGoBuild))
|
||||
}
|
||||
|
||||
if diff.Has(changed.DatabaseSchema) {
|
||||
// If there are schema changes, ensure the tests of the last minor release continue
|
||||
// to succeed when the new version of the schema is applied. This ensures that the
|
||||
// schema can be rolled forward pre-upgrade without negatively affecting the running
|
||||
// instance (which was working fine prior to the upgrade).
|
||||
ops.Merge(operations.NewNamedSet("DB backcompat tests",
|
||||
addGoTestsBackcompat(opts.MinimumUpgradeableVersion)))
|
||||
}
|
||||
|
||||
// CI script testing
|
||||
if diff.Has(changed.CIScripts) {
|
||||
ops.Merge(operations.NewNamedSet("CI script tests", addCIScriptsTests))
|
||||
@ -490,21 +481,6 @@ func addGoTests(pipeline *bk.Pipeline) {
|
||||
})
|
||||
}
|
||||
|
||||
// Adds the Go backcompat test step.
|
||||
func addGoTestsBackcompat(minimumUpgradeableVersion string) func(pipeline *bk.Pipeline) {
|
||||
return func(pipeline *bk.Pipeline) {
|
||||
buildGoTests(func(description, testSuffix string, additionalOpts ...bk.StepOpt) {
|
||||
pipeline.AddStep(
|
||||
fmt.Sprintf(":go::postgres: Backcompat test (%s)", description),
|
||||
bk.Env("MINIMUM_UPGRADEABLE_VERSION", minimumUpgradeableVersion),
|
||||
bk.AnnotatedCmd("./dev/ci/go-backcompat/test.sh "+testSuffix, bk.AnnotatedCmdOpts{
|
||||
Annotations: &bk.AnnotationOpts{},
|
||||
}),
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// buildGoTests invokes the given function once for each subset of tests that should
|
||||
// be run as part of complete coverage. The description will be the specific test path
|
||||
// broken out to be run independently (or "all"), and the testSuffix will be the string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user