From 7c65fb3a4fb1fae692477747d4fb58777f005833 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 8 Oct 2026 15:06:06 +0200 Subject: [PATCH 1/4] test: replace the removed MinIO image with RustFS Docker Hub no longer has the minio/minio repository, so the test setup cannot pull minio/minio:RELEASE.2021-09-03T03-56-13Z and test_spilo.sh fails before Spilo starts. RustFS also turns /data/testbucket into a bucket and accepts the same keys with path-style S3. --- postgres-appliance/tests/docker-compose.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/postgres-appliance/tests/docker-compose.yml b/postgres-appliance/tests/docker-compose.yml index f0399ecb2..b4cb1d54c 100644 --- a/postgres-appliance/tests/docker-compose.yml +++ b/postgres-appliance/tests/docker-compose.yml @@ -4,16 +4,16 @@ networks: demo: services: - minio: - image: minio/minio:RELEASE.2021-09-03T03-56-13Z + rustfs: + image: rustfs/rustfs:1.0.0 networks: [ demo ] environment: - MINIO_ACCESS_KEY: &access_key Eeghei0uVej1Wea8mato - MINIO_SECRET_KEY: &secret_key lecheidohbah7aThohziezah3iev7ima4eeXu9gu - hostname: minio - container_name: demo-minio + RUSTFS_ACCESS_KEY: &access_key Eeghei0uVej1Wea8mato + RUSTFS_SECRET_KEY: &secret_key lecheidohbah7aThohziezah3iev7ima4eeXu9gu + hostname: rustfs + container_name: demo-rustfs entrypoint: sh - command: -c 'mkdir -p /export/testbucket && /usr/bin/minio server /export' + command: -c 'mkdir -p /data/testbucket && exec /entrypoint.sh rustfs' etcd: image: ${SPILO_TEST_IMAGE:-spilo} @@ -23,14 +23,14 @@ services: command: "sh -c 'export ETCD_UNSUPPORTED_ARCH=$$(dpkg --print-architecture) && exec etcd -name etcd1 -listen-client-urls http://0.0.0.0:2379 -advertise-client-urls http://$$(hostname --ip-address):2379'" spilo1: &spilo - depends_on: [ minio ] + depends_on: [ rustfs ] image: ${SPILO_TEST_IMAGE:-spilo} networks: [ demo ] environment: SPILO_PROVIDER: 'local' AWS_ACCESS_KEY_ID: *access_key AWS_SECRET_ACCESS_KEY: *secret_key - AWS_ENDPOINT: &aws_endpoint 'http://minio:9000' + AWS_ENDPOINT: &aws_endpoint 'http://rustfs:9000' AWS_S3_FORCE_PATH_STYLE: &aws_s3_force_path_style 'true' WAL_S3_BUCKET: &bucket testbucket # USE_WALG: 'true' # wal-e is used and tested by default, wal-g is used automatically for restore in case of S3 From 87ceb6f9fed600fc73ccf3aba6c64e3396c53c17 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 8 Oct 2026 15:12:53 +0200 Subject: [PATCH 2/4] ci: pin the GitHub actions to commit SHAs The organization only allows actions pinned to a full-length commit SHA: the workflows did not start. Each action is pinned to the last release of the major version it used, with the version in a comment. --- .github/workflows/kubernetes-test.yaml | 4 ++-- .github/workflows/publish-ghcr-container.yaml | 14 +++++++------- .github/workflows/tests.yaml | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/kubernetes-test.yaml b/.github/workflows/kubernetes-test.yaml index 4bf88d74b..e7ef6cec1 100644 --- a/.github/workflows/kubernetes-test.yaml +++ b/.github/workflows/kubernetes-test.yaml @@ -15,8 +15,8 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3.7.0 - name: Create Kind Cluster - uses: helm/kind-action@v1.1.0 + uses: helm/kind-action@7a937c0fb648064a83b8b9354151e5e543d9fcec # v1.1.0 - name: Install Spilo run: kubectl apply -f kubernetes/spilo_kubernetes.yaml diff --git a/.github/workflows/publish-ghcr-container.yaml b/.github/workflows/publish-ghcr-container.yaml index 819bf8d18..7e3f860bf 100644 --- a/.github/workflows/publish-ghcr-container.yaml +++ b/.github/workflows/publish-ghcr-container.yaml @@ -22,13 +22,13 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - name: Set up packages run: sudo apt-get install -y docker-compose - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3.10' @@ -46,20 +46,20 @@ jobs: echo "NAME=$IMAGE" >> $GITHUB_OUTPUT - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 - name: Login to GHCR - uses: docker/login-action@v3 + uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and export to local docker for testing - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 with: context: "postgres-appliance/" load: true @@ -72,7 +72,7 @@ jobs: bash postgres-appliance/tests/test_spilo.sh - name: Build arm64 additionaly and push multiarch image to ghcr - uses: docker/build-push-action@v6 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 with: context: "postgres-appliance/" push: true diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c874c7a32..03b923e6f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - name: Set up packages run: sudo apt-get install -y shellcheck docker-compose - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3.10' - name: Install flake8 From 89056cefab13ed624d9eec5fdff3fd1223e13589 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 8 Oct 2026 15:30:24 +0200 Subject: [PATCH 3/4] fix(build): follow PostGIS 3.6 from PGDG PGDG now ships PostGIS 3.6, so base.sh fails on the missing contrib/postgis-3.5 directory and the image does not build from source. Upstream Spilo uses 3.6 too. --- postgres-appliance/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-appliance/Dockerfile b/postgres-appliance/Dockerfile index 9844872ea..ada9fd1b9 100644 --- a/postgres-appliance/Dockerfile +++ b/postgres-appliance/Dockerfile @@ -52,7 +52,7 @@ ARG WITH_PERL=false ARG DEB_PG_SUPPORTED_VERSIONS="$PGOLDVERSIONS $PGVERSION" # Install PostgreSQL, extensions and contribs -ENV POSTGIS_VERSION=3.5 \ +ENV POSTGIS_VERSION=3.6 \ BG_MON_COMMIT=7f5887218790b263fe3f42f85f4ddc9c8400b154 \ PG_AUTH_MON_COMMIT=fe099eef7662cbc85b0b79191f47f52f1e96b779 \ PG_MON_COMMIT=ead1de70794ed62ca1e34d4022f6165ff36e9a91 \ From f67f24653af9b4dd60f8dbbb07085e00a7d135cc Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:54:52 +0100 Subject: [PATCH 4/4] Change logic for keeping ts minor versions (#1173) keep at least 5 minor versions, but ensure compatibility with the lowest/oldest PG version (where possible) --- postgres-appliance/build_scripts/base.sh | 31 ++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/postgres-appliance/build_scripts/base.sh b/postgres-appliance/build_scripts/base.sh index 425507ebe..e267ca010 100644 --- a/postgres-appliance/build_scripts/base.sh +++ b/postgres-appliance/build_scripts/base.sh @@ -121,10 +121,32 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do "postgresql-${version}-pg-stat-kcache" \ "${EXTRAS[@]}" - # Clean up timescaledb versions except the last 5 minor versions + # Clean up timescaledb versions - keep at least 5 minor versions, but ensure compatibility with the lowest/oldest PG version (where possible) + exclude_patterns=() versions=$(find "/usr/lib/postgresql/$version/lib/" -name 'timescaledb-2.*.so' | sed -rn 's/.*timescaledb-([1-9]+\.[0-9]+\.[0-9]+)\.so$/\1/p' | sort -rV) - latest_minor_versions=$(echo "$versions" | awk -F. '{print $1"."$2}' | uniq | head -n 5) + + # Calculate the number of versions dynamically based on the lowest PG version's latest minor + num_versions=5 + if [ -n "$first_latest_minor" ]; then + minor_versions=$(echo "$versions" | awk -F. '{print $1"."$2}' | uniq) + position=0 + found=0 + while IFS= read -r minor; do + position=$((position + 1)) + if [ "$minor" = "$first_latest_minor" ]; then + found=1 + break + fi + done <<< "$minor_versions" + + # if found, keep max(5, position) versions (so all versions have at least 1 version in common with lowest PG version) + if [ $found -eq 1 ] && [ $position -gt $num_versions ]; then + num_versions=$position + fi + fi + + latest_minor_versions=$(echo "$versions" | awk -F. '{print $1"."$2}' | uniq | head -n "$num_versions") for minor in $latest_minor_versions; do for full_version in $(echo "$versions" | grep "^$minor"); do exclude_patterns+=(! -name timescaledb-"${full_version}".so) @@ -133,6 +155,11 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do done find "/usr/lib/postgresql/$version/lib/" \( -name 'timescaledb-2.*.so' -o -name 'timescaledb-tsl-2.*.so' \) "${exclude_patterns[@]}" -delete + # Save the latest minor version from the first PG version + if [ -z "$first_latest_minor" ]; then + first_latest_minor=$(echo "$latest_minor_versions" | head -n 1) + fi + # Install 3rd party stuff if [ "${TIMESCALEDB_APACHE_ONLY}" != "true" ] && [ "${TIMESCALEDB_TOOLKIT}" = "true" ]; then