Skip to content

Commit

Permalink
Add CI jobs for PostgreSQL 17 (#196)
Browse files Browse the repository at this point in the history
Closes GH-195
  • Loading branch information
kou authored Jan 1, 2025
1 parent cfcebea commit 9366707
Show file tree
Hide file tree
Showing 20 changed files with 351 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
- "ubuntu-jammy-amd64-postgresql-15-pgdg"
- "debian-bookworm-amd64-postgresql-16-pgdg"
- "ubuntu-jammy-amd64-postgresql-16-pgdg"
- "debian-bookworm-amd64-postgresql-17-pgdg"
- "ubuntu-noble-amd64-postgresql-17-pgdg"
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
postgresql-version:
- "15"
- "16"
- "17"
steps:
- uses: actions/checkout@v4
- name: Prepare
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/verify-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
postgresql-version:
- "15"
- "16"
- "17"
steps:
- uses: actions/checkout@v4
- name: Prepare
Expand Down
6 changes: 4 additions & 2 deletions ci/scripts/prepare-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ wget https://apache.jfrog.io/artifactory/arrow/${os}/${apt_source_deb}
sudo apt install -y -V ./${apt_source_deb}

wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import -
gpg --no-default-keyring --keyring ./pgdg.kbx --import -
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor | \
tee /usr/share/keyrings/pgdg.asc
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
sudo tee /etc/apt/sources.list.d/pgdg.sources

sudo apt update
Expand Down
6 changes: 4 additions & 2 deletions package/apt/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@ case "${TYPE}" in
esac

wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import -
gpg --no-default-keyring --keyring ./pgdg.kbx --import -
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor | \
tee /usr/share/keyrings/pgdg.asc
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources

echo "::endgroup::"
Expand Down
2 changes: 2 additions & 0 deletions package/arrow-flight-sql-postgresql-package-task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def apt_targets_default
# "debian-bookworm-arm64",
"ubuntu-jammy-amd64",
# "ubuntu-jammy-arm64",
"ubuntu-noble-amd64",
# "ubuntu-noble-arm64",
]
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ RUN \
./apache-arrow-apt-source-latest-${code_name}.deb && \
rm apache-arrow-apt-source-latest-${code_name}.deb && \
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \
/usr/share/keyrings/pgdg.asc && \
rm pgdg.kbx && \
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources && \
apt update && \
apt install -y -V ${quiet} \
Expand Down
7 changes: 5 additions & 2 deletions package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ RUN \
./apache-arrow-apt-source-latest-${code_name}.deb && \
rm apache-arrow-apt-source-latest-${code_name}.deb && \
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \
/usr/share/keyrings/pgdg.asc && \
rm pgdg.kbx && \
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources && \
apt update && \
apt install -y -V ${quiet} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ RUN \
./apache-arrow-apt-source-latest-${code_name}.deb && \
rm apache-arrow-apt-source-latest-${code_name}.deb && \
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \
/usr/share/keyrings/pgdg.asc && \
rm pgdg.kbx && \
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources && \
apt update && \
apt install -y -V ${quiet} \
Expand Down
7 changes: 5 additions & 2 deletions package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ RUN \
./apache-arrow-apt-source-latest-${code_name}.deb && \
rm apache-arrow-apt-source-latest-${code_name}.deb && \
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \
/usr/share/keyrings/pgdg.asc && \
rm pgdg.kbx && \
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources && \
apt update && \
apt install -y -V ${quiet} \
Expand Down
36 changes: 36 additions & 0 deletions package/postgresql-17-pgdg/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

FROM postgres:17-bookworm

