-
-
Notifications
You must be signed in to change notification settings - Fork 209
chore: fix and enable pljava #690
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
Changes from all commits
47d6c35
7a77831
095d81e
655ff6f
764cbc2
b8a8fc5
4f8131d
5b4de21
5bea56e
d057338
6a53f3f
0e9c321
36d6a7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ jobs: | |
- uses: docker/setup-buildx-action@v2 | ||
with: | ||
endpoint: builders | ||
driver-opts: image=moby/buildkit:v0.11.6 | ||
buildkitd-flags: --debug | ||
- uses: docker/build-push-action@v3 | ||
with: | ||
push: false | ||
|
@@ -56,7 +58,7 @@ jobs: | |
tags: supabase/postgres:extensions | ||
platforms: linux/${{ matrix.arch }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
cache-to: type=gha,mode=max,ignore-error=true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also no point crashing the entire workflow if the build cache push fails |
||
|
||
- name: Extract built packages | ||
run: | | ||
|
@@ -80,11 +82,12 @@ jobs: | |
ubuntu_release_no=${{ matrix.ubuntu_version }} | ||
postgresql_major=${{ steps.version.outputs.postgresql_major }} | ||
postgresql_release=${{ steps.version.outputs.postgresql_release }} | ||
CPPFLAGS=-mcpu=${{ matrix.mcpu }} | ||
CPPFLAGS= | ||
DEB_BUILD_PROFILES=pkg.postgresql.nozstd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Building Postgres from source requires libzstd 1.4.0+, whereas Ubuntu 18 only has versions up to 1.3.3 available. |
||
tags: supabase/postgres:deb-u18 | ||
platforms: linux/${{ matrix.arch }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
cache-to: type=gha,mode=max,ignore-error=true | ||
- name: Extract Postgres deb | ||
run: | | ||
mkdir -p /tmp/build ansible/files/postgres | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ ARG plpgsql_check_release=2.2.5 | |
ARG pg_safeupdate_release=1.4 | ||
ARG timescaledb_release=2.9.1 | ||
ARG wal2json_release=2_5 | ||
ARG pljava_release=1.6.4 | ||
ARG pljava_release=1_6_5 | ||
ARG plv8_release=3.1.5 | ||
ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 | ||
ARG pg_net_release=0.7.1 | ||
|
@@ -403,11 +403,10 @@ RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgver | |
#################### | ||
FROM builder as pljava-source | ||
# Download and extract | ||
# TODO: revert to using main repo after PG15 support is merged: https://github.com/tada/pljava/pull/413 | ||
ARG pljava_release=master | ||
ARG pljava_release_checksum=sha256:e99b1c52f7b57f64c8986fe6ea4a6cc09d78e779c1643db060d0ac66c93be8b6 | ||
ARG pljava_release=1_6_5 | ||
ARG pljava_release_checksum=sha256:e1492b237eac8aaed6792feb26b8fa06b9c6ec3bd0a61ecd7a90e175dd1f1c5a | ||
ADD --checksum=${pljava_release_checksum} \ | ||
"https://github.com/supabase/pljava/archive/refs/heads/${pljava_release}.tar.gz" \ | ||
"https://github.com/tada/pljava/archive/refs/tags/V${pljava_release}.tar.gz" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reverting to original repo since PG15 support was merged in the meantime |
||
/tmp/pljava.tar.gz | ||
RUN tar -xvf /tmp/pljava.tar.gz -C /tmp && \ | ||
rm -rf /tmp/pljava.tar.gz | ||
|
@@ -422,15 +421,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
WORKDIR /tmp/pljava-${pljava_release} | ||
RUN mvn -T 1C clean install -Dmaven.test.skip -DskipTests -Dmaven.javadoc.skip=true | ||
# Create debian package | ||
RUN cp pljava-packaging/target/pljava-pg${postgresql_major}.jar /tmp/ | ||
|
||
FROM base as pljava | ||
# Download pre-built packages | ||
RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ | ||
default-jdk-headless \ | ||
postgresql-${postgresql_major}-pljava \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN mv /var/cache/apt/archives/*.deb /tmp/ | ||
RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgname=pljava --pkgversion="\${pljava_release//_/.}" --requires=default-jdk-headless --exclude /proc/ --nodoc java -jar pljava-packaging/target/pljava-pg${postgresql_major}.jar | ||
|
||
#################### | ||
# 13-plv8.yml | ||
|
@@ -832,7 +823,7 @@ COPY --from=plpgsql_check-source /tmp/*.deb /tmp/ | |
COPY --from=pg-safeupdate-source /tmp/*.deb /tmp/ | ||
COPY --from=timescaledb-source /tmp/*.deb /tmp/ | ||
COPY --from=wal2json-source /tmp/*.deb /tmp/ | ||
# COPY --from=pljava /tmp/*.deb /tmp/ | ||
COPY --from=pljava-source /tmp/*.deb /tmp/ | ||
COPY --from=plv8 /tmp/*.deb /tmp/ | ||
COPY --from=pg_plan_filter-source /tmp/*.deb /tmp/ | ||
COPY --from=pg_net-source /tmp/*.deb /tmp/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
postgres-version = "15.1.0.100" | ||
postgres-version = "15.1.0.101" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
BEGIN; | ||
create extension if not exists pljava with schema "sqlj"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pljava creates the sqlj schema automatically |
||
create extension if not exists pljava; | ||
ROLLBACK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated buildkit just in case it'd help us avoid connection reset errors; default was running under v0.10.0