You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "mansehajsingh (via GitHub)" <gi...@apache.org> on 2026/08/25 01:58:47 UTC

[PR] Add nightly CI for Spark plugin quickstart example. [polaris]

mansehajsingh opened a new pull request, #5369:
URL: https://github.com/apache/polaris/pull/5369

   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   Issue: https://github.com/apache/polaris/issues/5278
   
   Adds a new scheduled workflow (Spark Plugin Quickstart Nightly) that builds the Polaris server image and Spark plugin jar, brings up the getting-started docker-compose stack, and executes the SparkPolaris.ipynb notebook end-to-end for both Spark 3.5 and 4.0. This catches regressions in the getting-started examples that wouldn't otherwise surface until a user actually tries them, like the issue fixed in https://github.com/apache/polaris/pull/5259. Workflow is triggered nightly at 3:30 AM UTC.
   
   In SparkPolaris.ipynb (v3.5 and v4.0) the notebook demonstrates that a read-only principal is forbidden from dropping a non-Iceberg table. Thiss is intentional, but nbconvert --execute treats any uncaught exception as a hard failure and aborts without writing the output notebook. Wrapped that one cell in a try/except so the expected ForbiddenException is caught and printed, while every other cell (i.e. any real regression) still fails the run.
   
   Added nbconvert==7.16.6 to requirements.txt so the CLI needed for headless execution is guaranteed present in the Jupyter container, rather than relying on whatever version jupyterlab pulls in transitively.
   
   ## Testing
   Verified on a fork via workflow_dispatch. Behaved as expected.
   
   ## Next Steps
   * We should add support for all the quickstarts in `getting-started/`
   
   AI Disclosure: This PR was made with the help of Claude Code.
   
   ## Checklist
   - [ ] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact security@apache.org)
   - [ ] ๐Ÿ”— Clearly explained why the changes are needed, or linked related issues: Fixes #
   - [ ] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and explained how)
   - [ ] ๐Ÿ’ก Added comments for complex logic
   - [ ] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [ ] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "mansehajsingh (via GitHub)" <gi...@apache.org>.
mansehajsingh commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r4079493216


##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+permissions:
+  actions: read
+  contents: read
+  issues: read

Review Comment:
   Removed the extra permissions and kept them to the necessary ones.



##########
regtests/notebook_requirements.txt:
##########
@@ -19,3 +19,4 @@
 
 jupyterlab==4.6.3
 ipykernel==7.3.0
+nbconvert==7.17.1

Review Comment:
   Updated PR desc.



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on PR #5369:
URL: https://github.com/apache/polaris/pull/5369#issuecomment-6450213296

   Sorry for the delayed review, @mansehajsingh ! I think some of the bot comments are valid, can you verify them?
   
   > Nothing notifies anyone when this fails (same as the other nightlies). Who's expected to watch it?
   
   I think it's OK to send a notification to the dev mailing list. Not a blocker to me, we can consider this as a followup. 


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r3891749265


##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -697,13 +697,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,
    "id": "92c57967-bd4e-4ffb-a01d-0b22c334432c",
    "metadata": {},
    "outputs": [],
-   "source": [
-    "new_spark.sql(\"DROP TABLE COUNTRY\")"
-   ]
+   "source": "try:\n    new_spark.sql(\"DROP TABLE COUNTRY\")\nexcept Exception as e:\n    print(f\"Expected failure: {e}\")"

Review Comment:
   Instead of generic Exception, perhaps we can do following instead:
   ```
   
   try:
       new_spark.sql("DROP TABLE COUNTRY")
       raise AssertionError("DROP should have been forbidden for read-only principal")
   except AnalysisException as e:
       assert "Cannot create or drop"/"not authorized" in str(e)
   ```
   



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "adnanhemani (via GitHub)" <gi...@apache.org>.
adnanhemani commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r3930539671


##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -697,12 +697,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,

Review Comment:
   nit: if we're wiping out execution count, then we should do it for all cells or no cells. Easiest way to solve this is just to re-run the full notebook and re-commit IMO



##########
plugins/spark/v4.0/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -695,12 +695,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,

Review Comment:
   same comments as above.



##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -848,4 +853,4 @@
  },
  "nbformat": 4,
  "nbformat_minor": 5
-}
+}

Review Comment:
   newline erased.



##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+permissions:
+  actions: read
+  contents: read
+  issues: read

Review Comment:
   why do we need `read` on `issues`?



