You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2025/11/23 08:30:15 UTC
[PR] [GH-2489] Update the old dependencies in Sedona docker image [sedona]
jiayuasu opened a new pull request, #2518:
URL: https://github.com/apache/sedona/pull/2518
## Did you read the Contributor Guide?
- Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/)
## Is this PR related to a ticket?
- Yes, and the PR name follows the format `[GH-2489] my subject`. Closes #2489
## What changes were proposed in this PR?
This pull request updates the project to support Spark 4.0.1 and modernizes the environment by upgrading related dependencies, base images, and build configurations. The changes ensure compatibility with newer versions of Spark, Sedona, GeoTools, and Python libraries, while also simplifying the build process and improving maintainability.
**Environment and Dependency Upgrades**
* Updated the base image in `docker/sedona-docker.dockerfile` to `ubuntu:24.04` and bumped major dependency versions: Spark to 4.0.1, Sedona to 1.8.0, GeoTools-wrapper to 1.8.1-33.1, Spark extension to 2.14.2, Hadoop AWS to 3.4.1, and AWS SDK to 2.38.2.
* Upgraded Python package versions in `docker/requirements.txt`, including `geopandas` to 1.1.1, `numpy` to 1.26.4, `pandas` to 2.3.3, and `shapely` to 2.1.2 for compatibility with new Spark/Sedona versions.
**Build and Workflow Modernization**
* Changed Spark version matrix in `.github/workflows/docker-build.yml` to only test Spark 4.0.1 and updated Java version to 17 for builds. [[1]](diffhunk://#diff-3414847e2ad632333f775cabb810f0dc0df61a570365df34750a08b00912fe82L49-R56) [[2]](diffhunk://#diff-3414847e2ad632333f775cabb810f0dc0df61a570365df34750a08b00912fe82L66-R66)
* Updated Maven build in `docker/build.sh` to use Scala 2.13 and adjusted download/install scripts in `docker/install-sedona.sh` to fetch 2.13 artifacts for Sedona and Spark extension. [[1]](diffhunk://#diff-efe74abc7213e95246105b4a7b029557ef16ff997e9cc13eadcfffa18e6757c0L83-R83) [[2]](diffhunk://#diff-3ea6202bfc88840cc3df1444288536e80072f8d5195810d02dffe247a8ec9305L38-R52)
**Simplification and Cleanup**
* Removed unused `spark_xml_version` argument and related code from `docker/install-spark.sh` and `docker/sedona-docker.dockerfile`, streamlining Spark installation. [[1]](diffhunk://#diff-750c969ccb006f6f5c4553cad3487d236f71976672d55a4c6e34e26c82a691f4L26) [[2]](diffhunk://#diff-750c969ccb006f6f5c4553cad3487d236f71976672d55a4c6e34e26c82a691f4L37-L39) [[3]](diffhunk://#diff-e7fa2d33c4eae1577dd78c1a92fc1e68ce2956ffdb3f67dd5af6f0fe4285fadcL18-R26) [[4]](diffhunk://#diff-e7fa2d33c4eae1577dd78c1a92fc1e68ce2956ffdb3f67dd5af6f0fe4285fadcL46-R53)
**Configuration Updates**
* Updated Zeppelin interpreter configuration in `docker/zeppelin/conf/interpreter.json` to use new Sedona and GeoTools-wrapper jar paths matching the upgraded versions.
**Package Installation Adjustments**
* Added `--break-system-packages` to `pip3 install` commands throughout the Docker scripts to prevent installation errors with system Python packages. [[1]](diffhunk://#diff-3ea6202bfc88840cc3df1444288536e80072f8d5195810d02dffe247a8ec9305L38-R52) [[2]](diffhunk://#diff-e7fa2d33c4eae1577dd78c1a92fc1e68ce2956ffdb3f67dd5af6f0fe4285fadcL46-R53)
Let me know if you have questions about any specific upgrade or script change!
## How was this patch tested?
## Did this PR include necessary documentation updates?
- No, this PR does not affect any public API so no need to change the documentation.
--
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@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GH-2489] Update the old dependencies in Sedona docker image [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #2518:
URL: https://github.com/apache/sedona/pull/2518
--
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@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GH-2489] Update the old dependencies in Sedona docker image [sedona]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2518:
URL: https://github.com/apache/sedona/pull/2518#discussion_r2554637401
##########
.github/workflows/docker-build.yml:
##########
@@ -46,14 +46,14 @@ jobs:
fail-fast: true
matrix:
os: ['ubuntu-latest']
- spark: ['3.5.1', '3.4.3']
+ spark: ['4.0.1']
include:
- - spark: 3.5.1
+ - spark: 4.0.1
sedona: 'latest'
- geotools: '33.1-rc1'
- - spark: 3.4.3
- sedona: 1.6.0
- geotools: 28.2
+ geotools: '33.1'
+ - spark: 4.0.1
+ sedona: 1.8.0
+ geotools: '33.1'
Review Comment:
The matrix includes duplicate entries with identical spark/geotools versions (lines 51-53 and 54-56). This will cause the same job to run twice unnecessarily. Remove the duplicate entry.
```suggestion
```
##########
docker/test-notebooks.sh:
##########
@@ -0,0 +1,227 @@
+#!/usr/bin/env bash
+
+# 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.
+
+set -e
+
+# Set up environment variables if not already set
+export SPARK_HOME=${SPARK_HOME:-/opt/spark}
+export PYSPARK_PYTHON=${PYSPARK_PYTHON:-python3}
+export PYSPARK_DRIVER_PYTHON=${PYSPARK_DRIVER_PYTHON:-python3}
+# Add py4j to PYTHONPATH (it's in Spark's python/lib directory)
+PY4J_ZIP=$(find "$SPARK_HOME/python/lib" -name "py4j-*.zip" | head -1)
+if [ -n "$PY4J_ZIP" ]; then
+ export PYTHONPATH=${SPARK_HOME}/python:${PY4J_ZIP}:${PYTHONPATH}
+else
+ export PYTHONPATH=${SPARK_HOME}/python:${PYTHONPATH}
+fi
+
+# Configure Spark to run in local mode (no cluster needed for testing)
+export SPARK_MASTER=${SPARK_MASTER:-local[*]}
+
+EXAMPLES_DIR="/opt/workspace/examples"
+FAILED_TESTS=0
+PASSED_TESTS=0
+
+echo "========================================="
+echo "Testing Jupyter Notebooks"
+echo "========================================="
+
+# Check if examples directory exists
+if [ ! -d "$EXAMPLES_DIR" ]; then
+ echo "Error: Examples directory $EXAMPLES_DIR does not exist"
+ exit 1
+fi
+
+# Find all .ipynb files only in the root level (exclude subdirectories like contrib)
+NOTEBOOK_FILES=$(find "$EXAMPLES_DIR" -maxdepth 1 -name "*.ipynb" -type f)
+
+if [ -z "$NOTEBOOK_FILES" ]; then
+ echo "No .ipynb files found in $EXAMPLES_DIR (root level only)"
+ exit 0
+fi
+
+NOTEBOOK_COUNT=$(echo "$NOTEBOOK_FILES" | grep -c . || echo "0")
Review Comment:
The grep -c command will fail if NOTEBOOK_FILES is empty or contains only whitespace, causing the || fallback to execute. However, if NOTEBOOK_FILES has content but grep fails for another reason, the error will be silently masked. Use wc -l instead: `NOTEBOOK_COUNT=$(echo \"$NOTEBOOK_FILES\" | wc -l)`
```suggestion
NOTEBOOK_COUNT=$(echo "$NOTEBOOK_FILES" | wc -l)
```
--
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@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org