Skip to content

[Dev] Rework the relativization script, to actually make the paths relative #862

[Dev] Rework the relativization script, to actually make the paths relative

[Dev] Rework the relativization script, to actually make the paths relative #862

Workflow file for this run

name: Local Polaris Testing
on: [push, pull_request,repository_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
BASE_BRANCH: ${{ github.base_ref || (endsWith(github.ref, '_feature') && 'feature' || 'main') }}
jobs:
rest:
name: Test against Polaris Catalog
runs-on: ubuntu-latest
env:
VCPKG_TARGET_TRIPLET: 'x64-linux-release'
GEN: ninja
VCPKG_FEATURE_FLAGS: "-binarycaching"
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
PIP_BREAK_SYSTEM_PACKAGES: 1
steps:
- name: Install required ubuntu packages
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq software-properties-common
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update -y -qq
sudo apt-get install -y -qq \
ninja-build \
make gcc-multilib \
g++-multilib \
libssl-dev \
wget \
openjdk-8-jdk \
zip \
maven \
unixodbc-dev \
libc6-dev-i386 \
lib32readline6-dev \
libssl-dev \
libcurl4-gnutls-dev \
libexpat1-dev \
gettext \
unzip \
build-essential \
checkinstall \
libffi-dev \
curl \
libz-dev \
openssh-client
sudo apt-get install -y -qq tar pkg-config
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: ce613c41372b23b1f51333815feb3edd87ef8a8b
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
continue-on-error: true
- name: Build extension
env:
GEN: ninja
STATIC_LIBCPP: 1
run: |
make release
- name: Set up for Polaris
run: |
# install java
sudo apt install -y -qq openjdk-21-jre-headless
sudo apt install -y -qq openjdk-21-jdk-headless
sudo apt-get install -y -qq python3-venv
- name: Wait for polaris initialization
env:
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
run: |
git clone https://github.com/apache/polaris.git polaris_catalog
cd polaris_catalog
git checkout 8fa1c773c8a775834bda24964dbed25c34ef2917
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
./gradlew --stop
nohup ./gradlew run -Dpolaris.bootstrap.credentials=POLARIS,root,secret > polaris-server.log 2> polaris-error.log &
cd ..
# let polaris initialize
max_attempts=50
attempt=1
while ! (curl -sf http://localhost:8182/healthcheck || curl -sf http://localhost:8182/q/health); do
if [ $attempt -gt $max_attempts ]; then
echo "Polaris failed to initialize after $max_attempts attempts"
exit 1
fi
echo "Waiting for Polaris to initialize (attempt $attempt/$max_attempts)..."
sleep 5
attempt=$((attempt + 1))
done
echo "Polaris is healthy"
- name: Generate Polaris Data
run: |
python3 -m venv .
source ./bin/activate
python3 -m pip install poetry
python3 -m pip install pyspark==3.5.0
python3 -m pip install duckdb
# needed for setup_polaris_catalog.sh
cd polaris_catalog && ../scripts/polaris/setup_polaris_catalog.sh > user_credentials.json
cd ..
python3 scripts/polaris/get_polaris_client_creds.py
export POLARIS_CLIENT_ID=$(cat polaris_client_id.txt)
export POLARIS_CLIENT_SECRET=$(cat polaris_client_secret.txt)
python3 -m scripts.data_generators.generate_data polaris
- name: Test with rest catalog
env:
POLARIS_SERVER_AVAILABLE: 1
run: |
export POLARIS_CLIENT_ID=$(cat polaris_client_id.txt)
export POLARIS_CLIENT_SECRET=$(cat polaris_client_secret.txt)
./build/release/test/unittest "$PWD/test/*" --list-test-names-only || true
./build/release/test/unittest "$PWD/test/*"