Skip to content

chore(build): add customized LICENSE to jar META-INF and dist zips - #4367

Merged
bobbai00 merged 12 commits into
apache:mainfrom
bobbai00:fixe/jar-license
Apr 17, 2026
Merged

bobbai00 merged 12 commits into
apache:mainfrom
bobbai00:fixe/jar-license

Conversation

@bobbai00

@bobbai00 bobbai00 commented Apr 12, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

This PR ensures that:

  • Each jar's LICENSE describes only what is in that jar
    • For workflow-operator jar: the LICENSE includes Apache 2.0 and 3rd party code mbknor-jackson-jsonschema MIT attribution and MIT license.
    • All other jars: the LICENSE is Apache 2.0 only
  • the zips produced by sbt dist include LICENSE/NOTICE/DISCLAIMER at the top level

Any related issues, documentation, discussions?

Closes #4394

How was this PR tested?

  • Built dist zips and inspected jar META-INF/LICENSE content
  • Verified all Texera module jars are thin jars (no dependency classes merged in)
  • Confirmed workflow-operator is the only jar with non-Apache classes (com/kjetland)

Was this PR authored or co-authored using generative AI tooling?

Co-authored using: Claude Code (Claude Opus 4.6)

bobbai00 and others added 2 commits April 12, 2026 08:56
Modeled after Apache Pekko's AddMetaInfLicenseFiles pattern:
- Add legal/ with hand-curated StandardLicense.txt and TexeraNotice.txt
- Add project/AddMetaInfLicenseFiles.scala to copy them into META-INF
- Wire asfDistLicensingSettings into all 6 dist-producing modules
  so LICENSE/NOTICE/DISCLAIMER-WIP appear at dist zip top level

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file fix labels Apr 12, 2026
@chenlica

Copy link
Copy Markdown
Contributor

@bobbai00 Please suggest a committer to review this PR.

The dist zip now includes LICENSE/NOTICE/DISCLAIMER-WIP at its top
level via asfDistLicensingSettings, so the manual COPY workaround
in Dockerfiles is no longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions github-actions Bot added the infra label Apr 12, 2026
@bobbai00 bobbai00 changed the title feat: add ASF license/notice files to jar META-INF and dist zips chore: add ASF license, disclaimer and notice files to dist zips Apr 12, 2026
@bobbai00 bobbai00 removed the fix label Apr 12, 2026
@github-actions github-actions Bot added the fix label Apr 12, 2026
@bobbai00
bobbai00 requested a review from aglinxinyuan April 12, 2026 21:31
@bobbai00

Copy link
Copy Markdown
Contributor Author

@bobbai00 Please suggest a committer to review this PR.

Can @aglinxinyuan review it?

@bobbai00 bobbai00 self-assigned this Apr 12, 2026
…SCLAIMER

Each jar's META-INF/LICENSE now describes only what is in that specific
jar rather than copying the entire source release LICENSE:
- workflow-operator: Apache 2.0 + mbknor-jackson-jsonschema (MIT)
- all other modules: Apache 2.0 only

Rename DISCLAIMER-WIP to DISCLAIMER since the known licensing gap
(missing LICENSE/NOTICE in binary artifacts) is now resolved.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@bobbai00 bobbai00 changed the title chore: add ASF license, disclaimer and notice files to dist zips chore: add ASF license files to jar META-INF and dist zips with per-module accuracy Apr 12, 2026
@aglinxinyuan
aglinxinyuan requested a review from Copilot April 13, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR implements per-module ASF licensing compliance by generating tailored META-INF licensing files for JARs and ensuring distribution ZIPs include top-level LICENSE/NOTICE/DISCLAIMER, addressing #4131.

Changes:

  • Added an sbt build helper to generate per-module META-INF/LICENSE (Apache-only vs. workflow-operator + MIT attribution) and copy NOTICE/DISCLAIMER.
  • Updated build configuration to apply the new per-module licensing settings and add top-level licensing files to dist ZIPs.
  • Renamed/replaced DISCLAIMER-WIP usage with DISCLAIMER across Dockerfiles and tooling configuration.

Reviewed changes

