Skip to content

Commit 9f9c7d4

Browse files
committed
ci: also verify under Docker with native deps
We've only really tested Conda so far. Validate non-Conda builds too.
1 parent 0faa846 commit 9f9c7d4

File tree

5 files changed

+191
-33
lines changed

5 files changed

+191
-33
lines changed

.github/workflows/nightly-verify.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ defaults:
3939
# 'bash' will expand to -eo pipefail
4040
shell: bash
4141

42+
concurrency:
43+
group: ${{ github.workflow }}-${{ github.ref }}
44+
cancel-in-progress: true
45+
4246
jobs:
4347
source:
4448
# For cron: only run on the main repo, not forks
@@ -201,3 +205,31 @@ jobs:
201205
run: |
202206
pushd arrow-adbc
203207
docker compose run -e PYTHON=3.12 --rm python-debug
208+
209+
source-verify-docker:
210+
name: "Verify Source (OS)/${{ matrix.os }} ${{ matrix.version }}"
211+
runs-on: ubuntu-latest
212+
strategy:
213+
max-parallel: 2
214+
matrix:
215+
include:
216+
- os: ubuntu
217+
version: "22.04"
218+
- os: ubuntu
219+
version: "24.04"
220+
steps:
221+
- uses: actions/checkout@v4
222+
with:
223+
fetch-depth: 0
224+
path: arrow-adbc
225+
persist-credentials: false
226+
submodules: recursive
227+
228+
- name: Verify
229+
env:
230+
OS: ${{ matrix.os }}
231+
OS_VERSION: ${{ matrix.version }}
232+
run: |
233+
# Hmm, -e doesn't work?
234+
pushd arrow-adbc
235+
env ${OS@U}=${OS_VERSION} docker compose run --rm verify-all-${OS}

ci/scripts/verify_ubuntu.sh

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
# Test the validation script using system dependencies instead of Conda. This
22+
# script is meant for automation (e.g. Docker), not a local/developer machine
23+
# (except via Docker).
24+
25+
set -euo pipefail
26+
27+
main() {
28+
local -r source_dir="${1}"
29+
30+
# Install all the dependencies we need for all the subprojects
31+
32+
# When installing tzdata, don't block and wait for user input
33+
export DEBIAN_FRONTEND=noninteractive
34+
export TZ=Etc/UTC
35+
36+
apt update
37+
apt install -y \
38+
apt-transport-https \
39+
build-essential \
40+
ca-certificates \
41+
cmake \
42+
curl \
43+
dirmngr \
44+
git \
45+
gobject-introspection \
46+
gpg \
47+
libgirepository1.0-dev \
48+
libglib2.0-dev \
49+
libgmock-dev \
50+
libgtest-dev \
51+
libpq-dev \
52+
libsqlite3-dev \
53+
lsb-release \
54+
ninja-build \
55+
pkg-config \
56+
python3 \
57+
python3-dev \
58+
python3-pip \
59+
python3-venv \
60+
ruby-full \
61+
software-properties-common \
62+
wget
63+
64+
# Install Java
65+
66+
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | \
67+
gpg --dearmor | \
68+
tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
69+
70+
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | \
71+
tee /etc/apt/sources.list.d/adoptium.list
72+
73+
# Install R
74+
# https://cloud.r-project.org/bin/linux/ubuntu/
75+
76+
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | \
77+
tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
78+
79+
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
80+
81+
# Install Arrow GLib
82+
wget https://repo1.maven.org/maven2/org/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
83+
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
84+
85+
apt update
86+
apt install -y \
87+
libarrow-dev \
88+
libarrow-glib-dev \
89+
r-base \
90+
temurin-21-jdk
91+
92+
# Install Maven
93+
wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
94+
mkdir -p /opt/maven
95+
tar -C /opt/maven -xzvf apache-maven-3.9.9-bin.tar.gz --strip-components=1
96+
export PATH=/opt/maven/bin:$PATH
97+
98+
# We run under Docker and this is necessary since the source dir is mounted in
99+
git config --global --add safe.directory "${source_dir}"
100+
101+
"${source_dir}/dev/release/verify-release-candidate.sh"
102+
}
103+
104+
main "$@"

compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,12 @@ services:
275275
retries: 5
276276
ports:
277277
- "5432:5432"
278+
279+
################################ Verification ################################
280+
281+
verify-all-ubuntu:
282+
image: ubuntu:${UBUNTU}
283+
volumes:
284+
- .:/adbc:delegated
285+
command: |
286+
/adbc/ci/scripts/verify_ubuntu.sh /adbc