##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+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:
+  spark-quickstart:
+    name: Spark Quickstart (v${{ matrix.spark_version }})
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/polaris'
+    strategy:
+      fail-fast: false # don't block if one version fails
+      matrix:
+        include:
+          - spark_version: "3.5"
+            make_target: build-spark-plugin-3.5-2.12
+          - spark_version: "4.0"
+            make_target: build-spark-plugin-4.0-2.13
+    env:
+      COMPOSE_FILE: plugins/spark/v${{ matrix.spark_version }}/getting-started/docker-compose.yml
+    steps:
+      - name: Checkout
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+        with:
+          persist-credentials: false
+
+      - name: Set up JDK 21
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
+        with:
+          java-version: '21'
+          distribution: 'temurin'
+

Review Comment:
   nit: the inconsistency in the newlines between the entries in steps is triggering my slight OCD :)



##########
regtests/notebook_requirements.txt:
##########
@@ -19,3 +19,4 @@
 
 jupyterlab==4.6.3
 ipykernel==7.3.0
+nbconvert==7.17.1

Review Comment:
   nit: PR description has a different version, please remove/update the PR description :)



##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+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:
+  spark-quickstart:
+    name: Spark Quickstart (v${{ matrix.spark_version }})
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/polaris'
+    strategy:
+      fail-fast: false # don't block if one version fails
+      matrix:
+        include:
+          - spark_version: "3.5"
+            make_target: build-spark-plugin-3.5-2.12
+          - spark_version: "4.0"
+            make_target: build-spark-plugin-4.0-2.13
+    env:
+      COMPOSE_FILE: plugins/spark/v${{ matrix.spark_version }}/getting-started/docker-compose.yml
+    steps:
+      - name: Checkout
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+        with:
+          persist-credentials: false
+

Review Comment:
   should we do `./.github/actions/free-disk-space` just in case? It would be uniform with other GH workflows we have in the repo and prevents from the flakiness of limited space on a machine potentially.



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r3891749265


##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -697,13 +697,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,
    "id": "92c57967-bd4e-4ffb-a01d-0b22c334432c",
    "metadata": {},
    "outputs": [],
-   "source": [
-    "new_spark.sql(\"DROP TABLE COUNTRY\")"
-   ]
+   "source": "try:\n    new_spark.sql(\"DROP TABLE COUNTRY\")\nexcept Exception as e:\n    print(f\"Expected failure: {e}\")"

Review Comment:
   Instead of generic Exception, perhaps we can do following instead:
   ```
   from pyspark.sql.utils import AnalysisException
   
   try:
       new_spark.sql("DROP TABLE COUNTRY")
   except Exception as e:
       assert "is not authorized" in str(e), f"Unexpected error: {e}"
   else:
       raise AssertionError("DROP should have been forbidden for read-only principal")
   ```
   



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "orca-review-bot (via GitHub)" <gi...@apache.org>.
orca-review-bot commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r4366007124


##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,104 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+permissions:
+  actions: read
+  contents: read
+
+env:
+  GRADLE_TOS_ACCEPTED: ${{ vars.GRADLE_TOS_ACCEPTED }}
+  DEVELOCITY_SERVER: ${{ vars.DEVELOCITY_SERVER }}
+  DEVELOCITY_PROJECT_ID: ${{ vars.DEVELOCITY_PROJECT_ID }}
+
+jobs:
+  spark-quickstart:
+    name: Spark Quickstart (v${{ matrix.spark_version }})
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/polaris'
+    strategy:
+      fail-fast: false # don't block if one version fails
+      matrix:
+        include:
+          - spark_version: "3.5"
+            make_target: build-spark-plugin-3.5-2.12
+          - spark_version: "4.0"
+            make_target: build-spark-plugin-4.0-2.13
+    env:
+      COMPOSE_FILE: plugins/spark/v${{ matrix.spark_version }}/getting-started/docker-compose.yml
+    steps:
+      - name: Checkout
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+        with:
+          persist-credentials: false
+
+      - name: Free disk space
+        uses: ./.github/actions/free-disk-space
+
+      - name: Set up JDK 21
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.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: Build Polaris image
+        env:
+          DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # zizmor: ignore[secrets-outside-env]
+        run: make build-server
+
+      - name: Build Spark plugin jar
+        env:
+          DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # zizmor: ignore[secrets-outside-env]
+        run: make ${{ matrix.make_target }}
+
+      - name: Start docker compose
+        run: docker compose -f "$COMPOSE_FILE" up -d --wait
+
+      - name: Run notebook end-to-end
+        run: |
+          docker compose -f "$COMPOSE_FILE" exec -T jupyter \
+            /home/spark/venv/bin/jupyter nbconvert \
+            --to notebook --execute --ExecutePreprocessor.timeout=600 \
+            --output /tmp/SparkPolaris.out.ipynb \

