RFC 697: Testing - Search user story
Created by: efritz
See RFC 697: Multiple version upgrades.
This PR tracks general testing of multi-version upgrades as well as Search-specific test scenarios.
See the testing strategy announcement in slack.
Core story:
- Run a search for the
sourcegraph/sourcegraph
repository - Search for the term
GetUploads
onHEAD
- Open a result and ensure the file renders
- Check that file sidebar and symbols sidebars are populated
- Ensure code navigation (go to definition and find references) work as expected
- Repeat steps 2-5 on an old tag to ensure that unindexed paths are also functional
- Visit each site-admin page to ensure there are no obvious error banners
Instructions:
- Start a local instance of Sourcegraph at version 3.31.0. The
docker-compose.yaml
artifact, below, provides an easy way to link asourcegraph/server
image with three container-based Postgres instances. The frontend, codeintel, and codeinsights databases are available on the host via ports 7777, 7778, and 7779, respectively. - Perform whatever steps listed above that need to be performed prior to upgrading (available on the host via port 7080).
- Stop the
sourcegraph/server
container, but leave the three database containers running. - In a clone of the
sg/sg
repo, run the following commands to upgrade your local instance to version 4.0.
export PGDATASOURCE=postgres://sg:[email protected]:7777/sg
export CODEINTEL_PGDATASOURCE=postgres://sg:[email protected]:7778/sg
export CODEINSIGHTS_PGDATASOURCE=postgres://sg:[email protected]:7779/sg
go run ./enterprise/cmd/migrator upgrade --from 3.31 --to 4.0
- Update the tag on the
sourcegraph/server
image to point to the "pre-release" of version 4.0. The particular commit that we're treating as the 4.0 release prior to the creation of the tag in git can be found here.
Artifacts:
docker-compose.yaml
:
version: '2.4'
services:
sourcegraph:
image: sourcegraph/server:{{TAG GOES HERE}}
environment:
- PGDATASOURCE=postgres://sg:sg@pgsql-frontend:5432/sg
- CODEINTEL_PGDATASOURCE=postgres://sg:sg@pgsql-codeintel:5432/sg
- CODEINSIGHTS_PGDATASOURCE=postgres://sg:sg@pgsql-codeinsights:5432/sg
ports:
- 7080:7080
networks:
- sourcegraph
depends_on:
- pgsql-frontend
- pgsql-codeintel
- pgsql-codeinsights
pgsql-frontend:
image: sourcegraph/postgres-12-alpine
volumes:
- 'pgsql-frontend:/data'
ports:
- 7777:5432
networks:
- sourcegraph
pgsql-codeintel:
image: sourcegraph/postgres-12-alpine
volumes:
- 'pgsql-codeintel:/data'
ports:
- 7778:5432
networks:
- sourcegraph
pgsql-codeinsights:
image: sourcegraph/postgres-12-alpine
volumes:
- 'pgsql-codeinsights:/data'
ports:
- 7779:5432
networks:
- sourcegraph
volumes:
sourcegraph:
pgsql-frontend:
pgsql-codeintel:
pgsql-codeinsights:
networks:
sourcegraph:
/cc @benvenker @lguychard