Skip to content

M3hm3t/pg 18 dev #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build-test-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
if: github.ref_name != 'master'
name: push-test-images-for-dev
runs-on: ubuntu-latest
permissions: write-all
needs:
- prepare_pgversion_matrix
strategy:
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
if: github.ref_name != 'master'
name: push-test-images-for-dev
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -85,6 +87,7 @@ jobs:
if: github.ref_name == 'master'
name: push-test-images-for-release
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false

Expand Down
7 changes: 4 additions & 3 deletions circleci/images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ STYLE_CHECKER_TOOLS_VERSION=0.8.18

# we should add more majors/citus versions when we address https://github.com/citusdata/citus/issues/4807
CITUS_UPGRADE_PG_VERSIONS=$(shell head -n1 PG_VERSIONS|cut -c 6-|tr '\n' ' ' )
# 10.2.0 is the oldest version supporting PG14, whereas 11.3.0 is for upgrade_pg_dist_cleanup tests
CITUS_UPGRADE_VERSIONS=v10.2.0 v11.3.0
# 11.1.0 is the oldest version supporting PG15, whereas 11.3.0 is for upgrade_pg_dist_cleanup tests
CITUS_UPGRADE_VERSIONS=v11.1.0 v11.3.0

# code below creates targets for all postgres versions in PG_VERSIONS
define make-image-targets
Expand Down Expand Up @@ -87,7 +87,8 @@ push-failtester-all:: push-failtester-$1
endef

# call make-image-targets($PG_VERSION, $PG_MAJOR) for every version in PG_VERSIONS
$(foreach element,$(PG_VERSIONS),$(eval $(call make-image-targets,$(element),$(shell echo $(element) | awk -F'[^0-9]*' '/[0-9]/ { print $$1 }'),$(shell echo $(element) | sed 's/~//'))))
#$(foreach element,$(PG_VERSIONS),$(eval $(call make-image-targets,$(element),$(shell echo $(element) | awk -F'[^0-9]*' '/[0-9]/ { print $$1 }'),$(shell echo $(element) | sed 's/~//'))))
$(foreach element,$(PG_VERSIONS),$(eval $(call make-image-targets,$(element),$(shell echo $(element)|awk -F'[^0-9]*' '/[0-9]/{print$$1}'),$(subst ~,,$(element)))))

define make-citus-upgrage-targets
# $1 = PG_VERSION
Expand Down
8 changes: 4 additions & 4 deletions circleci/images/PG_VERSIONS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PG14=14.14
PG15=15.9
PG16=16.5
PG17=17.1
PG15=15.12
PG16=16.8
PG17=17.4
PG18=18~beta1
11 changes: 10 additions & 1 deletion circleci/images/citusupgradetester/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,17 @@ curl -sf https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt bullseye-pgdg-archive main" >> /etc/apt/sources.list.d/postgresql.list

# # bring in the 18 devel/beta packages
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg-testing main 18" >> /etc/apt/sources.list.d/pgdg-testing.list

apt-get update

# infer the pgdgversion of postgres based on the $PG_VERSION
pgdg_version=$(apt list -a postgresql-server-dev-${PG_MAJOR} 2>/dev/null | grep "${PG_VERSION}" | awk '{print $2}' | head -n1 )

