You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "jbonofre (via GitHub)" <gi...@apache.org> on 2026/07/29 04:07:14 UTC
[PR] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
jbonofre opened a new pull request, #5180:
URL: https://github.com/apache/polaris/pull/5180
## What
Fixes the two licensing-documentation issues raised on the [1.7.0-rc0 release vote](https://lists.apache.org/thread/4k0j1y3mzkzo00j7o5zywfo5qt93wo6h), plus a stale Python package version.
### 1. Test-fixtures jars missing `META-INF/LICENSE` + `META-INF/NOTICE` (32 artifacts)
The `test-fixtures-sources` and `test-fixtures-javadoc` jars (across 16 modules) did not contain `META-INF/LICENSE`/`META-INF/NOTICE`. These jars are registered in `PublishingHelperPlugin`, *after* the `polaris-java` `Jar.configureEach` block that injects the license files has already run, so they were never covered by it (they do get `pom.properties` from `addAdditionalJarContent`, which runs later — confirming the ordering).
Fix: added a reusable `addJarLicenseAndNotice()` helper in `maven-utils.kt` and applied it to both jars.
### 2. Spark `sources`/`javadoc` jars missing the files (part of the 12 Spark artifacts)
The `src/main/no-license-notice-marker` file disables the standard META-INF injection for the whole Spark module — intended for the shadow **bundle** jar, which carries its own root-level `BUNDLE-LICENSE`/`BUNDLE-NOTICE`. As a side effect the **sources** and **javadoc** jars ended up with no LICENSE/NOTICE at all.
Fix: explicitly add the ASF LICENSE/NOTICE under `META-INF` for the `sourcesJar` and `javadocJar` tasks only, in both the v3.5 and v4.0 Spark build scripts. The bundle jar is deliberately left unchanged (its root-level LICENSE/NOTICE is ASF-compliant for a fat jar).
### 3. Stale Python package version
`client/python/pyproject.toml` still declared `1.6.0`. The release tooling (`releasey`) only bumps `version.txt` and the Helm chart, not `pyproject.toml`, so it had drifted. Bumped to `1.7.0`.
## Verification
Built and inspected the affected jars:
- `polaris-core` `test-fixtures-sources` / `test-fixtures-javadoc` jars → now contain `META-INF/LICENSE` + `META-INF/NOTICE`.
- `polaris-spark-3.5_2.12` `sources` / `javadoc` jars → now contain `META-INF/LICENSE` + `META-INF/NOTICE`; the `bundle` jar is unchanged (root-level `LICENSE`/`NOTICE` only, no META-INF).
## Notes
- These changes target `main`; they need to be cherry-picked onto `release/1.7.x` for an rc1 respin.
- The Spark **bundle** jars still carry LICENSE/NOTICE at the jar root rather than under `META-INF` — this is a deliberate design choice and out of scope here.
- Follow-up worth considering: have the release tooling bump `pyproject.toml` so the Python version cannot drift again.
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3677297118
##########
client/python/pyproject.toml:
##########
@@ -19,7 +19,7 @@
[project]
name = "apache-polaris"
-version = "1.6.0"
+version = "1.7.0"
Review Comment:
Done
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #5180:
URL: https://github.com/apache/polaris/pull/5180#issuecomment-5113872813
Thanks for the fix JB. Left a minor comment regarding if we should bump version in `uv.lock` as well. Also, helm version is also outdated: https://github.com/apache/polaris/blob/main/helm/polaris/Chart.yaml#L24
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3677309250
##########
client/python/pyproject.toml:
##########
@@ -19,7 +19,7 @@
[project]
name = "apache-polaris"
-version = "1.6.0"
+version = "1.7.0"
Review Comment:
is it possible to incorporate this version bump in the release script? Not a blocker.
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3677309250
##########
client/python/pyproject.toml:
##########
@@ -19,7 +19,7 @@
[project]
name = "apache-polaris"
-version = "1.6.0"
+version = "1.7.0"
Review Comment:
is it possible to incorporate this version bump + the one in uv.lock in the release script? Not a blocker.
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3677294875
##########
build-logic/src/main/kotlin/publishing/maven-utils.kt:
##########
@@ -108,3 +108,33 @@ fun addAdditionalJarContent(project: Project): Unit = project.run {
}
}
}
+
+/**
+ * Adds the `LICENSE` and `NOTICE` files to `META-INF` of the given jar, mirroring the handling for
+ * the main/sources/javadoc jars in the `polaris-java` convention plugin.
+ *
+ * This is needed for jars that are registered directly in [PublishingHelperPlugin] (the
+ * test-fixtures sources and javadoc jars): they are created after the `polaris-java`
+ * `Jar.configureEach` block has already run, so that block does not add the license files to them.
+ */
+fun addJarLicenseAndNotice(project: Project, jar: Jar) {
+ if (project.file("src/main/no-license-notice-marker").exists()) {
+ return
+ }
+ if (!project.file("src/main/resources/META-INF/LICENSE").exists()) {
+ jar.from(project.rootProject.rootDir) {
+ include("gradle/jar-licenses/LICENSE")
+ eachFile { path = "META-INF/$sourceName" }
+ }
+ } else {
+ jar.from("src/main/resources") { include("META-INF/LICENSE") }
+ }
+ if (!project.file("src/main/resources/META-INF/NOTICE").exists()) {
+ jar.from(project.rootProject.rootDir) {
+ include("gradle/jar-licenses/NOTICE")
+ eachFile { path = "META-INF/$sourceName" }
+ }
+ } else {
+ jar.from("src/main/resources") { include("META-INF/NOTICE") }
+ }
+}
Review Comment:
Thanks, fixed.
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #5180:
URL: https://github.com/apache/polaris/pull/5180
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3672295316
##########
build-logic/src/main/kotlin/publishing/maven-utils.kt:
##########
@@ -108,3 +108,33 @@ fun addAdditionalJarContent(project: Project): Unit = project.run {
}
}
}
+
+/**
+ * Adds the `LICENSE` and `NOTICE` files to `META-INF` of the given jar, mirroring the handling for
+ * the main/sources/javadoc jars in the `polaris-java` convention plugin.
+ *
+ * This is needed for jars that are registered directly in [PublishingHelperPlugin] (the
+ * test-fixtures sources and javadoc jars): they are created after the `polaris-java`
+ * `Jar.configureEach` block has already run, so that block does not add the license files to them.
+ */
+fun addJarLicenseAndNotice(project: Project, jar: Jar) {
+ if (project.file("src/main/no-license-notice-marker").exists()) {
+ return
+ }
+ if (!project.file("src/main/resources/META-INF/LICENSE").exists()) {
+ jar.from(project.rootProject.rootDir) {
+ include("gradle/jar-licenses/LICENSE")
+ eachFile { path = "META-INF/$sourceName" }
+ }
+ } else {
+ jar.from("src/main/resources") { include("META-INF/LICENSE") }
+ }
+ if (!project.file("src/main/resources/META-INF/NOTICE").exists()) {
+ jar.from(project.rootProject.rootDir) {
+ include("gradle/jar-licenses/NOTICE")
+ eachFile { path = "META-INF/$sourceName" }
+ }
+ } else {
+ jar.from("src/main/resources") { include("META-INF/NOTICE") }
+ }
+}
Review Comment:
This is not necessary.
You need to explicitly `import org.gradle.jvm.tasks.Jar` in `polaris-java.gradle.kts`, which currently resolves `Jar` as `org.gradle.api.tasks.bundling.Jar`. The latter _extends_ the former -
`PublishingHelperPlugin` registers `org.gradle.jvm.tasks.Jar`.
##########
plugins/spark/v3.5/spark/build.gradle.kts:
##########
@@ -258,6 +258,19 @@ tasks.named("assemble") { dependsOn(createPolarisSparkJar) }
tasks.named("build") { dependsOn(createPolarisSparkJar) }
+// The `src/main/no-license-notice-marker` file disables the standard META-INF/LICENSE+NOTICE
+// injection for this module, because the shadow bundle jar carries its own root-level
+// BUNDLE-LICENSE/BUNDLE-NOTICE. The main, sources and javadoc jars still need the ASF LICENSE and
+// NOTICE under META-INF, so add them back explicitly for those jars (the bundle jar is left as-is).
+listOf("jar", "sourcesJar", "javadocJar").forEach { jarTask ->
+ tasks.named<Jar>(jarTask) {
+ from(rootProject.rootDir) {
Review Comment:
```suggestion
from(layout.settingsDirectory) {
```
##########
plugins/spark/v4.0/spark/build.gradle.kts:
##########
@@ -261,6 +261,19 @@ tasks.named("assemble") { dependsOn(createPolarisSparkJar) }
tasks.named("build") { dependsOn(createPolarisSparkJar) }
+// The `src/main/no-license-notice-marker` file disables the standard META-INF/LICENSE+NOTICE
+// injection for this module, because the shadow bundle jar carries its own root-level
+// BUNDLE-LICENSE/BUNDLE-NOTICE. The main, sources and javadoc jars still need the ASF LICENSE and
+// NOTICE under META-INF, so add them back explicitly for those jars (the bundle jar is left as-is).
+listOf("jar", "sourcesJar", "javadocJar").forEach { jarTask ->
+ tasks.named<Jar>(jarTask) {
+ from(rootProject.rootDir) {
Review Comment:
```suggestion
from(layout.settingsDirectory) {
```
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3671457102
##########
client/python/pyproject.toml:
##########
@@ -19,7 +19,7 @@
[project]
name = "apache-polaris"
-version = "1.6.0"
+version = "1.7.0"
Review Comment:
should we bump the version in `uv.lock` as well? You can update this file by running `uv lock` then checkin the diff.
--
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] Fix missing META-INF/LICENSE+NOTICE in test-fixtures/Spark jars and stale Python version [polaris]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #5180:
URL: https://github.com/apache/polaris/pull/5180#discussion_r3679946295
##########
client/python/pyproject.toml:
##########
@@ -19,7 +19,7 @@
[project]
name = "apache-polaris"
-version = "1.6.0"
+version = "1.7.0"
Review Comment:
Yes, fully agree. I just want to create a follow up PR about that.
--
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