Skip to content

Commit 5202ff7

Browse files
authored
Warn customers not to use auto or upgrade upgrade paths with 5.10.0 (#826)
This PR removes references for workarounds for the expected pg12 -> pg16 schema drift and instead just tells customers the only valid upgrade path is by use of v5.9.x standard to v5.10.0 In reality what we're actually dodging is a failure to run OOB migrations -- therefore in this case the schema drift prevents migrator from encountering a worse bug
1 parent e438574 commit 5202ff7

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

docs/admin/updates/automatic.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Automatic multi-version upgrades
22

3-
> Warning: Automatic upgrades in v5.10.0 will fail unless the postgres database is upgraded from postgres 12 to postgres 16. Or the environment variable `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set on the `sourcegraph-frontend` container. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
3+
> Warning: Automatic upgrades to v5.10.0 will fail please upgrade to a v5.9.x version and perform a standard upgrade instead! See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
44
55
From **Sourcegraph 5.1 and later**, multi-version upgrades can be performed **automatically** as if they were a standard upgrade for the same deployment type. Automatic multi-version upgrades take the following general form:
66

docs/admin/updates/docker_compose.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ For upgrade procedures or general info about sourcegraph versioning see the link
1616
## v5.9.0 ➔ v5.10.0
1717

1818
> Warning: This release updates the database container images from postgres 12 to postres 16, and begins using wolfi based images. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
19+
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!
1920
2021
#### Notes:
21-
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgres16`. The `codeinsights-db` container has been renamed to `postgres-16-codeinsights`.
22+
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgresql-16`. The `codeinsights-db` container has been renamed to `postgresql-16-codeinsights`.
2223
- **Admins using external dbs who have not yet upgraded from postgres 12 to postgres 16**, can expect to see database drift after upgrading to `5.10.0`. The new expected schema definition for Sourcegraph is based on postgres 16. The schema drift is the result of automatic changes made to the schema by pg_upgrade utils, and will not cause issues in the application.
2324
- Admins should not run migrators suggested drift fixes, and should instead upgrade their database from postgres 12 to postgres 16.
2425
- The [Autoupgrade](https://sourcegraph.com/docs/admin/updates/automatic#pre-v500-automatic-multiversion-upgrades) upgrade method, will detect drift and exit before conducting the upgrade unless the env var `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set in the server container.
26+
- Postgres 12 image containers cannot be started with data volumes which have been upgraded by postgres 16.
2527

2628
## v5.1.4 ➔ v5.1.5
2729

docs/admin/updates/kubernetes.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ For upgrade procedures or general info about sourcegraph versioning see the link
1818
## v5.9.0 ➔ v5.10.0
1919

2020
> Warning: This release updates the database container images from postgres 12 to postres 16, and begins using wolfi based images. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
21+
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!
2122
2223
#### Notes:
23-
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgres16`. The `codeinsights-db` container has been renamed to `postgres-16-codeinsights`.
24+
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgresql-16`. The `codeinsights-db` container has been renamed to `postgresql-16-codeinsights`.
2425
- **Admins using external dbs who have not yet upgraded from postgres 12 to postgres 16**, can expect to see database drift after upgrading to `5.10.0`. The new expected schema definition for Sourcegraph is based on postgres 16. The schema drift is the result of automatic changes made to the schema by pg_upgrade utils, and will not cause issues in the application.
2526
- Admins should not run migrators suggested drift fixes, and should instead upgrade their database from postgres 12 to postgres 16.
26-
- The [Autoupgrade](https://sourcegraph.com/docs/admin/updates/automatic#pre-v500-automatic-multiversion-upgrades) upgrade method, will detect drift and exit before conducting the upgrade unless the env var `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set in the server container.
27+
- Postgres 12 image containers cannot be started with data volumes which have been upgraded by postgres 16.
28+
2729

2830
## v5.1.0 -> v5.2.0
2931

docs/admin/updates/server.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ For upgrade procedures or general info about sourcegraph versioning see the link
1818

1919
#### Notes:
2020

21-
> WARNING: **In 5.10 the Sourcegraph database images are being updated from postgres 12 to postgres 16 to avoid postgres 12's end of life. This update will not yet be applied to Sourcegraph server's all in one database.**
21+
> Warning: **In 5.10 the Sourcegraph database images are being updated from postgres 12 to postgres 16 to avoid postgres 12's end of life. This update will not yet be applied to Sourcegraph server's all in one database.**
22+
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!
2223
2324
**What does this mean for admins?**
2425
- During the postgres version upgrade `pg_upgrade` automatically makes some changes to the database schema.
2526
- The new canonical database schema is now based on postgres 16, the drift detection tool will report drift between the old and new database schema. This is expected and is a result of the postgres upgrade.
26-
- Until the database is upgraded migrator will require the `--skip-drift-check` flag to proceed with upgrades.
2727
- Admins should not run migrators suggested drift fixes until the database is upgraded.
28-
- The [Autoupgrade](https://sourcegraph.com/docs/admin/updates/automatic#pre-v500-automatic-multiversion-upgrades) upgrade method, will detect drift and exit before conducting the upgrade unless the env var `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set in the server container.
2928

3029

3130
## v5.0.6 ➔ v5.1.0

docs/technical-changelog.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ This page documents all notable changes to Sourcegraph. For more detailed change
88

99
> Warning: This release updates the database container images from postgres 12 to postres 16, and begins using wolfi based images. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
1010
>
11+
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!
12+
>
1113
> Also be sure to check your deployment type's [upgrade notes](http://sourcegraph.com/docs/admin/updates#instance-specific-procedures)!
1214

1315
## v5.10.0

0 commit comments

Comments
 (0)