From 55281c521d2283de58a6ddca836301ee5108cdfb Mon Sep 17 00:00:00 2001 From: Ibrahim Halatci Date: Thu, 20 Aug 2026 12:39:36 +0300 Subject: [PATCH 1/3] Add PostgreSQL 19 support, drop PostgreSQL 16 Retarget the Docker image automation to the PG 17/18/19 window for Citus 15.0.0, and bump the hll/topn extension pins to 2.21.citus-1 / 2.7.1.citus-1 across the docker templates and the live test images. - update_docker.py / publish_docker.py: postgres16 -> postgres19 - templates/docker: add postgres-19, delete postgres-14/15/16 - latest.tmpl.dockerfile: bump stale hll 2.17 / topn 2.5.0 pins, which would otherwise break the `latest` image now that it tracks PG19 - test-images: bump hll/topn on the 8 non-EOL distros - package-tests.yml: 14.1.0 -> 15.0.0 Also fixes two latent bugs that block the PG19 rollout: 1. update_docker.py used `git add --update .`, which stages only tracked files, so a newly generated image directory was never committed. This is why postgres-18/ and the pg18 Docker Hub tag do not exist today despite the script generating them. Now uses `git add -A .`. 2. citus_package.py built the nightly PG list by filtering `release_versions` instead of `nightly_versions`, so any nightly exclusion would silently emit release versions. Dormant only because the nightly exclusion map is currently empty; packaging is about to populate it for el/8 on PG19. The ol/7 unit test asserted the buggy output and has been corrected. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1ed7b58a-0ba9-4f47-a1de-3ee665bae7f2 --- .github/workflows/package-tests.yml | 6 +-- packaging_automation/citus_package.py | 2 +- packaging_automation/publish_docker.py | 28 ++++-------- .../docker/latest/latest.tmpl.dockerfile | 4 +- .../postgres-14/postgres-14.tmpl.dockerfile | 42 ------------------ .../postgres-15/postgres-15.tmpl.dockerfile | 42 ------------------ .../postgres-17/postgres-17.tmpl.dockerfile | 4 +- .../postgres-18/postgres-18.tmpl.dockerfile | 4 +- .../postgres-19.tmpl.dockerfile} | 6 +-- .../tests/test_citus_package.py | 3 +- .../tests/test_publish_docker.py | 4 +- .../tests/test_update_docker.py | 44 +++++++++---------- packaging_automation/update_docker.py | 42 +++++++++--------- test-images/almalinux-9/Dockerfile | 4 +- test-images/centos-8/Dockerfile | 4 +- test-images/debian-bookworm/Dockerfile | 4 +- test-images/debian-bullseye/Dockerfile | 4 +- test-images/debian-trixie/Dockerfile | 4 +- test-images/ol-9/Dockerfile | 4 +- test-images/ubuntu-jammy/Dockerfile | 4 +- test-images/ubuntu-noble/Dockerfile | 4 +- 21 files changed, 84 insertions(+), 179 deletions(-) delete mode 100644 packaging_automation/templates/docker/postgres-14/postgres-14.tmpl.dockerfile delete mode 100644 packaging_automation/templates/docker/postgres-15/postgres-15.tmpl.dockerfile rename packaging_automation/templates/docker/{postgres-16/postgres-16.tmpl.dockerfile => postgres-19/postgres-19.tmpl.dockerfile} (91%) diff --git a/.github/workflows/package-tests.yml b/.github/workflows/package-tests.yml index 818c0d60..a7592db0 100644 --- a/.github/workflows/package-tests.yml +++ b/.github/workflows/package-tests.yml @@ -37,8 +37,8 @@ jobs: export PROJECT_VERSION="${{ github.event.inputs.project_version }}" echo "project_version: ${{ github.event.inputs.project_version }}" # To be able to test pipeline without triggering with project_version parameter using workflow_dispatch parameter, - # if workflow_dispatch parameter is empty, 14.1.0 parameter is set to execute pipeline. - [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=14.1.0 + # if workflow_dispatch parameter is empty, 15.0.0 parameter is set to execute pipeline. + [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=15.0.0 POSTGRES_VERSIONS=$(python -m packaging_automation.get_postgres_versions --project_version ${PROJECT_VERSION}) echo "Postgres Version: ${POSTGRES_VERSIONS}" echo "::set-output name=pg_versions::${POSTGRES_VERSIONS}" @@ -73,7 +73,7 @@ jobs: run: | export PROJECT_VERSION="${{ github.event.inputs.project_version }}" echo "Citus Version: ${PROJECT_VERSION} " - [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=14.1.0 + [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=15.0.0 python -m packaging_automation.test_citus_package \ --project_version "${PROJECT_VERSION}" \ --os_release ${{ matrix.platform }} \ diff --git a/packaging_automation/citus_package.py b/packaging_automation/citus_package.py index 5e5751fc..d19d4407 100644 --- a/packaging_automation/citus_package.py +++ b/packaging_automation/citus_package.py @@ -329,7 +329,7 @@ def get_postgres_versions( if exclude_dict_nightly and platform_key_nightly in exclude_dict_nightly: nightly_versions = [ v - for v in release_versions + for v in nightly_versions if v not in exclude_dict_nightly[platform_key_nightly] ] diff --git a/packaging_automation/publish_docker.py b/packaging_automation/publish_docker.py index f8d15b8a..b9036fdf 100644 --- a/packaging_automation/publish_docker.py +++ b/packaging_automation/publish_docker.py @@ -28,11 +28,9 @@ class DockerImageType(Enum): latest = 1 alpine = 2 nightly = 3 - postgres_14 = 4 - postgres_15 = 5 - postgres_16 = 6 - postgres_17 = 7 - postgres_18 = 8 + postgres_17 = 4 + postgres_18 = 5 + postgres_19 = 6 class ManualTriggerType(Enum): @@ -58,21 +56,6 @@ class ScheduleType(Enum): "docker-tag": "alpine", "schedule-type": ScheduleType.regular, }, - DockerImageType.postgres_14: { - "file-name": "postgres-14/Dockerfile", - "docker-tag": "pg14", - "schedule-type": ScheduleType.regular, - }, - DockerImageType.postgres_15: { - "file-name": "postgres-15/Dockerfile", - "docker-tag": "pg15", - "schedule-type": ScheduleType.regular, - }, - DockerImageType.postgres_16: { - "file-name": "postgres-16/Dockerfile", - "docker-tag": "pg16", - "schedule-type": ScheduleType.regular, - }, DockerImageType.postgres_17: { "file-name": "postgres-17/Dockerfile", "docker-tag": "pg17", @@ -83,6 +66,11 @@ class ScheduleType(Enum): "docker-tag": "pg18", "schedule-type": ScheduleType.regular, }, + DockerImageType.postgres_19: { + "file-name": "postgres-19/Dockerfile", + "docker-tag": "pg19", + "schedule-type": ScheduleType.regular, + }, DockerImageType.nightly: { "file-name": "nightly/Dockerfile", "docker-tag": "nightly", diff --git a/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile b/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile index 0e70b981..83c7e028 100644 --- a/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile +++ b/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile @@ -20,8 +20,8 @@ RUN apt-get update \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.17.citus-1 \ - postgresql-$PG_MAJOR-topn=2.5.0.citus-1 \ + postgresql-$PG_MAJOR-hll=2.21.citus-1 \ + postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* diff --git a/packaging_automation/templates/docker/postgres-14/postgres-14.tmpl.dockerfile b/packaging_automation/templates/docker/postgres-14/postgres-14.tmpl.dockerfile deleted file mode 100644 index 900f3f7d..00000000 --- a/packaging_automation/templates/docker/postgres-14/postgres-14.tmpl.dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -# This file is auto generated from it's template, -# see citusdata/tools/packaging_automation/templates/docker/postgres-14/postgres-14.tmpl.dockerfile. -FROM postgres:{{postgres_version}} -ARG VERSION={{project_version}} -LABEL maintainer="Citus Data https://citusdata.com" \ - org.label-schema.name="Citus" \ - org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \ - org.label-schema.url="https://www.citusdata.com" \ - org.label-schema.vcs-url="https://github.com/citusdata/citus" \ - org.label-schema.vendor="Citus Data, Inc." \ - org.label-schema.version=${VERSION} \ - org.label-schema.schema-version="1.0" - -ENV CITUS_VERSION ${VERSION}.citus-1 - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash \ - && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.18.citus-1 \ - postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/* - -# add citus to default PostgreSQL config -RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.conf.sample - -# add scripts to run after initdb -COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/ - -# add health check script -COPY pg_healthcheck wait-for-manager.sh / -RUN chmod +x /wait-for-manager.sh - -# entry point unsets PGPASSWORD, but we need it to connect to workers -# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303 -RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh - -HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck diff --git a/packaging_automation/templates/docker/postgres-15/postgres-15.tmpl.dockerfile b/packaging_automation/templates/docker/postgres-15/postgres-15.tmpl.dockerfile deleted file mode 100644 index b429fe2b..00000000 --- a/packaging_automation/templates/docker/postgres-15/postgres-15.tmpl.dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -# This file is auto generated from it's template, -# see citusdata/tools/packaging_automation/templates/docker/postgres-15/postgres-15.tmpl.dockerfile. -FROM postgres:{{postgres_version}} -ARG VERSION={{project_version}} -LABEL maintainer="Citus Data https://citusdata.com" \ - org.label-schema.name="Citus" \ - org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \ - org.label-schema.url="https://www.citusdata.com" \ - org.label-schema.vcs-url="https://github.com/citusdata/citus" \ - org.label-schema.vendor="Citus Data, Inc." \ - org.label-schema.version=${VERSION} \ - org.label-schema.schema-version="1.0" - -ENV CITUS_VERSION ${VERSION}.citus-1 - -# install Citus -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - && curl -s https://install.citusdata.com/community/deb.sh | bash \ - && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.18.citus-1 \ - postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \ - && apt-get purge -y --auto-remove curl \ - && rm -rf /var/lib/apt/lists/* - -# add citus to default PostgreSQL config -RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.conf.sample - -# add scripts to run after initdb -COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/ - -# add health check script -COPY pg_healthcheck wait-for-manager.sh / -RUN chmod +x /wait-for-manager.sh - -# entry point unsets PGPASSWORD, but we need it to connect to workers -# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303 -RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh - -HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck diff --git a/packaging_automation/templates/docker/postgres-17/postgres-17.tmpl.dockerfile b/packaging_automation/templates/docker/postgres-17/postgres-17.tmpl.dockerfile index 29bc37d3..d3878c80 100644 --- a/packaging_automation/templates/docker/postgres-17/postgres-17.tmpl.dockerfile +++ b/packaging_automation/templates/docker/postgres-17/postgres-17.tmpl.dockerfile @@ -20,8 +20,8 @@ RUN apt-get update \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.18.citus-1 \ - postgresql-$PG_MAJOR-topn=2.7.0.citus-1 \ + postgresql-$PG_MAJOR-hll=2.21.citus-1 \ + postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* diff --git a/packaging_automation/templates/docker/postgres-18/postgres-18.tmpl.dockerfile b/packaging_automation/templates/docker/postgres-18/postgres-18.tmpl.dockerfile index 11bf56ed..75bc5d38 100644 --- a/packaging_automation/templates/docker/postgres-18/postgres-18.tmpl.dockerfile +++ b/packaging_automation/templates/docker/postgres-18/postgres-18.tmpl.dockerfile @@ -20,8 +20,8 @@ RUN apt-get update \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.19.citus-1 \ - postgresql-$PG_MAJOR-topn=2.7.0.citus-1 \ + postgresql-$PG_MAJOR-hll=2.21.citus-1 \ + postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* diff --git a/packaging_automation/templates/docker/postgres-16/postgres-16.tmpl.dockerfile b/packaging_automation/templates/docker/postgres-19/postgres-19.tmpl.dockerfile similarity index 91% rename from packaging_automation/templates/docker/postgres-16/postgres-16.tmpl.dockerfile rename to packaging_automation/templates/docker/postgres-19/postgres-19.tmpl.dockerfile index 0b4cd441..64345920 100644 --- a/packaging_automation/templates/docker/postgres-16/postgres-16.tmpl.dockerfile +++ b/packaging_automation/templates/docker/postgres-19/postgres-19.tmpl.dockerfile @@ -1,5 +1,5 @@ # This file is auto generated from it's template, -# see citusdata/tools/packaging_automation/templates/docker/postgres-16/postgres-16.tmpl.dockerfile. +# see citusdata/tools/packaging_automation/templates/docker/postgres-19/postgres-19.tmpl.dockerfile. FROM postgres:{{postgres_version}} ARG VERSION={{project_version}} LABEL maintainer="Citus Data https://citusdata.com" \ @@ -20,8 +20,8 @@ RUN apt-get update \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.18.citus-1 \ - postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \ + postgresql-$PG_MAJOR-hll=2.21.citus-1 \ + postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* diff --git a/packaging_automation/tests/test_citus_package.py b/packaging_automation/tests/test_citus_package.py index f5e0f196..179c7917 100644 --- a/packaging_automation/tests/test_citus_package.py +++ b/packaging_automation/tests/test_citus_package.py @@ -223,7 +223,8 @@ def test_get_postgres_versions_ol_7(): ) # pg 15 is excluded for all releases with pg_exclude file assert len(release_versions) == 2 and release_versions == ["13", "14"] - assert len(nightly_versions) == 2 and nightly_versions == ["13", "14"] + # pg 15 is additionally excluded for ol/7 nightlies, leaving only pg 14 + assert len(nightly_versions) == 1 and nightly_versions == ["14"] def test_get_postgres_versions_el_7(): diff --git a/packaging_automation/tests/test_publish_docker.py b/packaging_automation/tests/test_publish_docker.py index ceb6403a..a62bb851 100644 --- a/packaging_automation/tests/test_publish_docker.py +++ b/packaging_automation/tests/test_publish_docker.py @@ -63,9 +63,9 @@ def test_get_image_tag(): assert image_name == "12.0.0" image_name = get_image_tag( - remove_prefix(TAG_NAME, "v"), DockerImageType.postgres_15 + remove_prefix(TAG_NAME, "v"), DockerImageType.postgres_19 ) - assert image_name == "12.0.0-pg15" + assert image_name == "12.0.0-pg19" def test_publish_main_docker_images(): diff --git a/packaging_automation/tests/test_update_docker.py b/packaging_automation/tests/test_update_docker.py index 1422e739..cc2fb8a5 100644 --- a/packaging_automation/tests/test_update_docker.py +++ b/packaging_automation/tests/test_update_docker.py @@ -14,9 +14,9 @@ update_docker_file_for_latest_postgres, update_regular_docker_compose_file, update_docker_file_alpine, - update_docker_file_for_postgres16, update_docker_file_for_postgres17, update_docker_file_for_postgres18, + update_docker_file_for_postgres19, update_changelog, ) @@ -24,9 +24,9 @@ TEST_BASE_PATH = f"{BASE_PATH}/docker" PROJECT_VERSION = "12.0.0" +POSTGRES_19_VERSION = "19.0" POSTGRES_18_VERSION = "18.1" POSTGRES_17_VERSION = "17.6" -POSTGRES_16_VERSION = "16.10" PROJECT_NAME = "citus" version_details = get_version_details(PROJECT_VERSION) @@ -47,7 +47,7 @@ def teardown_module(): def test_update_docker_file_for_latest_postgres(): update_docker_file_for_latest_postgres( - PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_18_VERSION + PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_19_VERSION ) with open( f"{TEST_BASE_PATH}/Dockerfile", @@ -57,7 +57,7 @@ def test_update_docker_file_for_latest_postgres(): ) as reader: content = reader.read() lines = content.splitlines() - assert lines[2].strip() == f"FROM postgres:{POSTGRES_18_VERSION}" + assert lines[2].strip() == f"FROM postgres:{POSTGRES_19_VERSION}" assert lines[3].strip() == f"ARG VERSION={PROJECT_VERSION}" assert ( f"postgresql-$PG_MAJOR-{PROJECT_NAME}-" @@ -85,7 +85,7 @@ def test_update_regular_docker_compose_file(): def test_update_docker_file_alpine(): update_docker_file_alpine( - PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_18_VERSION + PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_19_VERSION ) with open( f"{TEST_BASE_PATH}/alpine/Dockerfile", @@ -95,24 +95,24 @@ def test_update_docker_file_alpine(): ) as reader: content = reader.read() lines = content.splitlines() - assert lines[2].strip() == f"FROM postgres:{POSTGRES_18_VERSION}-alpine" + assert lines[2].strip() == f"FROM postgres:{POSTGRES_19_VERSION}-alpine" assert lines[3].strip() == f"ARG VERSION={PROJECT_VERSION}" assert len(lines) == 58 -def test_update_docker_file_for_postgres16(): - update_docker_file_for_postgres16( - PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_16_VERSION +def test_update_docker_file_for_postgres17(): + update_docker_file_for_postgres17( + PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_17_VERSION ) with open( - f"{TEST_BASE_PATH}/postgres-16/Dockerfile", + f"{TEST_BASE_PATH}/postgres-17/Dockerfile", "r", encoding=DEFAULT_ENCODING_FOR_FILE_HANDLING, errors=DEFAULT_UNICODE_ERROR_HANDLER, ) as reader: content = reader.read() lines = content.splitlines() - assert lines[2].strip() == f"FROM postgres:{POSTGRES_16_VERSION}" + assert lines[2].strip() == f"FROM postgres:{POSTGRES_17_VERSION}" assert lines[3].strip() == f"ARG VERSION={PROJECT_VERSION}" assert ( f"postgresql-$PG_MAJOR-{PROJECT_NAME}-" @@ -122,19 +122,19 @@ def test_update_docker_file_for_postgres16(): assert len(lines) == 42 -def test_update_docker_file_for_postgres17(): - update_docker_file_for_postgres17( - PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_17_VERSION +def test_update_docker_file_for_postgres18(): + update_docker_file_for_postgres18( + PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_18_VERSION ) with open( - f"{TEST_BASE_PATH}/postgres-17/Dockerfile", + f"{TEST_BASE_PATH}/postgres-18/Dockerfile", "r", encoding=DEFAULT_ENCODING_FOR_FILE_HANDLING, errors=DEFAULT_UNICODE_ERROR_HANDLER, ) as reader: content = reader.read() lines = content.splitlines() - assert lines[2].strip() == f"FROM postgres:{POSTGRES_17_VERSION}" + assert lines[2].strip() == f"FROM postgres:{POSTGRES_18_VERSION}" assert lines[3].strip() == f"ARG VERSION={PROJECT_VERSION}" assert ( f"postgresql-$PG_MAJOR-{PROJECT_NAME}-" @@ -144,19 +144,19 @@ def test_update_docker_file_for_postgres17(): assert len(lines) == 42 -def test_update_docker_file_for_postgres18(): - update_docker_file_for_postgres18( - PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_18_VERSION +def test_update_docker_file_for_postgres19(): + update_docker_file_for_postgres19( + PROJECT_VERSION, TEMPLATE_PATH, TEST_BASE_PATH, POSTGRES_19_VERSION ) with open( - f"{TEST_BASE_PATH}/postgres-18/Dockerfile", + f"{TEST_BASE_PATH}/postgres-19/Dockerfile", "r", encoding=DEFAULT_ENCODING_FOR_FILE_HANDLING, errors=DEFAULT_UNICODE_ERROR_HANDLER, ) as reader: content = reader.read() lines = content.splitlines() - assert lines[2].strip() == f"FROM postgres:{POSTGRES_18_VERSION}" + assert lines[2].strip() == f"FROM postgres:{POSTGRES_19_VERSION}" assert lines[3].strip() == f"ARG VERSION={PROJECT_VERSION}" assert ( f"postgresql-$PG_MAJOR-{PROJECT_NAME}-" @@ -201,6 +201,6 @@ def test_update_changelog_without_postgres(): def test_pkgvar_postgres_version_existence(): config = dotenv_values(PKGVARS_FILE) - assert config["postgres_16_version"] assert config["postgres_17_version"] assert config["postgres_18_version"] + assert config["postgres_19_version"] diff --git a/packaging_automation/update_docker.py b/packaging_automation/update_docker.py index 936e9d1f..14cbd8a3 100644 --- a/packaging_automation/update_docker.py +++ b/packaging_automation/update_docker.py @@ -29,27 +29,27 @@ class SupportedDockerImages(Enum): latest = 1 docker_compose = 2 alpine = 3 - postgres16 = 4 - postgres17 = 5 - postgres18 = 6 + postgres17 = 4 + postgres18 = 5 + postgres19 = 6 docker_templates = { SupportedDockerImages.latest: "latest/latest.tmpl.dockerfile", SupportedDockerImages.docker_compose: "latest/docker-compose.tmpl.yml", SupportedDockerImages.alpine: "alpine/alpine.tmpl.dockerfile", - SupportedDockerImages.postgres16: "postgres-16/postgres-16.tmpl.dockerfile", SupportedDockerImages.postgres17: "postgres-17/postgres-17.tmpl.dockerfile", SupportedDockerImages.postgres18: "postgres-18/postgres-18.tmpl.dockerfile", + SupportedDockerImages.postgres19: "postgres-19/postgres-19.tmpl.dockerfile", } docker_outputs = { SupportedDockerImages.latest: "Dockerfile", SupportedDockerImages.docker_compose: "docker-compose.yml", SupportedDockerImages.alpine: "alpine/Dockerfile", - SupportedDockerImages.postgres16: "postgres-16/Dockerfile", SupportedDockerImages.postgres17: "postgres-17/Dockerfile", SupportedDockerImages.postgres18: "postgres-18/Dockerfile", + SupportedDockerImages.postgres19: "postgres-19/Dockerfile", } BASE_PATH = pathlib2.Path(__file__).parent.absolute() @@ -102,7 +102,7 @@ def update_docker_file_alpine( write_to_file(content, dest_file_name) -def update_docker_file_for_postgres18( +def update_docker_file_for_postgres19( project_version: str, template_path: str, exec_path: str, postgres_version: str ): minor_version = get_minor_project_version_for_docker(project_version) @@ -110,16 +110,16 @@ def update_docker_file_for_postgres18( content = process_template_file_with_minor( debian_project_version, template_path, - docker_templates[SupportedDockerImages.postgres18], + docker_templates[SupportedDockerImages.postgres19], minor_version, postgres_version, ) - dest_file_name = f"{exec_path}/{docker_outputs[SupportedDockerImages.postgres18]}" + dest_file_name = f"{exec_path}/{docker_outputs[SupportedDockerImages.postgres19]}" create_directory_if_not_exists(dest_file_name) write_to_file(content, dest_file_name) -def update_docker_file_for_postgres17( +def update_docker_file_for_postgres18( project_version: str, template_path: str, exec_path: str, postgres_version: str ): minor_version = get_minor_project_version_for_docker(project_version) @@ -127,16 +127,16 @@ def update_docker_file_for_postgres17( content = process_template_file_with_minor( debian_project_version, template_path, - docker_templates[SupportedDockerImages.postgres17], + docker_templates[SupportedDockerImages.postgres18], minor_version, postgres_version, ) - dest_file_name = f"{exec_path}/{docker_outputs[SupportedDockerImages.postgres17]}" + dest_file_name = f"{exec_path}/{docker_outputs[SupportedDockerImages.postgres18]}" create_directory_if_not_exists(dest_file_name) write_to_file(content, dest_file_name) -def update_docker_file_for_postgres16( +def update_docker_file_for_postgres17( project_version: str, template_path: str, exec_path: str, postgres_version: str ): minor_version = get_minor_project_version_for_docker(project_version) @@ -144,11 +144,11 @@ def update_docker_file_for_postgres16( content = process_template_file_with_minor( debian_project_version, template_path, - docker_templates[SupportedDockerImages.postgres16], + docker_templates[SupportedDockerImages.postgres17], minor_version, postgres_version, ) - dest_file_name = f"{exec_path}/{docker_outputs[SupportedDockerImages.postgres16]}" + dest_file_name = f"{exec_path}/{docker_outputs[SupportedDockerImages.postgres17]}" create_directory_if_not_exists(dest_file_name) write_to_file(content, dest_file_name) @@ -194,12 +194,12 @@ def update_all_docker_files(project_version: str, exec_path: str): pkgvars_file = f"{exec_path}/pkgvars" ( + postgres_19_version, postgres_18_version, postgres_17_version, - postgres_16_version, ) = read_postgres_versions(pkgvars_file) - latest_postgres_version = postgres_18_version + latest_postgres_version = postgres_19_version update_docker_file_for_latest_postgres( project_version, template_path, exec_path, latest_postgres_version @@ -208,24 +208,24 @@ def update_all_docker_files(project_version: str, exec_path: str): update_docker_file_alpine( project_version, template_path, exec_path, latest_postgres_version ) - update_docker_file_for_postgres16( - project_version, template_path, exec_path, postgres_16_version - ) update_docker_file_for_postgres17( project_version, template_path, exec_path, postgres_17_version ) update_docker_file_for_postgres18( project_version, template_path, exec_path, postgres_18_version ) + update_docker_file_for_postgres19( + project_version, template_path, exec_path, postgres_19_version + ) update_changelog(project_version, exec_path) def read_postgres_versions(pkgvars_file: str) -> Tuple[str, str, str]: config = dotenv_values(pkgvars_file) return ( + config["postgres_19_version"], config["postgres_18_version"], config["postgres_17_version"], - config["postgres_16_version"], ) @@ -253,7 +253,7 @@ def read_postgres_versions(pkgvars_file: str) -> Tuple[str, str, str]: run(f"git checkout -b {pr_branch}") update_all_docker_files(args.prj_ver, execution_path) - run("git add --update .") + run("git add -A .") commit_message = f"Bump docker to version {args.prj_ver}" run(f'git commit -m "{commit_message}"') diff --git a/test-images/almalinux-9/Dockerfile b/test-images/almalinux-9/Dockerfile index 9c980652..3e1aa335 100644 --- a/test-images/almalinux-9/Dockerfile +++ b/test-images/almalinux-9/Dockerfile @@ -4,8 +4,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ARG PACKAGE_RELEASE_SUFFIX=el9 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/centos-8/Dockerfile b/test-images/centos-8/Dockerfile index f9a23792..51d4170b 100644 --- a/test-images/centos-8/Dockerfile +++ b/test-images/centos-8/Dockerfile @@ -5,8 +5,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ARG PACKAGE_RELEASE_SUFFIX=el8 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/debian-bookworm/Dockerfile b/test-images/debian-bookworm/Dockerfile index a3cd6a88..fa1ac2c5 100644 --- a/test-images/debian-bookworm/Dockerfile +++ b/test-images/debian-bookworm/Dockerfile @@ -4,8 +4,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/debian-bullseye/Dockerfile b/test-images/debian-bullseye/Dockerfile index 746f1cb5..448df625 100644 --- a/test-images/debian-bullseye/Dockerfile +++ b/test-images/debian-bullseye/Dockerfile @@ -4,8 +4,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/debian-trixie/Dockerfile b/test-images/debian-trixie/Dockerfile index 5a6403a9..29365690 100644 --- a/test-images/debian-trixie/Dockerfile +++ b/test-images/debian-trixie/Dockerfile @@ -4,8 +4,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.18.citus-1 -ARG TOPN_VERSION=2.6.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/ol-9/Dockerfile b/test-images/ol-9/Dockerfile index 8b3e50c1..181fe261 100644 --- a/test-images/ol-9/Dockerfile +++ b/test-images/ol-9/Dockerfile @@ -5,8 +5,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ARG PACKAGE_RELEASE_SUFFIX=el9 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/ubuntu-jammy/Dockerfile b/test-images/ubuntu-jammy/Dockerfile index cf3e5f85..a1001221 100644 --- a/test-images/ubuntu-jammy/Dockerfile +++ b/test-images/ubuntu-jammy/Dockerfile @@ -4,8 +4,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ENV CITUS_VERSION ${CITUS_VERSION} diff --git a/test-images/ubuntu-noble/Dockerfile b/test-images/ubuntu-noble/Dockerfile index d085a660..1c5d6d33 100644 --- a/test-images/ubuntu-noble/Dockerfile +++ b/test-images/ubuntu-noble/Dockerfile @@ -4,8 +4,8 @@ ARG CITUS_VERSION ARG CITUS_MAJOR_VERSION ARG PG_MAJOR ARG FANCY=1 -ARG HLL_VERSION=2.19.citus-1 -ARG TOPN_VERSION=2.7.0.citus-1 +ARG HLL_VERSION=2.21.citus-1 +ARG TOPN_VERSION=2.7.1.citus-1 ENV CITUS_VERSION ${CITUS_VERSION} From dbe5abddd0559ec8fa40b5d2f75d47b75cb2555f Mon Sep 17 00:00:00 2001 From: Ibrahim Halatci Date: Thu, 20 Aug 2026 12:51:23 +0300 Subject: [PATCH 2/3] Sync latest/alpine docker templates with citusdata/docker The latest and alpine templates had drifted behind the docker repo, so every release run silently reverted manual fixes made there: - alpine: clang/llvm -> clang21/llvm21 (c9917b8, re-applied in 75bc0c2). Alpine has no unversioned llvm package, so reverting this would break the PG19 alpine build. - latest: back-port the hadolint hardening from b47008b (SHELL pipefail, pinned =* apt specs, --no-install-recommends, quoted package specs, sed merged into the chmod RUN). Both templates now render byte-identical to the committed docker files. The latest template gained one line, so its line-index assertions in test_update_docker.py were adjusted accordingly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1ed7b58a-0ba9-4f47-a1de-3ee665bae7f2 --- .../docker/alpine/alpine.tmpl.dockerfile | 4 ++-- .../docker/latest/latest.tmpl.dockerfile | 15 ++++++++------- packaging_automation/tests/test_update_docker.py | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packaging_automation/templates/docker/alpine/alpine.tmpl.dockerfile b/packaging_automation/templates/docker/alpine/alpine.tmpl.dockerfile index f1d89cf8..c30656d1 100644 --- a/packaging_automation/templates/docker/alpine/alpine.tmpl.dockerfile +++ b/packaging_automation/templates/docker/alpine/alpine.tmpl.dockerfile @@ -20,8 +20,8 @@ RUN apk add --no-cache \ curl-dev \ openssl-dev \ ca-certificates \ - clang \ - llvm \ + clang21 \ + llvm21 \ lz4-dev \ zstd-dev \ libxslt-dev \ diff --git a/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile b/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile index 83c7e028..5adde3b6 100644 --- a/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile +++ b/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile @@ -14,14 +14,15 @@ LABEL maintainer="Citus Data https://citusdata.com" \ ENV CITUS_VERSION ${VERSION}.citus-1 # install Citus +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update \ && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ + ca-certificates=* \ + curl=* \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ - && apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.21.citus-1 \ - postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \ + && apt-get install -y --no-install-recommends "postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION" \ + "postgresql-$PG_MAJOR-hll=2.21.citus-1" \ + "postgresql-$PG_MAJOR-topn=2.7.1.citus-1" \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* @@ -33,10 +34,10 @@ COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/ # add health check script COPY pg_healthcheck wait-for-manager.sh / -RUN chmod +x /wait-for-manager.sh +RUN chmod +x /wait-for-manager.sh \ + && sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh # entry point unsets PGPASSWORD, but we need it to connect to workers # https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303 -RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck diff --git a/packaging_automation/tests/test_update_docker.py b/packaging_automation/tests/test_update_docker.py index cc2fb8a5..bf00928f 100644 --- a/packaging_automation/tests/test_update_docker.py +++ b/packaging_automation/tests/test_update_docker.py @@ -62,9 +62,9 @@ def test_update_docker_file_for_latest_postgres(): assert ( f"postgresql-$PG_MAJOR-{PROJECT_NAME}-" f"{version_details['major']}.{version_details['minor']}=$CITUS_VERSION" - in lines[21] + in lines[22] ) - assert len(lines) == 42 + assert len(lines) == 43 def test_update_regular_docker_compose_file(): From 2543c95ebbe5a5579a016c929ac13ba95251528f Mon Sep 17 00:00:00 2001 From: Ibrahim Halatci Date: Fri, 21 Aug 2026 11:48:48 +0300 Subject: [PATCH 3/3] Fix CI: alpine test fixture and package-tests fallback version Two CI regressions from this branch: 1. dbe5abd synced the alpine docker template with citusdata/docker, bumping clang/llvm to clang21/llvm21. test_process_template_file compares the rendered template byte-for-byte against expected_alpine_10.0.3.txt, so the fixture needs the same change. 2. The package-tests.yml fallback was bumped from 14.1.0 to 15.0.0, but Citus 15.0.0 is not released yet, so every test_execution job failed on "No match for argument: citus150_-15.0.0.citus-1". Reverted to 14.1.0. The bump is not needed for PostgreSQL 19 support: 15.0.0 currently resolves to the same [16, 17, 18] matrix as 14.1.0, because packaging's postgres-matrix.yml has no 15.0 entry yet. Both should be updated together when Citus 15.0 ships. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1ed7b58a-0ba9-4f47-a1de-3ee665bae7f2 --- .github/workflows/package-tests.yml | 6 +++--- .../tests/files/verify/expected_alpine_10.0.3.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/package-tests.yml b/.github/workflows/package-tests.yml index a7592db0..818c0d60 100644 --- a/.github/workflows/package-tests.yml +++ b/.github/workflows/package-tests.yml @@ -37,8 +37,8 @@ jobs: export PROJECT_VERSION="${{ github.event.inputs.project_version }}" echo "project_version: ${{ github.event.inputs.project_version }}" # To be able to test pipeline without triggering with project_version parameter using workflow_dispatch parameter, - # if workflow_dispatch parameter is empty, 15.0.0 parameter is set to execute pipeline. - [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=15.0.0 + # if workflow_dispatch parameter is empty, 14.1.0 parameter is set to execute pipeline. + [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=14.1.0 POSTGRES_VERSIONS=$(python -m packaging_automation.get_postgres_versions --project_version ${PROJECT_VERSION}) echo "Postgres Version: ${POSTGRES_VERSIONS}" echo "::set-output name=pg_versions::${POSTGRES_VERSIONS}" @@ -73,7 +73,7 @@ jobs: run: | export PROJECT_VERSION="${{ github.event.inputs.project_version }}" echo "Citus Version: ${PROJECT_VERSION} " - [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=15.0.0 + [ -z ${PROJECT_VERSION} ] && export PROJECT_VERSION=14.1.0 python -m packaging_automation.test_citus_package \ --project_version "${PROJECT_VERSION}" \ --os_release ${{ matrix.platform }} \ diff --git a/packaging_automation/tests/files/verify/expected_alpine_10.0.3.txt b/packaging_automation/tests/files/verify/expected_alpine_10.0.3.txt index a518032c..11178bc8 100644 --- a/packaging_automation/tests/files/verify/expected_alpine_10.0.3.txt +++ b/packaging_automation/tests/files/verify/expected_alpine_10.0.3.txt @@ -20,8 +20,8 @@ RUN apk add --no-cache \ curl-dev \ openssl-dev \ ca-certificates \ - clang \ - llvm \ + clang21 \ + llvm21 \ lz4-dev \ zstd-dev \ libxslt-dev \