adutra commented on code in PR #3630:
URL: https://github.com/apache/polaris/pull/3630#discussion_r2754113509


##########
.github/workflows/nightly-iceberg.yml:
##########
@@ -0,0 +1,132 @@
+#
+# 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:
+  detect-iceberg-version:
+    name: Detect Iceberg Snapshot Version
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/polaris'
+    outputs:
+      iceberg_version: ${{ steps.detect.outputs.iceberg_version }}
+    steps:
+      - name: Detect latest Iceberg snapshot version
+        id: detect
+        run: |
+          if [ -n "${{ inputs.iceberg_version }}" ]; then
+            echo "Using provided Iceberg version: ${{ inputs.iceberg_version 
}}"
+            echo "iceberg_version=${{ inputs.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
+              # Fallback: get the last version from the versions list
+              LATEST_VERSION=$(curl -s "$METADATA_URL" | grep -oP 
'(?<=<version>)[^<]+' | grep SNAPSHOT | tail -1)
+            fi
+            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
+
+  smoke-tests:
+    name: Smoke Tests (Iceberg ${{ 
needs.detect-iceberg-version.outputs.iceberg_version }})
+    runs-on: ubuntu-latest
+    needs: detect-iceberg-version
+    if: github.repository == 'apache/polaris'
+    steps:

Review Comment:
   Merged into one job 👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to