Iceberg Nightly Smoke Tests #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # 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. | |
| # | |
| # Runs smoke tests against Apache Iceberg nightly builds to detect compatibility issues early. | |
| name: Iceberg Nightly Smoke Tests | |
| on: | |
| schedule: | |
| # Run daily at 3:00 AM UTC | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| iceberg_version: | |
| description: 'Iceberg version to test (e.g., 1.11.0-SNAPSHOT). Leave empty to auto-detect latest snapshot.' | |
| required: false | |
| type: string | |
| branch: | |
| description: 'Branch to build' | |
| required: false | |
| default: 'main' | |
| type: string | |
| # Setting explicit permissions for the action | |
| permissions: | |
| actions: read | |
| contents: read | |
| issues: read | |
| env: | |
| GRADLE_TOS_ACCEPTED: ${{ vars.GRADLE_TOS_ACCEPTED }} | |
| DEVELOCITY_SERVER: ${{ vars.DEVELOCITY_SERVER }} | |
| DEVELOCITY_PROJECT_ID: ${{ vars.DEVELOCITY_PROJECT_ID }} | |
| jobs: | |
| smoke-tests: | |
| name: Smoke Tests (Iceberg Nightly) | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'apache/polaris' | |
| steps: | |
| - name: Detect latest Iceberg snapshot version | |
| id: detect | |
| env: | |
| INPUT_ICEBERG_VERSION: ${{ inputs.iceberg_version }} | |
| run: | | |
| if [ -n "${INPUT_ICEBERG_VERSION}" ]; then | |
| echo "Using provided Iceberg version: ${INPUT_ICEBERG_VERSION}" | |
| echo "iceberg_version=${INPUT_ICEBERG_VERSION}" >> $GITHUB_OUTPUT | |
| else | |
| echo "Detecting latest Iceberg snapshot version from Apache Maven repository..." | |
| # Fetch the maven-metadata.xml to find the latest snapshot version | |
| METADATA_URL="https://repository.apache.org/content/repositories/snapshots/org/apache/iceberg/iceberg-api/maven-metadata.xml" | |
| LATEST_VERSION=$(curl -s "$METADATA_URL" | grep -oP '(?<=<latest>)[^<]+' | head -1) | |
| if [ -z "$LATEST_VERSION" ]; then | |
| echo "Failed to detect Iceberg snapshot version" | |
| exit 1 | |
| fi | |
| echo "Detected Iceberg snapshot version: $LATEST_VERSION" | |
| echo "iceberg_version=$LATEST_VERSION" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ inputs.branch || 'main' }} | |
| persist-credentials: false | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Setup test environment | |
| uses: ./.github/actions/setup-test-env | |
| - name: Prepare Gradle build cache | |
| uses: ./.github/actions/ci-incr-build-cache-prepare | |
| - name: Override Iceberg version in version catalog | |
| env: | |
| ICEBERG_VERSION: ${{ steps.detect.outputs.iceberg_version }} | |
| run: | | |
| echo "Overriding Iceberg version to: $ICEBERG_VERSION" | |
| sed -i "s/^iceberg = .*/iceberg = \"$ICEBERG_VERSION\"/" gradle/libs.versions.toml | |
| echo "Updated gradle/libs.versions.toml:" | |
| grep "^iceberg = " gradle/libs.versions.toml | |
| - name: Run smoke tests with Iceberg nightly | |
| env: | |
| ICEBERG_VERSION: ${{ steps.detect.outputs.iceberg_version }} | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # zizmor: ignore[secrets-outside-env] | |
| run: | | |
| echo "Running smoke tests with Iceberg version: ${ICEBERG_VERSION}" | |
| ./gradlew \ | |
| :polaris-core:test \ | |
| :polaris-api-iceberg-service:test \ | |
| :polaris-runtime-service:test \ | |
| -PuseApacheSnapshots=true \ | |
| --continue | |
| - name: Archive test results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() | |
| with: | |
| name: iceberg-nightly-test-results | |
| path: | | |
| **/build/test-results/** | |
| **/build/reports/tests/** |