COPY package/docker/postgresql-17-pgdg-apache-arrow-flight-sql_*_amd64.deb ./
RUN \
apt update && \
apt install -y -V lsb-release wget && \
wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
rm apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
apt update && \
apt install -y -V \
./postgresql-17-pgdg-apache-arrow-flight-sql_*.deb && \
rm -f postgresql-17-pgdg-apache-arrow-flight-sql_*.deb && \
apt clean && \
rm -rf /var/lib/apt/lists/*

COPY package/docker/apache-arrow-flight-sql-enable.sh /docker-entrypoint-initdb.d/

EXPOSE 15432
32 changes: 32 additions & 0 deletions package/postgresql-17-pgdg/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- ruby -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require_relative "../arrow-flight-sql-postgresql-package-task"

class PostgreSQL17PGDGPackageTask < ArrowFlightSQLPostgreSQLPackageTask
def initialize
super("postgresql-17-pgdg-apache-arrow-flight-sql")
end

def enable_yum?
false
end
end

PostgreSQL17PGDGPackageTask.new.define
71 changes: 71 additions & 0 deletions package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

ARG FROM=debian:bookworm
FROM ${FROM}

RUN \
echo "debconf debconf/frontend select Noninteractive" | \
debconf-set-selections

RUN \
echo 'APT::Install-Recommends "false";' > \
/etc/apt/apt.conf.d/disable-install-recommends

RUN \
sed -i'' -e 's/main$/main contrib non-free/g' \
/etc/apt/sources.list.d/debian.sources

ARG DEBUG
RUN \
quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
apt update ${quiet} && \
apt install -y -V ${quiet} \
ca-certificates \
gpg \
lsb-release \
wget && \
distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') && \
code_name=$(lsb_release --codename --short) && \
wget https://apache.jfrog.io/artifactory/arrow/${distribution}/apache-arrow-apt-source-latest-${code_name}.deb && \
apt install -y -V ${quiet} \
./apache-arrow-apt-source-latest-${code_name}.deb && \
rm apache-arrow-apt-source-latest-${code_name}.deb && \
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \
/usr/share/keyrings/pgdg.asc && \
rm pgdg.kbx && \
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources && \
apt update && \
apt install -y -V ${quiet} \
build-essential \
ccache \
cmake \
debhelper \
devscripts \
libarrow-flight-sql-dev \
libkrb5-dev \
meson \
ninja-build \
postgresql-server-dev-17 && \
apt clean
68 changes: 68 additions & 0 deletions package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

ARG FROM=ubuntu:24.04
FROM ${FROM}

RUN \
echo "debconf debconf/frontend select Noninteractive" | \
debconf-set-selections

RUN \
echo 'APT::Install-Recommends "false";' > \
/etc/apt/apt.conf.d/disable-install-recommends

ARG DEBUG
RUN \
quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
apt update ${quiet} && \
apt install -y -V ${quiet} \
ca-certificates \
gpg \
lsb-release \
wget && \
distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') && \
code_name=$(lsb_release --codename --short) && \
wget https://apache.jfrog.io/artifactory/arrow/${distribution}/apache-arrow-apt-source-latest-${code_name}.deb && \
apt install -y -V ${quiet} \
./apache-arrow-apt-source-latest-${code_name}.deb && \
rm apache-arrow-apt-source-latest-${code_name}.deb && \
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \
gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \
/usr/share/keyrings/pgdg.asc && \
rm pgdg.kbx && \
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \
tee /etc/apt/sources.list.d/pgdg.sources && \
apt update && \
apt install -y -V ${quiet} \
build-essential \
ccache \
cmake \
debhelper \
devscripts \
libarrow-flight-sql-dev \
libkrb5-dev \
meson \
ninja-build \
pkg-config \
postgresql-server-dev-17 && \
apt clean
Empty file.
41 changes: 41 additions & 0 deletions package/postgresql-17-pgdg/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

Source: postgresql-17-pgdg-apache-arrow-flight-sql
Section: database
Priority: optional
Maintainer: Apache Arrow Developers <[email protected]>
Build-Depends:
cmake,
debhelper-compat (= 13),
libarrow-flight-sql-dev,
libkrb5-dev,
meson,
postgresql-server-dev-17
Standards-Version: 4.6.0
Homepage: https://arrow.apache.org/flight-sql-postgresql/

Package: postgresql-17-pgdg-apache-arrow-flight-sql
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
postgresql-17
Description: Apache Arrow Flight SQL adapter for PostgreSQL
.
It provides a PostgreSQL module that adds Apache Arrow Flight SQL
interface to PostgreSQL.
Loading

0 comments on commit 9366707

Please sign in to comment.