jiayuasu commented on PR #2907:
URL: https://github.com/apache/sedona/pull/2907#issuecomment-4390702472
Force-pushed `4ffad3e745` (was `1eda34f9ef`). Both Docker-build matrix legs
went red on the previous commit because the `**/target/` deny rule excluded
`spark-shaded/target/` from the build context — but the `latest` matrix entry
needs that directory: `build.sh` runs `mvn clean install -DskipTests` first,
then `install-sedona.sh` inside the image does `cp
\${SEDONA_HOME}/spark-shaded/target/sedona-spark-shaded-*.jar
\${SPARK_HOME}/jars/`. With `target/` excluded, the `cp` failed and so did
install-sedona.sh.
Pivoted the fix:
| Old approach (red) | New approach |
|---|---|
| Add `**/target/` to `.dockerignore` | **Removed** — would break `latest`
mode |
| (n/a) | Add `else: rm -rf spark-shaded/target python/build python/dist` to
`build.sh`'s `if SEDONA_VERSION = latest` block. Non-`latest` builds (the path
the 1.9.0 release publisher uses) never touch `target/` since
`install-sedona.sh` downloads from Maven Central instead. |
| Add `--no-cache-dir` to pip | **Kept** — independent improvement |
| Add `python/build/`, `python/dist/`, `**/*.egg-info/`, `**/__pycache__/`
to `.dockerignore` | **Kept** — harmless defensive rules |
Result:
- The `latest` matrix entry still has `mvn`-built artifacts in
`spark-shaded/target/` so install-sedona.sh's `cp` succeeds.
- A non-`latest` release build (`./docker/build.sh 4.0.1 1.9.0 release
33.5`) cleans stale `target/` first, so the COPY layer stays small and the
published image avoids the 1 GB regression.
CI should now go green on both legs.
--
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]