sourcegraph/.gitignore
Jean-Hadrien Chabran 1e4479947f
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
2023-04-21 14:39:36 +02:00

196 lines
2.6 KiB
Plaintext

# Temporary directory for whatever you want
.tmp/
# Bazel
bazel-*
# Vim
*.swp
# JetBrains/IntelliJ
.idea
.graphqlconfig
# Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
.\#*
.dir-locals.el
# Go
*.o
*.a
*.so
# C
*.dylib
# Mac OS X
.DS_Store
# Python
*.py[cod]
__pycache__
# langkit
/workspace/
# Test binaries
*.test
grapher/python/pysonar2/tests
grapher/ruby/rubysonar/target
grapher/ruby/rubysonar/dependency-reduced-pom.xml
grapher/ruby/yard/.bundle
npm-debug.log
pnpm-error.log
pnpm-debug.log
.codemod.bookmark
.elasticbeanstalk/
.tmp/*.jar
/cmd/frontend/internal/graphqlbackend/node_modules
/ui/artifacts
/ui/node_modules
/ui/assets/_goTemplates.js
/ui/assets/analytics.js
/ui/assets/bundle.js
/ui/assets/bundle.css
/ui/assets/sourcebox.js
/ui/assets/sourcebox.css
/ui/assets/test.js
/ui/assets/test.css
/ui/assets/webpack.manifest.json
/ui/assets/vs
/ui/assets/*.html
/ui/assets/*.map
/ui/assets/*.txt
/ui/assets/extension
/ui/.tmp
/ui/assets/scripts/
/ui/assets/styles/
/ui/assets/*.br
/ui/assets/*.gz
/ui/assets/stats-*
*.json.actual
eb-bundle.zip
/release/
/conf/private
/provision/kubernetes/gen
/deploy/sourcegraph.com/src
/deploy/sourcegraph/src
# Sublime
*.sublime-project
*.sublime-workspace
.bin/
.env
/vendor/
.gtm/
cmd/src/debug
cmd/gitserver/debug
cmd/indexer/debug
/.gtm/
# Client
node_modules
package-lock.json
.nyc_output/
coverage/
out/
client/shared/src/schema/*.d.ts
puppeteer/
package-lock.json
/dist
sourcegraph-webapp-*.tgz
*.tsbuildinfo
graphql-operations.ts
*.module.scss.d.ts
dll-bundle
# Extensions
/client/extension-api/dist
# Direnv
.envrc
.direnv
# Docker images
docker-images/prometheus/config/prometheus_targets.yml
comment.txt
.eslintcache
storybook-static/
# Certificates
*.pem
*.crt
# tilt files
/dev/tilt/generated-cluster
/dev/tilt/tilt-watch-targets
# sonarqube
.scannerwork
# sg command specific things, see ./dev/sg
sg.config.overwrite.yaml
# sg Google Cloud API OAuth token
.sg.token.json
# Generated sitemaps are not committed, they're hosted in a GCS bucket.
sitemap/
sitemap_query.db
# Lighthouse CI reports
.lighthouseci/
# Trivy security vulnerability reports
*-security-report.html
# CI annotations
.annotate
.annotate.lock
annotations/
.buildevent_file
# Buildkite analytics files
test-reports/
# CI linter cache (used only in CI)
.golangci-lint-cache
# go workspace files shouldn't be committed
go.work
go.work.sum
# binary
/sg
# SCIP
index.scip
# Buildkite helper and cache files
/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