Review Comment:
   The executed notebook lands in /tmp inside the container, so it's gone after teardown. When a cell fails, that output is the most useful thing to look at. Can we write it to `/home/spark/notebooks/` instead? That dir is bind-mounted, so we can upload it with `actions/upload-artifact` under `if: failure()`.
   
   <sub>๐Ÿค– AI-generated review comment โ€” agents make mistakes, so please verify before acting on it.</sub>



##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,104 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+permissions:
+  actions: read
+  contents: read
+
+env:
+  GRADLE_TOS_ACCEPTED: ${{ vars.GRADLE_TOS_ACCEPTED }}
+  DEVELOCITY_SERVER: ${{ vars.DEVELOCITY_SERVER }}
+  DEVELOCITY_PROJECT_ID: ${{ vars.DEVELOCITY_PROJECT_ID }}
+
+jobs:
+  spark-quickstart:
+    name: Spark Quickstart (v${{ matrix.spark_version }})

Review Comment:
   Nit: there's no `timeout-minutes`, so a hung compose stack or kernel would sit on the runner for 6h. Can we add something like `timeout-minutes: 60`?
   
   <sub>๐Ÿค– AI-generated review comment โ€” agents make mistakes, so please verify before acting on it.</sub>



##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -697,12 +800,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": 19,
    "id": "92c57967-bd4e-4ffb-a01d-0b22c334432c",
    "metadata": {},
    "outputs": [],
    "source": [
-    "new_spark.sql(\"DROP TABLE COUNTRY\")"
+    "try:\n",
+    "    new_spark.sql(\"DROP TABLE COUNTRY\")\n",
+    "except Exception as e:\n",
+    "    assert \"is not authorized\" in str(e), f\"Unexpected error: {e}\"\n",

Review Comment:
   This depends on the exact wording of the message in `PolarisAuthorizerImpl` ("is not authorized for op"). If that message ever gets reworded, the nightly fails even though nothing is actually broken. Also, the PR description says the error is printed, but nothing is printed here, so tutorial readers no longer see the forbidden message. Can we `print(e)` (or a trimmed version) and also accept `ForbiddenException` in the check?
   
   <sub>๐Ÿค– AI-generated review comment โ€” agents make mistakes, so please verify before acting on it.</sub>



##########
plugins/spark/v4.0/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -695,12 +1039,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": 19,
    "id": "92c57967-bd4e-4ffb-a01d-0b22c334432c",
    "metadata": {},
    "outputs": [],
    "source": [
-    "new_spark.sql(\"DROP TABLE COUNTRY\")"
+    "try:\n",
+    "    new_spark.sql(\"DROP TABLE COUNTRY\")\n",
+    "except Exception as e:\n",
+    "    assert \"is not authorized\" in str(e), f\"Unexpected error: {e}\"\n",

Review Comment:
   Same as the v3.5 notebook: can we print the caught error and loosen the match here too?
   
   <sub>๐Ÿค– AI-generated review comment โ€” agents make mistakes, so please verify before acting on it.</sub>



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r3891876004


##########
plugins/spark/v4.0/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -695,13 +695,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,
    "id": "92c57967-bd4e-4ffb-a01d-0b22c334432c",
    "metadata": {},
    "outputs": [],
-   "source": [
-    "new_spark.sql(\"DROP TABLE COUNTRY\")"
-   ]
+   "source": "try:\n    new_spark.sql(\"DROP TABLE COUNTRY\")\nexcept Exception as e:\n    print(f\"Expected failure: {e}\")"

Review Comment:
   I would change to the following instead:
   ```
   try:
       new_spark.sql("DROP TABLE COUNTRY")
   except Exception as e:
       assert "is not authorized" in str(e), f"Unexpected error: {e}"
   else:
       raise AssertionError("DROP should have been forbidden for read-only principal")
   ```



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r3891749265


##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -697,13 +697,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,
    "id": "92c57967-bd4e-4ffb-a01d-0b22c334432c",
    "metadata": {},
    "outputs": [],
-   "source": [
-    "new_spark.sql(\"DROP TABLE COUNTRY\")"
-   ]
+   "source": "try:\n    new_spark.sql(\"DROP TABLE COUNTRY\")\nexcept Exception as e:\n    print(f\"Expected failure: {e}\")"

Review Comment:
   Instead of generic Exception, perhaps we can do following instead:
   ```
   from pyspark.sql.utils import AnalysisException
   
   try:
       new_spark.sql("DROP TABLE COUNTRY")
   except Exception as e:
       assert "is not authorized" in str(e), f"Unexpected error: {e}"
   else:
       raise AssertionError("DROP should have been forbidden for read-only principal")
   ```
   



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "mansehajsingh (via GitHub)" <gi...@apache.org>.
mansehajsingh commented on PR #5369:
URL: https://github.com/apache/polaris/pull/5369#issuecomment-5520777164

   @MonkeyCanCode I have updated the nbconvert version to 7.17.1 and implemented the try-catch stated. Thanks for the review!


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "mansehajsingh (via GitHub)" <gi...@apache.org>.
mansehajsingh commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r4079495802


##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+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:
+  spark-quickstart:
+    name: Spark Quickstart (v${{ matrix.spark_version }})
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/polaris'
+    strategy:
+      fail-fast: false # don't block if one version fails
+      matrix:
+        include:
+          - spark_version: "3.5"
+            make_target: build-spark-plugin-3.5-2.12
+          - spark_version: "4.0"
+            make_target: build-spark-plugin-4.0-2.13
+    env:
+      COMPOSE_FILE: plugins/spark/v${{ matrix.spark_version }}/getting-started/docker-compose.yml
+    steps:
+      - name: Checkout
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+        with:
+          persist-credentials: false
+

Review Comment:
   I added the free-disk-space at the start of the workflow



##########
.github/workflows/nightly-quickstart.yaml:
##########
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+# Builds and runs the Spark plugin's getting-started examples (docker-compose
+# + Jupyter notebook) end-to-end, to catch regressions that break these
+# examples outside of normal PR CI.
+
+name: Spark Plugin Quickstart Nightly
+
+on:
+  schedule:
+    - cron: '30 3 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
+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:
+  spark-quickstart:
+    name: Spark Quickstart (v${{ matrix.spark_version }})
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/polaris'
+    strategy:
+      fail-fast: false # don't block if one version fails
+      matrix:
+        include:
+          - spark_version: "3.5"
+            make_target: build-spark-plugin-3.5-2.12
+          - spark_version: "4.0"
+            make_target: build-spark-plugin-4.0-2.13
+    env:
+      COMPOSE_FILE: plugins/spark/v${{ matrix.spark_version }}/getting-started/docker-compose.yml
+    steps:
+      - name: Checkout
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+        with:
+          persist-credentials: false
+
+      - name: Set up JDK 21
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
+        with:
+          java-version: '21'
+          distribution: 'temurin'
+

Review Comment:
   Made all newlines consistent.



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "mansehajsingh (via GitHub)" <gi...@apache.org>.
mansehajsingh commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r4079489937


##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -697,12 +697,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,

Review Comment:
   I have rerun the notebook and kept the new execution counts and outputs but I've chosen to wipe out metadata as that seems to be the pattern in the existing notebook.



##########
plugins/spark/v3.5/getting-started/notebooks/SparkPolaris.ipynb:
##########
@@ -848,4 +853,4 @@
  },
  "nbformat": 4,
  "nbformat_minor": 5
-}
+}

Review Comment:
   Added back



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #5369:
URL: https://github.com/apache/polaris/pull/5369#issuecomment-5522402617

   Python part looks good to me now. I would wait for @snazy and @flyrain to review CI part.


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5369:
URL: https://github.com/apache/polaris/pull/5369#issuecomment-6378310661

   This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #5369:
URL: https://github.com/apache/polaris/pull/5369#issuecomment-5474052247

   Thanks @mansehajsingh  for the PR. I had validated this is working as expected. I left two NITs. @snazy mind take a look if we should use a new CI or re-used existed CI?
   
   @flyrain mind check if this is meet your needed.


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add nightly CI for Spark plugin quickstart example. [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #5369:
URL: https://github.com/apache/polaris/pull/5369#discussion_r3891887275


##########
regtests/notebook_requirements.txt:
##########
@@ -19,3 +19,4 @@
 
 jupyterlab==4.6.3
 ipykernel==7.3.0
+nbconvert==7.16.6

Review Comment:
   Should we use newer version here? 7.16.6 version was released around Jan 2025.



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org