Skip to content

Commit 30a4bdd

Browse files
david-sandykeegancsmithcaugustus-sourcegraph
authored
Update Postgres to 12.7 (sourcegraph#31933)
* Update postgres 12.7 Update due to this issue: https://nvd.nist.gov/vuln/detail/CVE-2021-32027 * Renamed DIr Updated dir name for postgres new version * Update postgres references * Update postgres references * Update Postgres references * Updated Postgres references * Updated postgres references Not sure about line 70 with the tag postgres-12.6:21-03-26_5d7084279 * Updated postgres references * Updated Postgres References * run go generate ./... * Reference Changes * Updated 12-7 reference * Updated reference * Updated reference * Updated reference * Updated reference * Updated reference * Updated permissions Updated permissions * Run go generate . * Added change for Postgres * Added change # to postgres change * Update changelog * Fix file permissions * Updated postgres reference from 12.6 to 12.7 Co-authored-by: Keegan Carruthers-Smith <[email protected]> Co-authored-by: Crystal Augustus <[email protected]>
1 parent 2c382d0 commit 30a4bdd

File tree

17 files changed

+22
-22
lines changed

17 files changed

+22
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All notable changes to Sourcegraph are documented in this file.
2525

2626
- Searching for the pattern `//` with regular expression search is now interpreted literally and will search for `//`. Previously, the `//` pattern was interpreted as our regular expression syntax `/<regexp>/` which would in turn be intrpreted as the empty string. Since searching for an empty string offers little practically utility, we now instead interpret `//` to search for its literal meaning in regular expression search. [#31520](https://github.com/sourcegraph/sourcegraph/pull/31520)
2727
- Timestamps in the webapp will now display local time on hover instead of UTC time [#31672](https://github.com/sourcegraph/sourcegraph/pull/31672)
28+
- Updated Postgres version from 12.6 to 12.7 [#31933](https://github.com/sourcegraph/sourcegraph/pull/31933)
2829

2930
### Fixed
3031

dev/redis-postgres.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
- ./redis.conf:/etc/redis/redis.conf
1414
- ${REDIS_DATA_DIR:-redis_data}:/data
1515
postgresql:
16-
image: index.docker.io/sourcegraph/postgres-12.6-alpine:insiders
16+
image: index.docker.io/sourcegraph/postgres-12-alpine:insiders
1717
ports:
1818
- 5432:5432
1919
environment:

dev/sg/internal/migration/squash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func runPostgresContainer(databaseName string) (_ func(err error) error, err err
261261
"--name", squasherContainerName,
262262
"-p", fmt.Sprintf("%d:5432", squasherContainerExposedPort),
263263
"-e", "POSTGRES_HOST_AUTH_METHOD=trust",
264-
"postgres:12.6",
264+
"postgres:12.7",
265265
}
266266
if _, err := run.DockerCmd(runArgs...); err != nil {
267267
return nil, err

doc/admin/postgres.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Generally, no additional steps are required to upgrade the databases shipped alo
6767

6868
#### Sourcegraph with Kubernetes
6969

70-
**The upgrade process is different for [Sourcegraph Kubernetes deployments](./install/kubernetes/index.md)** because [by default](https://github.com/sourcegraph/sourcegraph/blob/main/docker-images/postgres-12.6/build.sh#L10), it uses `sourcegraph/postgres-12.6:21-03-26_5d7084279` which can be [customized with environment variables](https://github.com/sourcegraph/deploy-sourcegraph/blob/7edcadb/docs/configure.md#configure-custom-postgresql).
70+
**The upgrade process is different for [Sourcegraph Kubernetes deployments](./install/kubernetes/index.md)** because [by default](https://github.com/sourcegraph/sourcegraph/blob/main/docker-images/postgres-12/build.sh#L10), it uses `sourcegraph/postgres-12` which can be [customized with environment variables](https://github.com/sourcegraph/deploy-sourcegraph/blob/7edcadb/docs/configure.md#configure-custom-postgresql).
7171

7272
If you have changed `PGUSER`, `PGDATABASE` or `PGDATA`, then the `PG*OLD` and `PG*NEW` environment variables are
7373
required. Below are the defaults and documentation on what each variable is used for:

doc/dev/background-information/ci/reference.md

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

docker-images/codeintel-db/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
set -ex
44
cd "$(dirname "${BASH_SOURCE[0]}")"
55

6-
# This image is identical to our "sourcegraph/postgres-12.6-alpine" image.
7-
IMAGE="${IMAGE:-sourcegraph/codeintel-db}" ../postgres-12.6-alpine/build.sh
6+
# This image is identical to our "sourcegraph/postgres-12-alpine" image.
7+
IMAGE="${IMAGE:-sourcegraph/codeintel-db}" ../postgres-12-alpine/build.sh

docker-images/postgres-12.6-alpine/Dockerfile renamed to docker-images/postgres-12-alpine/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM postgres:12.6-alpine@sha256:faf54a67a58ecf4d21e3e68b9a3b33f81a11e8a786530044c4ee80d51b148e05
1+
FROM postgres:12.7-alpine@sha256:b815f145ef6311e24e4bc4d165dad61b2d8e4587c96cea2944297419c5c93054
22

33
# We modify the postgres user/group to reconcile with our previous debian based images
44
# and avoid issues with customers migrating.
@@ -22,4 +22,3 @@ ENV POSTGRES_PASSWORD='' \
2222
COPY rootfs /
2323
USER postgres
2424
ENTRYPOINT ["/postgres.sh"]
25-

docker-images/postgres-12.6-alpine/build.sh renamed to docker-images/postgres-12-alpine/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set -ex
44
cd "$(dirname "${BASH_SOURCE[0]}")"
55

6-
docker build -t "${IMAGE:-index.docker.io/sourcegraph/postgres-12.6-alpine}" .
6+
docker build -t "${IMAGE:-index.docker.io/sourcegraph/postgres-12-alpine}" .

enterprise/dev/ci/images/images.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var DeploySourcegraphDockerImages = []string{
6969
"jaeger-agent",
7070
"jaeger-all-in-one",
7171
"minio",
72-
"postgres-12.6-alpine",
72+
"postgres-12-alpine",
7373
"postgres_exporter",
7474
"precise-code-intel-worker",
7575
"prometheus",

0 commit comments

Comments
 (0)