dev/release/verify-release-candidate.sh

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -246,38 +246,42 @@ install_dotnet() {
246246
return 0
247247
fi
248248

249-
show_info "Ensuring that .NET is installed..."
250-
251-
if dotnet --version | grep 8\.0 > /dev/null 2>&1; then
252-
local csharp_bin=$(dirname $(which dotnet))
253-
show_info "Found C# at $(which csharp) (.NET $(dotnet --version))"
254-
else
255-
if which dotnet > /dev/null 2>&1; then
256-
show_info "dotnet found but it is the wrong version and will be ignored."
249+
if command -v dotnet; then
250+
show_info "Found $(dotnet --version) at $(which dotnet)"
251+
252+
if dotnet --version | grep 8\.0 > /dev/null 2>&1; then
253+
local csharp_bin=$(dirname $(which dotnet))
254+
show_info "Found C# at $(which csharp) (.NET $(dotnet --version))"
255+
DOTNET_ALREADY_INSTALLED=1
256+
return 0
257257
fi
258-
local csharp_bin=${ARROW_TMPDIR}/csharp/bin
259-
local dotnet_version=8.0.204
260-
local dotnet_platform=
261-
case "$(uname)" in
258+
fi
259+
260+
show_info "dotnet found but it is the wrong version or dotnet not found"
261+
262+
local csharp_bin=${ARROW_TMPDIR}/csharp/bin
263+
local dotnet_version=8.0.204
264+
local dotnet_platform=
265+
case "$(uname)" in
262266
Linux)
263-
dotnet_platform=linux
264-
;;
267+
dotnet_platform=linux
268+
;;
265269
Darwin)
266-
dotnet_platform=macos
267-
;;
268-
esac
269-
local dotnet_download_thank_you_url=https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-${dotnet_version}-${dotnet_platform}-x64-binaries
270-
local dotnet_download_url=$( \
271-
curl -sL ${dotnet_download_thank_you_url} | \
272-
grep 'directLink' | \
273-
grep -E -o 'https://download[^"]+' | \
274-
sed -n 2p)
275-
mkdir -p ${csharp_bin}
276-
curl -sL ${dotnet_download_url} | \
270+
dotnet_platform=macos
271+
;;
272+
esac
273+
local dotnet_download_thank_you_url=https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-${dotnet_version}-${dotnet_platform}-x64-binaries
274+
show_info "Getting .NET download URL from ${dotnet_download_thank_you_url}"
275+
local dotnet_download_url=$(curl -sL ${dotnet_download_thank_you_url} | \
276+
grep 'directLink' | \
277+
grep -E -o 'https://download[^"]+' | \
278+
sed -n 2p)
279+
show_info "Downloading .NET from ${dotnet_download_url}"
280+
mkdir -p ${csharp_bin}
281+
curl -sL ${dotnet_download_url} | \
277282
tar xzf - -C ${csharp_bin}
278-
PATH=${csharp_bin}:${PATH}
279-
show_info "Installed C# at $(which csharp) (.NET $(dotnet --version))"
280-
fi
283+
PATH=${csharp_bin}:${PATH}
284+
show_info "Installed C# at $(which csharp) (.NET $(dotnet --version))"
281285

282286
DOTNET_ALREADY_INSTALLED=1
283287
}
@@ -296,6 +300,18 @@ install_go() {
296300
return 0
297301
fi
298302

303+
local prefix=${ARROW_TMPDIR}/go
304+
mkdir -p $prefix
305+
306+
if [ -f "${prefix}/go/bin/go" ]; then
307+
export GOROOT=${prefix}/go
308+
export GOPATH=${prefix}/gopath
309+
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
310+
show_info "Found $(go version) at ${prefix}/go/bin/go"
311+
GO_ALREADY_INSTALLED=1
312+
return 0
313+
fi
314+
299315
local version=1.24.2
300316
show_info "Installing go version ${version}..."
301317

@@ -315,8 +331,6 @@ install_go() {
315331
local archive="go${version}.${os}-${arch}.tar.gz"
316332
curl -sLO https://go.dev/dl/$archive
317333

318-
local prefix=${ARROW_TMPDIR}/go
319-
mkdir -p $prefix
320334
tar -xzf $archive -C $prefix
321335
rm -f $archive
322336

@@ -549,7 +563,7 @@ test_python() {
549563
show_header "Build and test Python libraries"
550564

551565
# Build and test Python
552-
maybe_setup_virtualenv cython duckdb pandas protobuf pyarrow pytest setuptools_scm setuptools importlib_resources || exit 1
566+
maybe_setup_virtualenv cython duckdb pandas polars protobuf pyarrow pytest setuptools_scm setuptools importlib_resources || exit 1
553567
# XXX: pin Python for now since various other packages haven't caught up
554568
maybe_setup_conda --file "${ADBC_DIR}/ci/conda_env_python.txt" python=3.12 || exit 1
555569

go/adbc/driver/flightsql/flightsql_adbc_server_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,8 +1660,7 @@ func (ts *TimeoutTests) TestDoActionTimeout() {
16601660
var adbcErr adbc.Error
16611661
ts.ErrorAs(stmt.Prepare(context.Background()), &adbcErr)
16621662
ts.Equal(adbc.StatusTimeout, adbcErr.Code, adbcErr.Error())
1663-
// Exact match - we don't want extra fluff in the message
1664-
ts.Equal("[FlightSQL] context deadline exceeded (DeadlineExceeded; Prepare)", adbcErr.Msg)
1663+
// It seems gRPC isn't stable about the error message, unfortunately
16651664
}
16661665

16671666
func (ts *TimeoutTests) TestDoGetTimeout() {

0 commit comments

Comments
 (0)