Single-image Sourcegraph Upgrade Notes

This page lists the changes that are relevant for upgrading Sourcegraph on a single-node Sourcegraph instance.

For upgrade procedures or general info about sourcegraph versioning see the links below:

Attention: These notes may contain relevant information about the infrastructure update such as resource requirement changes or versions of depencies (Docker, externalized databases).

If the notes indicate a patch release exists, target the highest one.

Unreleased

v5.9.0 ➔ v5.10.1164

  • This release resolves an issue in the v5.10.0 release which prevented multiversion upgrades from working. You may now target v5.10.1164 using migrator's upgrade command. Or use autoupgrade by setting the environment variable SRC_AUTOUPGRADE_IGNORE_DRIFT=true on the sourcegraph container.

v5.9.0 -> v5.10.0

Notes:

Warning: Admins are advised to upgrade directly to v5.10.1164 circumventing this release.

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.

Warning: automatic and migrator upgrade command will not work for this release, please upgrade directly to v5.10.1164, or to a 5.9 version and conduct a standard upgrade using migrator's default up command!

What does this mean for admins?

  • During the postgres version upgrade pg_upgrade automatically makes some changes to the database schema.
  • 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.
  • Admins should not run migrators suggested drift fixes until the database is upgraded.

v5.0.6 ➔ v5.1.0

Notes:

  • The Docker Single Container Deployment image has switched to a Wolfi-based container image. Upon upgrading, Sourcegraph will need to re-index the entire database. All users must read through the 5.1 upgrade guide before upgrading.

v4.4.2 ➔ v4.5.0

Notes:

  • This release introduces a background job that will convert all LSIF data into SCIP. This migration is irreversible and a rollback from this version may result in loss of precise code intelligence data. Please see the migration notes for more details.

v3.34 ➔ v3.35

Notes:

  • There is a known issue with the Code Insights out-of-band settings migration not reaching 100% complete when encountering deleted users or organizations.

v3.30 ➔ v3.31

WARNING: This upgrade must originate from v3.30.3.

Notes:

  • The built-in main Postgres (pgsql) and codeintel (codeintel-db) databases have switched to an alpine-based Docker image. Upon upgrading, Sourcegraph will need to re-index the entire database. All users that use our bundled (built-in) database instances must read through the 3.31 upgrade guide before upgrading.

v3.29 ➔ v3.30

WARNING: If you have already upgraded to 3.30.0, 3.30.1, or 3.30.2 please follow this migration guide.

v3.26 ➔ v3.27

WARNING: Sourcegraph 3.27 now requires Postgres 12+.

Notes:

v3.24 ➔ v3.25

Notes:

  • Go 1.15 introduced changes to SSL/TLS connection validation which requires certificates to include a SAN. This field was not included in older certificates and clients relied on the CN field. You might see an error like x509: certificate relies on legacy Common Name field. We recommend that customers using Sourcegraph with an external database and and connecting to it using SSL/TLS check whether the certificate is up to date.

v3.21 ➔ v3.22

WARNING: This upgrade must originate from v3.20.1.

No upgrade notes.

v3.20 ➔ v3.21

WARNING: This upgrade must originate from v3.17.2 due to a patched bug in our release.

Notes:

  • This release introduces a second database instance, codeintel-db. If you have configured Sourcegraph with an external database, then update the CODEINTEL_PG* environment variables to point to a new external database as described in the external database documentation. Again, these must not point to the same database or the Sourcegraph instance will refuse to start.
  • Turn off database secrets encryption. In Sourcegraph version 3.20, we would automatically generate a secret key file (/var/lib/sourcegraph/token) inside the container for encrypting secrets stored in the database. However, it is not yet ready for general use and format of the secret key file might change. Therefore, it is best to delete the secret key file (/var/lib/sourcegraph/token) and turn off the database secrets encryption.