Skip to content

Build: Include Spark 4.2 in source releases - #18024

Merged
szehon-ho merged 2 commits into
apache:mainfrom
manuzhang:spark42-source-release
Sep 9, 2026
Merged

szehon-ho merged 2 commits into
apache:mainfrom
manuzhang:spark42-source-release

Conversation

@manuzhang

@manuzhang manuzhang commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #17967.

Why this change is needed

Spark 4.2 is now selected by defaultSparkVersions, but the existing export-ignore entries omit spark/v4.2 from source archives produced with git archive. As a result, every Gradle command run from an extracted source release, including ./gradlew help, fails during configuration with:

A problem occurred evaluating project ':iceberg-spark'.
> Could not read script '.../spark/v4.2/build.gradle' as it does not exist.

This makes the source release impossible to configure or build. The -DallModules configuration is broken for the same reason because knownSparkVersions also includes Spark 4.2.

This PR removes the export-ignore entries for spark/v4.2 so source release archives contain the module selected by defaultSparkVersions and -DallModules. It also adds a targeted source-release CI workflow that recreates the exported archive and loads both Gradle configurations when archive or Gradle configuration files change.

Spark 4.2 remains excluded from convenience binary publishing because dev/stage-binaries.sh still limits SPARK_VERSIONS to 3.5, 4.0, and 4.1.

Validation:

  • Reproduced the missing spark/v4.2/build.gradle configuration failure from a pre-fix source archive.
  • Created an archive with git archive HEAD --worktree-attributes and confirmed Spark 3.5, 4.0, 4.1, and 4.2 source directories are present.
  • Ran the default Gradle help task from the extracted archive.
  • Ran the Gradle help task with -DallModules from the extracted archive.
  • Ran ./gradlew spotlessCheck.

AI Disclosure

  • Model: GPT-5
  • Platform/Tool: Codex
  • Human Oversight: partially reviewed
  • Prompt Summary: Include Spark 4.2 in source releases and add CI coverage that validates the exported source archive.

@github-actions github-actions Bot added the INFRA label Sep 9, 2026
@manuzhang
manuzhang force-pushed the spark42-source-release branch from 2ed9c23 to dc0c760 Compare September 9, 2026 09:11
@manuzhang manuzhang changed the title Build: Include Spark 4.2 in source releases Build: Fix Spark modules in source releases Sep 9, 2026
@github-actions github-actions Bot added build and removed INFRA labels Sep 9, 2026
Keep Spark 4.2 sources in release archives so the default and all-modules Gradle configurations can load the selected module. Binary publishing remains limited by dev/stage-binaries.sh.

Generated-by: Codex
@manuzhang
manuzhang force-pushed the spark42-source-release branch from dc0c760 to ec87c85 Compare September 9, 2026 09:22
@manuzhang manuzhang changed the title Build: Fix Spark modules in source releases Build: Include Spark 4.2 in source releases Sep 9, 2026
@github-actions github-actions Bot added the INFRA label Sep 9, 2026
Build and configure the exported source archive so export-ignore rules cannot silently omit required Gradle projects. Run both the default and all-modules configurations when release-related files change.

Generated-by: Codex
@szehon-ho

Copy link
Copy Markdown
Member

cc @nssalian

@szehon-ho
szehon-ho merged commit 9d7b2c5 into apache:main Sep 9, 2026
30 of 31 checks passed
@szehon-ho

Copy link
Copy Markdown
Member

Merged, thanks @manuzhang and @nssalian for checking!

@manuzhang
manuzhang deleted the spark42-source-release branch November 2, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants