Repository navigation
chore(build): ship LICENSE-binary, NOTICE-binary, and licenses/ in dist zips and images - #4449
Merged
Merged
Conversation
…st zips The sbt dist zips currently ship the repo-root LICENSE and NOTICE at the top level. For a binary distribution, ASF policy requires a LICENSE that enumerates every bundled third-party dependency, a matching NOTICE, and the full text of every non-Apache-2.0 license bundled in. Plumb those files through the sbt-native-packager Universal mappings: - project/AddMetaInfLicenseFiles.scala: replace `distSettings` (which copied the repo-root LICENSE/NOTICE into the zip) with a `distMappings(existing, rootDir)` helper that maps LICENSE-binary -> LICENSE, NOTICE-binary -> NOTICE, DISCLAIMER-WIP -> DISCLAIMER-WIP (if present), and every licenses/*.txt into a top-level licenses/ dir of the zip. Add `require(...)` preconditions so the build fails early if any compliance file is missing. - Root build.sbt: drop the `asfDistLicensingSettings` shortcut; each dist-producing module now invokes `distMappings` inline. - access-control-service, amber, config-service, computing-unit-managing-service, file-service, workflow-compiling-service: each adds `Universal / mappings := AddMetaInfLicenseFiles.distMappings(...)` after its `enablePlugins(JavaAppPackaging)` line. - Add stub LICENSE-binary (Apache 2.0 text with a placeholder note) and stub NOTICE-binary so the new require() checks pass. The full third-party manifest is tracked in apache#4131 and will replace the stubs in a follow-up change. Generated-by: Claude Code (Claude Opus 4.7) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Apr 22, 2026
The real files ship in a separate content PR (apache#4387). Drop the stubs so this PR is focused purely on the sbt-native-packager wiring. Merge order note: this PR now depends on apache#4387 landing first so the `require(...)` preconditions in distMappings pass. Without that, the build fails early with a clear message. Generated-by: Claude Code (Claude Opus 4.7) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… images Each Dockerfile: - Adds LICENSE-binary, NOTICE-binary, and licenses/ to the build context alongside the existing LICENSE / NOTICE / DISCLAIMER-WIP copy. - At the runtime stage, installs LICENSE-binary -> /texera/LICENSE and NOTICE-binary -> /texera/NOTICE so the shipped image top level matches ASF binary-distribution policy, and ships licenses/ verbatim. computing-unit-master.dockerfile and computing-unit-worker.dockerfile additionally run `pip-licenses` against the installed Python environment to emit /texera/licenses/python-3rdparty.txt, giving each image an authoritative Python-side manifest referenced by /texera/LICENSE. Generated-by: Claude Code (Claude Opus 4.7) Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
aglinxinyuan
approved these changes
Apr 29, 2026
LICENSE-binary (added in apache#4387) already enumerates every bundled Python package by name, so the runtime pip-licenses dump was a redundant second source of truth that would drift out of sync. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
frontend/package.json now requires node >=20.19.0 after the Angular 21 upgrade in apache#4534, but bin/texera-web-application.dockerfile was still pinned to node:18.17, breaking docker builds with: The Angular CLI requires a minimum Node.js version of v20.19 or v22.12. Bump to node:22-bookworm (LTS) to match. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
LICENSE-binary already enumerates every bundled npm package by name, so the Angular-CLI-generated 3rdpartylicenses.txt was a redundant second source of truth that would drift out of sync. Same rationale as the pip-licenses removal. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
bobbai00
enabled auto-merge (squash)
April 29, 2026 08:30
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…st zips and images (apache#4449) ### What changes were proposed in this PR? Route the binary-distribution compliance files into `sbt dist` zips and Docker images. **sbt wiring:** - `project/AddMetaInfLicenseFiles.scala` — replace `distSettings` with `distMappings(existing, rootDir)` that maps `LICENSE-binary` → `LICENSE`, `NOTICE-binary` → `NOTICE`, `DISCLAIMER-WIP` → `DISCLAIMER-WIP` (optional), and every `licenses/*.txt` into a top-level `licenses/` directory. Fails the build via `require(...)` if any compliance file is missing. - Root `build.sbt` — drop the `asfDistLicensingSettings` shortcut. - Six per-module `build.sbt` (access-control-service, amber, config-service, computing-unit-managing-service, file-service, workflow-compiling-service) — invoke `distMappings` on `Universal / mappings`. **Docker wiring** (8 `bin/*.dockerfile`): - Copy `LICENSE-binary`, `NOTICE-binary`, and `licenses/` into the build context. - At runtime, install `LICENSE-binary` as `/texera/LICENSE`, `NOTICE-binary` as `/texera/NOTICE`, and ship `licenses/` verbatim. - `computing-unit-master` / `computing-unit-worker` additionally run `pip-licenses` to emit `/texera/licenses/python-3rdparty.txt`. ### Any related issues, documentation, discussions? Closes apache#4448. Depends on apache#4387 landing first (provides `LICENSE-binary` / `NOTICE-binary` / `licenses/*.txt`). ### How was this PR tested? - `sbt dist` for each dist-producing module; unzipped output shows `LICENSE`, `NOTICE`, and `licenses/` at the top level with the expected contents. - Run `docker build` locallay and verified that the image include LICENSE and NOTICE properly ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.7) --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Nov 26, 2026
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Route the binary-distribution compliance files into
sbt distzips and Docker images.sbt wiring:
project/AddMetaInfLicenseFiles.scala— replacedistSettingswithdistMappings(existing, rootDir)that mapsLICENSE-binary→LICENSE,NOTICE-binary→NOTICE,DISCLAIMER-WIP→DISCLAIMER-WIP(optional), and everylicenses/*.txtinto a top-levellicenses/directory. Fails the build viarequire(...)if any compliance file is missing.build.sbt— drop theasfDistLicensingSettingsshortcut.build.sbt(access-control-service, amber, config-service, computing-unit-managing-service, file-service, workflow-compiling-service) — invokedistMappingsonUniversal / mappings.Docker wiring (8
bin/*.dockerfile):LICENSE-binary,NOTICE-binary, andlicenses/into the build context.LICENSE-binaryas/texera/LICENSE,NOTICE-binaryas/texera/NOTICE, and shiplicenses/verbatim.computing-unit-master/computing-unit-workeradditionally runpip-licensesto emit/texera/licenses/python-3rdparty.txt.Any related issues, documentation, discussions?
Closes #4448. Depends on #4387 landing first (provides
LICENSE-binary/NOTICE-binary/licenses/*.txt).How was this PR tested?
sbt distfor each dist-producing module; unzipped output showsLICENSE,NOTICE, andlicenses/at the top level with the expected contents.docker buildlocallay and verified that the image include LICENSE and NOTICE properlyWas this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)