Copilot reviewed 3 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
project/AddMetaInfLicenseFiles.scala New sbt helper that generates/copies licensing files for JAR META-INF and dist ZIPs.
DISCLAIMER Removes WIP compliance note now that the artifacts are being updated.
build.sbt Switches from generic copy to per-module licensing settings; applies dist ZIP licensing mappings to service modules.
bin/*.dockerfile Updates Docker builds to use DISCLAIMER (and removes redundant runtime-stage copying).
.licenserc.yaml Removes DISCLAIMER-WIP from license header configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread project/AddMetaInfLicenseFiles.scala Resolved
Comment thread project/AddMetaInfLicenseFiles.scala Resolved
Comment thread project/AddMetaInfLicenseFiles.scala Resolved

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR looks good to me.

The DISCLAIMER now says we are fully compliant with the ASF policy. It's a very strong claim. I don't see any place that isn't following the ASF policy, but it's better to have a second eye on this before the next RC.

@chenlica

Copy link
Copy Markdown
Contributor

@bobbai00 please ask Ian Maxon to review it.

@bobbai00 bobbai00 changed the title chore: add ASF license files to jar META-INF and dist zips with per-module accuracy chore: add ASF license files to jar META-INF and dist zips Apr 13, 2026
- Replace magic number idx>=200 with search for THIRD-PARTY DEPENDENCIES header
- Remove duplicate DISCLAIMER entry in reserved set

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@bobbai00
bobbai00 requested a review from parshimers April 13, 2026 05:08
bobbai00 and others added 4 commits April 13, 2026 13:16
Per apache#4372, the WIP disclaimer should stay until Docker image
LICENSE/NOTICE files properly describe their contents. Updated the
known-issues bullet to reflect that jar licensing is now fixed and
only Docker image licensing remains outstanding.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@bobbai00

Copy link
Copy Markdown
Contributor Author

The PR looks good to me.

The DISCLAIMER now says we are fully compliant with the ASF policy. It's a very strong claim. I don't see any place that isn't following the ASF policy, but it's better to have a second eye on this before the next RC.

After viewing some ASF documents, this PR does NOT make Texera fully compliant with ASF policy. So this PR will NOT change DISCLAIMER-WIP to DISCLAIMER

@bobbai00 bobbai00 changed the title chore: add ASF license files to jar META-INF and dist zips chore(LICENSE): add customized LICENSE to jar META-INF and dist zips Apr 17, 2026
@bobbai00 bobbai00 changed the title chore(LICENSE): add customized LICENSE to jar META-INF and dist zips chore(build): add customized LICENSE to jar META-INF and dist zips Apr 17, 2026
@bobbai00
bobbai00 enabled auto-merge (squash) April 17, 2026 20:53
@bobbai00
bobbai00 merged commit 4be9bae into apache:main Apr 17, 2026
11 checks passed
bobbai00 added a commit to bobbai00/texera that referenced this pull request Apr 18, 2026
…pache#4367)

### What changes were proposed in this PR?

This PR ensures that:
- Each jar's `LICENSE` describes only what is in that jar
- For `workflow-operator` jar: the LICENSE includes Apache 2.0 and 3rd
party code `mbknor-jackson-jsonschema` MIT attribution and MIT license.
  - All other jars: the LICENSE is Apache 2.0 only
- the zips produced by `sbt dist` include LICENSE/NOTICE/DISCLAIMER at
the top level



### Any related issues, documentation, discussions?

Closes apache#4394 

### How was this PR tested?

- Built dist zips and inspected jar META-INF/LICENSE content
- Verified all Texera module jars are thin jars (no dependency classes
merged in)
- Confirmed `workflow-operator` is the only jar with non-Apache classes
(`com/kjetland`)

### Was this PR authored or co-authored using generative AI tooling?

Co-authored using: Claude Code (Claude Opus 4.6)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…pache#4367)

### What changes were proposed in this PR?

This PR ensures that:
- Each jar's `LICENSE` describes only what is in that jar
- For `workflow-operator` jar: the LICENSE includes Apache 2.0 and 3rd
party code `mbknor-jackson-jsonschema` MIT attribution and MIT license.
  - All other jars: the LICENSE is Apache 2.0 only
- the zips produced by `sbt dist` include LICENSE/NOTICE/DISCLAIMER at
the top level



### Any related issues, documentation, discussions?

Closes apache#4394 

### How was this PR tested?

- Built dist zips and inspected jar META-INF/LICENSE content
- Verified all Texera module jars are thin jars (no dependency classes
merged in)
- Confirmed `workflow-operator` is the only jar with non-Apache classes
(`com/kjetland`)

### Was this PR authored or co-authored using generative AI tooling?

Co-authored using: Claude Code (Claude Opus 4.6)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
### What changes were proposed in this PR?

Remove code that nothing uses, or that repeats work already done, across
16 files in the frontend, Amber, the shared config and observability
modules, and the sbt license helper (**+22/−152 lines**). There is no
behavior change.

- **`PresetService`:** `getOperatorPreset`,
`filterOperatorPresetProperties` and the private `ajvStrip` validator
they share have no caller outside their own spec. Their two spec blocks
go with them.
- **`UserConfigService`:** `set` and `delete` return their request
observables, and no caller reads them; `PresetService`, the only caller,
discards both. They now return `void`, so the `shareReplay` carriers and
the `of` import go. Each call still sends its request once and updates
the local dictionary when the request succeeds.
- **Resource registry:** `ResourceDescriptor.setCover` and its dataset
and model implementations have no caller outside the registry's own
spec. The dataset and model pages set a cover through
`DatasetService.updateDatasetCoverImage` and
`ModelService.updateModelCoverImage` directly. The spec drops its
`setCover` call, the matching assertion and the `updateModelCoverImage`
stub, and the workflow descriptor's comment stops naming the hook.
- **`StorageConfig`:** 12 JDBC, Iceberg and S3 name constants that
nothing reads. Every reader, such as `ComputingUnitManagingResource`,
uses the same names from `EnvironmentalVariable`. The four cleanup and
warehouse constants stay, because `StorageConfigSpec` reads them.
- **Telemetry:** `WorkflowMetricsRecorder.init` calls
`WorkflowMetrics.ensureBound()` right after
`setActiveExecutionsSupplier`, which already calls it.
`OtelInit.initialized` only ever holds an `OpenTelemetrySdk`, so it is
now typed that way, and `resetForTest` loses a fallback arm that could
not run.
- **`CollaborationResource`:** the `heartbeat`, `tryLock`, `acquireLock`
and `restoreVersion` patterns bind names that their bodies never read,
so each becomes `_`.
- **Result table:** nothing reads the `#statsRow` template reference.
- **`search-results.component.spec.ts`:** the card-template host imports
`NgTemplateOutlet`, which its template never uses.
- **`TexeraWebApplication`:** drops a commented-out call to
`discardUncommittedChangesOfAllDatasets` and its TODO. That method no
longer exists.
- **`AddMetaInfLicenseFiles`:** drops `import
com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport._`, which
nothing in the helper uses.

| Event | PR / Commit |
| --- | --- |
| Introduced by | `PresetService`: apache#1164 (2022-01-14);
`UserConfigService`: apache#1162 (2021-06-27); resource registry: apache#8299
(2026-08-31); `StorageConfig`: apache#3337 (2025-04-06); telemetry: apache#5375
(2026-10-25) and apache#5376 (2026-10-27); `CollaborationResource`: apache#1427
(2022-02-15); result table: apache#2931 (2024-10-14); search results spec:
apache#6565 (2026-07-20); `TexeraWebApplication`: apache#2391 (2024-02-20),
commented out by apache#2733 (2024-07-15); `AddMetaInfLicenseFiles`: apache#4367
(2026-04-17) |
| Usage removed by | `TexeraWebApplication`: apache#3314 (2025-03-12) deleted
`discardUncommittedChangesOfAllDatasets`. `AddMetaInfLicenseFiles`:
apache#4449 (2026-04-29) removed the last `Universal` reference. Everything
else: unused since introduction. |

As of 2026-11-25:
- No caller has read the `UserConfigService` return values in the more
than 5 years since they were added.
- The two `PresetService` helpers have had no caller outside their spec
for almost 5 years, and the `CollaborationResource` bindings have been
unused for as long.
- The `#statsRow` reference has been unread for over 2 years.
- The commented call has pointed at a deleted method, and the
`StorageConfig` constants have been unread, for over a year and a half
each.
- The Universal import has been unused for almost 7 months.
- The `setCover` hook has had no caller in the almost 3 months it has
existed, and the telemetry duplicates have done nothing in the month
since they were added.

### Any related issues, documentation, discussions?

Closes apache#9695.

### How was this PR tested?

Ran on this branch and on `main` at `d1a0c5e673` (Windows 11; Node 24
with Yarn 4.14.1; JDK 17):

```bash
cd frontend
npx ng test --watch=false --include='**/preset.service.spec.ts' --include='**/user-config.service.spec.ts' --include='**/preset-wrapper.component.spec.ts' --include='**/result-table-frame.component.spec.ts' --include='**/search-results.component.spec.ts' --include='**/resource-registry.service.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
sbt Config/test Observability/test "WorkflowExecutionService/testOnly org.apache.texera.web.resource.CollaborationResourceSpec org.apache.texera.web.observability.WorkflowMetricsRecorderSpec"
sbt Config/scalafmtCheckAll Observability/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "Config/scalafixAll --check" "Observability/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check"
```

- **Frontend:** the six specs run 199 tests on this branch and 206 on
`main`, all passing. The 7 extra on `main` are the deleted helpers' own
spec cases; every other test keeps its name and outcome. Both
typechecks, prettier-eslint and ESLint pass.
- **Scala:** the `Config` and `Observability` suites and the two Amber
specs run 212 tests, all passing on both sides with the same names and
outcomes. scalafmt and scalafix pass for all three projects.
- Every sbt run compiles the build definition, so
`AddMetaInfLicenseFiles.scala` compiled with and without the import.

To re-check, both commands return no hits on this branch:

```bash
git grep -nwE "getOperatorPreset|filterOperatorPresetProperties|ajvStrip|setCover" -- frontend/src
git grep -nE "ENV_(JDBC|ICEBERG|S3)_" -- common/config/src/main/scala/org/apache/texera/common/config/StorageConfig.scala
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file fix infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-jar META-INF/LICENSE should describe each jar's actual contents

4 participants