apt-get install -y --no-install-recommends --allow-downgrades \
libpq-dev=${pgdg_version} \
libpq5=${pgdg_version} \
libpq-dev=${pgdg_version} \
postgresql-${PG_MAJOR}=${pgdg_version} \
postgresql-client-${PG_MAJOR}=${pgdg_version} \
postgresql-${PG_MAJOR}-dbgsym=${pgdg_version} \
Expand All @@ -79,6 +82,12 @@ apt-get install -y --no-install-recommends --allow-downgrades \
rm -rf /var/lib/apt/lists/*
EOF

# now do the symlink (outside the heredoc!) in its own layer
RUN ln -s /usr/lib/x86_64-linux-gnu/libpq.so.5 \
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5 && \
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf && \
ldconfig

# add postgress to the path
ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin/:$PATH

Expand Down
11 changes: 10 additions & 1 deletion circleci/images/extbuilder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ curl -sf https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt bullseye-pgdg-archive main" >> /etc/apt/sources.list.d/postgresql.list

# # bring in the 18 devel/beta packages
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg-testing main 18" >> /etc/apt/sources.list.d/pgdg-testing.list

apt-get update

# infer the pgdgversion of postgres based on the $PG_VERSION
pgdg_version=$(apt list -a postgresql-server-dev-${PG_MAJOR} 2>/dev/null | grep "${PG_VERSION}" | awk '{print $2}' | head -n1 )

apt-get install -y --no-install-recommends --allow-downgrades \
libpq-dev=${pgdg_version} \
libpq5=${pgdg_version} \
libpq-dev=${pgdg_version} \
postgresql-${PG_MAJOR}=${pgdg_version} \
postgresql-client-${PG_MAJOR}=${pgdg_version} \
postgresql-${PG_MAJOR}-dbgsym=${pgdg_version} \
Expand All @@ -68,5 +71,11 @@ apt-get install -y --no-install-recommends --allow-downgrades \
rm -rf /var/lib/apt/lists/*
EOF

# now do the symlink (outside the heredoc!) in its own layer
RUN ln -s /usr/lib/x86_64-linux-gnu/libpq.so.5 \
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5 && \
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf && \
ldconfig

USER circleci
WORKDIR /home/circleci
21 changes: 18 additions & 3 deletions circleci/images/exttester/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,17 @@ curl -sf https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt bullseye-pgdg-archive main" >> /etc/apt/sources.list.d/postgresql.list

# # bring in the 18 devel/beta packages
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg-testing main 18" >> /etc/apt/sources.list.d/pgdg-testing.list

apt-get update

# infer the pgdgversion of postgres based on the $PG_VERSION
pgdg_version=$(apt list -a postgresql-server-dev-${PG_MAJOR} 2>/dev/null | grep "${PG_VERSION}" | awk '{print $2}' | head -n1 )

apt-get install -y --no-install-recommends --allow-downgrades \
libdbi-perl \
libdbd-pg-perl \
libpq-dev=${pgdg_version} \
libpq5=${pgdg_version} \
libpq-dev=${pgdg_version} \
postgresql-${PG_MAJOR}=${pgdg_version} \
postgresql-client-${PG_MAJOR}=${pgdg_version} \
postgresql-${PG_MAJOR}-dbgsym=${pgdg_version} \
Expand All @@ -177,6 +178,20 @@ apt-get install -y --no-install-recommends --allow-downgrades \
rm -rf /var/lib/apt/lists/*
EOF

# ---------- copy helper binaries ----------
COPY --from=dev-tools-collection /collect/ /

# now do the symlink (outside the heredoc!) in its own layer
RUN apt-get update && \
apt-get install -y --no-install-recommends --reinstall libpq5 && \
rm -rf /var/lib/apt/lists/* && \
# 4. satisfy RUNPATH
ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5 && \
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf && \
ldconfig
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libpq.so.5"

# add postgress to the path
ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin/:$PATH

Expand Down
11 changes: 10 additions & 1 deletion circleci/images/failtester/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ curl -sf https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt bullseye-pgdg-archive main" >> /etc/apt/sources.list.d/postgresql.list

# # bring in the 18 devel/beta packages
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg-testing main 18" >> /etc/apt/sources.list.d/pgdg-testing.list

apt-get update

# infer the pgdgversion of postgres based on the $PG_VERSION
pgdg_version=$(apt list -a postgresql-server-dev-${PG_MAJOR} 2>/dev/null | grep "${PG_VERSION}" | awk '{print $2}' | head -n1 )

apt-get install -y --no-install-recommends --allow-downgrades \
libpq-dev=${pgdg_version} \
libpq5=${pgdg_version} \
libpq-dev=${pgdg_version} \
postgresql-${PG_MAJOR}=${pgdg_version} \
postgresql-client-${PG_MAJOR}=${pgdg_version} \
postgresql-${PG_MAJOR}-dbgsym=${pgdg_version} \
Expand All @@ -78,6 +81,12 @@ apt-get install -y --no-install-recommends --allow-downgrades \
rm -rf /var/lib/apt/lists/*
EOF

# now do the symlink (outside the heredoc!) in its own layer
RUN ln -s /usr/lib/x86_64-linux-gnu/libpq.so.5 \
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5 && \
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf && \
ldconfig

# add postgress to the path
ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin/:$PATH

Expand Down
3 changes: 3 additions & 0 deletions circleci/images/pgupgradetester/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ curl -sf https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt bullseye-pgdg-archive main" >> /etc/apt/sources.list.d/postgresql.list

# # bring in the 18 devel/beta packages
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg-testing main 18" >> /etc/apt/sources.list.d/pgdg-testing.list

apt-get update

pkgs=();
Expand Down