Skip to content

GH-4186: Add license and NOTICE validation for distribution and Spark bundles#4489

Closed
Kaustav-Sarkar wants to merge 1 commit into
apache:mainfrom
Kaustav-Sarkar:GH-4186
Closed

GH-4186: Add license and NOTICE validation for distribution and Spark bundles#4489
Kaustav-Sarkar wants to merge 1 commit into
apache:mainfrom
Kaustav-Sarkar:GH-4186

Conversation

@Kaustav-Sarkar

@Kaustav-Sarkar Kaustav-Sarkar commented May 19, 2026

Copy link
Copy Markdown

This PR introduces automated CI checks to enforce LICENSE and NOTICE compliance for Polaris distributions and Spark bundles.
Target Issue: #4186
Description:

  • Adds a dedicated license-checks CI job in GitHub Actions to validate distribution LICENSE/NOTICE merging and Quarkus license reports independently of other checks.
  • Introduces BundleJarLicenseNoticeValidation: A Gradle task that ensures shadow bundle JARs (like the Spark plugin) contain top-level LICENSE and NOTICE files.
  • Introduces BundleLicenseValidation: A Gradle task that automatically verifies that every direct runtime dependency (in group:artifactId form) is correctly attributed in the bundle's BUNDLE-LICENSE file. This prevents dependency updates from silently slipping past license attribution.
  • Applies these checks to the Spark plugin (checkBundleLicense, checkBundleJarLicenseNotice), running them automatically as part of the standard check task.
  • Updates the Spark BUNDLE-LICENSE to correctly attribute the iceberg-spark-runtime dependencies.

@github-project-automation github-project-automation Bot moved this to PRs In Progress in Basic Kanban Board May 19, 2026
@Kaustav-Sarkar Kaustav-Sarkar changed the title GH-4186 Add license and NOTICE validation for distribution and Spark bundles GH-4186: Add license and NOTICE validation for distribution and Spark bundles May 19, 2026
@jbonofre
jbonofre self-requested a review May 19, 2026 11:52

@snazy snazy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, but I don’t think this actually addresses #4186 in a meaningful way.

The hard part here is not checking whether the bundle jar contains top-level LICENSE/NOTICE files, or whether the only two direct runtimeClasspath dependency Maven coordinates are mentioned. The hard part is validating the actual contents of bundled fat artifacts, including both the obvious dependencies with embedded pom.xml metadata and the non-obvious ones that only show up as relocated classes without Maven metadata.

As far as I can tell, this PR validate the one relevant direct runtimeClasspath artifact only. That does not catch missing, stale, or incorrect attribution for the transitive contents inside iceberg-spark-runtime, which is the main case we need to solve. The CHANGELOG entry also explicitly says that transitive attribution inside fat runtime JARs remains manually maintained, so I don’t see what this buys us for the difficult part of the issue.

Before this can move forward, I think we need a concrete investigation:

  1. Which existing checks already cover distribution LICENSE/NOTICE and Quarkus license reports?
  2. Which specific missing/stale/incorrect license cases does this PR catch?
  3. Which cases from #4186 does it intentionally not catch?
  4. How did you inspect iceberg-spark-runtime to identify both Maven-metadata-backed and relocated/no-pom dependencies?
  5. Can you include at least one failing example that demonstrates this check catches a real problem that current checks miss?

Also, if significant AI assistance was used to prepare this change, please disclose that in the PR description as encouraged by CONTRIBUTING.md.

@Kaustav-Sarkar

Kaustav-Sarkar commented May 21, 2026

Copy link
Copy Markdown
Author

@snazy thanks for the review, I will investigate over the weekend and get back on this

@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale label Jun 23, 2026
@github-actions github-actions Bot closed this Jun 28, 2026
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Done in Basic Kanban Board Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants