Repository navigation
chore(licensing): add per-module NOTICE-binary generation script and CI checks for detecting NOTICE-binary drifting - #5417
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5417 +/- ##
============================================
+ Coverage 52.42% 52.52% +0.09%
- Complexity 2481 2516 +35
============================================
Files 1070 1070
Lines 41359 42021 +662
Branches 4441 4613 +172
============================================
+ Hits 21682 22071 +389
- Misses 18406 18668 +262
- Partials 1271 1282 +11
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5d36e76 to
7df03ad
Compare
|
do we need this in v1.2? if so please add backport. cc @xuang7 |
|
How do we review this PR? or another way to say, how do we know if the change is correct? |
…ETA-INF Adds bin/licensing/generate_notice_binary.py: walks each module's bundled jars, extracts every META-INF/NOTICE (and root-level NOTICE) file, skips first-party org.apache.texera.* jars, dedupes by content hash so jars from the same upstream collapse into one block, prepends the project's own root NOTICE, and emits one block per unique blob. Each block carries a heading derived from the longest common dotted prefix of its contributing jars' coordinates, the list of those jars, and the upstream NOTICE verbatim. Output is deterministic: CRLF->LF normalized and sorted by jar-count with a hash tiebreaker. Optional --extras appends non-jar attribution blocks (amber/NOTICE-binary-python carries the aiohttp + Matplotlib python wheels, which ship no NOTICE inside any jar). Replaces the 6 hand-curated per-module NOTICE-binary files (introduced in apache#4668) with the generator's output, so every distinct upstream attribution actually shipped is preserved verbatim and stays in sync with the deps. CI (build.yml): after each dist is built and unzipped, a new step regenerates that module's NOTICE-binary against the dist lib/ dir and diffs it against the committed file, failing with a one-line fix-up command on drift. The amber check runs in the scala job; the five platform services are each checked in the per-service platform matrix job, alongside the existing LICENSE-binary check. .licenserc.yaml: exclude **/NOTICE-binary-* from the license-header check (the extras manifest is plain text with no comment style), mirroring the existing **/LICENSE-binary-* exclusion.
7df03ad to
5fd5b8d
Compare
I think this should be backported to release/v1.2, and it has been linked under the release preparation tracking issue. Second this question. I'm also curious about the expected review process for this PR. |
There was a problem hiding this comment.
Pull request overview
This PR automates generation of per-module NOTICE-binary files directly from the bundled jars’ embedded NOTICE metadata, and adds CI checks to prevent those committed NOTICE-binary files from drifting as dependencies change.
Changes:
- Added
bin/licensing/generate_notice_binary.pyto scan distlib/jars, extract NOTICE content, de-duplicate, and emit deterministic per-moduleNOTICE-binaryoutput (with optional--extras). - Regenerated service
NOTICE-binaryfiles to reflect the actual bundled jars’ NOTICE content. - Added GitHub Actions steps to regenerate +
diffNOTICE-binaryduring CI, and updated.licenserc.yamlto excludeNOTICE-binary-*from header enforcement.
Reviewed changes
Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
bin/licensing/generate_notice_binary.py |
New generator that extracts/dedupes jar NOTICE content and writes deterministic NOTICE-binary. |
.github/workflows/build.yml |
Adds CI drift-check steps that regenerate and diff NOTICE-binary outputs. |
.licenserc.yaml |
Excludes NOTICE-binary-* from license-header checks (needed for generated extras). |
amber/NOTICE-binary-extras |
Adds non-jar attribution blocks to append to amber’s generated NOTICE-binary. |
access-control-service/NOTICE-binary |
Regenerated from bundled jars’ embedded NOTICE content. |
config-service/NOTICE-binary |
Regenerated from bundled jars’ embedded NOTICE content. |
file-service/NOTICE-binary |
Regenerated from bundled jars’ embedded NOTICE content (large expansion reflecting actual jar notices). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Yicong-Huang
left a comment
There was a problem hiding this comment.
I reviewed mainly on the python script and CI change. the notice file changes are mainly generated changes, hard to verify by human.
Drops each block's "Bundled jars: ..." line and derives the heading from the contributing jars' version-less Maven coordinates (groupId.artifactId, read from each jar's META-INF/.../pom.properties, with a filename-stripping fallback) instead of the versioned filename. The verbatim upstream NOTICE content is unchanged. This keeps the NOTICE-binary stable across routine dependency version bumps: a bump that leaves the upstream NOTICE text unchanged now produces no diff, so the file only changes when a dependency is added or removed or its NOTICE content actually changes.
xuang7
left a comment
There was a problem hiding this comment.
Overall, this PR looks good to me.
- build.yml: fold each module's NOTICE-binary drift-check into the adjacent LICENSE-binary check step (a single "check binary LICENSE + NOTICE" step for amber and for each platform service) rather than a separate step. - generate_notice_binary.py: parse zip-internal entry paths with PurePosixPath instead of ad-hoc string splitting (zip entry names are always POSIX, so this is the correct and portable way), addressing the Windows-portability note. - Add bin/licensing/test_generate_notice_binary.py: stdlib unittest covering version stripping, artifact-label resolution (pom.properties + filename fallback), NOTICE extraction / CRLF normalization, clustering and heading, and an end-to-end CLI run. Auto-discovered by the existing licensing-test CI step, mirroring test_check_binary_deps.py. - amber/NOTICE-binary-python: replace the vague aiohttp note with the exact MIT license + copyright (Copyright (c) 2018 Fedor Indutny) of the vendored llhttp parser, taken verbatim from the wheel's licenses/vendor/llhttp/LICENSE, and regenerate amber/NOTICE-binary.
…CI checks for detecting NOTICE-binary drifting (#5417) ### What changes were proposed in this PR? Auto-generates each module's `NOTICE-binary` from the third-party `META-INF/NOTICE` files in its bundled jars — replacing the hand-curated subsets introduced in #4668 — and adds a CI drift-check so the committed files can never silently rot when dependencies change. - **New generator — `bin/licensing/generate_notice_binary.py`:** walks a module's dist `lib/` dir, extracts every `META-INF/NOTICE` (and root-level `NOTICE`) from each bundled jar, skips first-party `org.apache.texera.*` jars, dedupes by content hash so jars sharing an upstream notice collapse into one block, prepends the project's own root `NOTICE`, and emits one block per unique notice with a synthesized heading + the contributing-jar list. Output is deterministic (CRLF→LF normalized, stably sorted by jar-count). An optional `--extras <file>` appends non-jar attributions. - **`amber/NOTICE-binary-extras` (new):** the aiohttp + Matplotlib notices, which ship as Python wheels (not jars) and so can't be extracted from the `lib/` dir. - **6 per-module `NOTICE-binary` files regenerated** from the actual bundled jars: `amber`, `access-control-service`, `config-service`, `file-service`, `computing-unit-managing-service`, `workflow-compiling-service`. - **CI drift-check (`build.yml`):** after each dist is built and unzipped, a new step regenerates that module's `NOTICE-binary` and diffs it against the committed file, failing the build with a one-line fix-up command on any drift. The amber check runs in the scala job; the five platform services are each checked in the per-service `platform` matrix job, alongside the existing `LICENSE-binary` check. `LICENSE-binary` stays hand-maintained (it needs human judgment on each license); only `NOTICE-binary` — a mechanical carry-forward of upstream notices — is generated. So future dep bumps fail CI with the exact command to regenerate, instead of silently drifting. ### Any related issues, documentation, discussions? Closes #4674 ASF guidance: https://infra.apache.org/licensing-howto.html (Apache-2.0 §4(d)). ### How was this PR tested? - Built all six module dists locally (`sbt <project>/Universal/stage`) and ran the generator against each freshly-built `lib/`; the committed `NOTICE-binary` files are byte-identical to the generator output, so the new CI drift-check passes for every module. - Verified the existing `LICENSE-binary` checks (`check_binary_deps.py`, PR mode) still pass against the same libs for all six modules. - `build.yml` validated as well-formed YAML. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 (1M context) --------- (backported from commit 27c1df4) Co-authored-by: Bob Bai <[email protected]>
|
Backport to |
…CI checks for detecting NOTICE-binary drifting (apache#5417) ### What changes were proposed in this PR? Auto-generates each module's `NOTICE-binary` from the third-party `META-INF/NOTICE` files in its bundled jars — replacing the hand-curated subsets introduced in apache#4668 — and adds a CI drift-check so the committed files can never silently rot when dependencies change. - **New generator — `bin/licensing/generate_notice_binary.py`:** walks a module's dist `lib/` dir, extracts every `META-INF/NOTICE` (and root-level `NOTICE`) from each bundled jar, skips first-party `org.apache.texera.*` jars, dedupes by content hash so jars sharing an upstream notice collapse into one block, prepends the project's own root `NOTICE`, and emits one block per unique notice with a synthesized heading + the contributing-jar list. Output is deterministic (CRLF→LF normalized, stably sorted by jar-count). An optional `--extras <file>` appends non-jar attributions. - **`amber/NOTICE-binary-extras` (new):** the aiohttp + Matplotlib notices, which ship as Python wheels (not jars) and so can't be extracted from the `lib/` dir. - **6 per-module `NOTICE-binary` files regenerated** from the actual bundled jars: `amber`, `access-control-service`, `config-service`, `file-service`, `computing-unit-managing-service`, `workflow-compiling-service`. - **CI drift-check (`build.yml`):** after each dist is built and unzipped, a new step regenerates that module's `NOTICE-binary` and diffs it against the committed file, failing the build with a one-line fix-up command on any drift. The amber check runs in the scala job; the five platform services are each checked in the per-service `platform` matrix job, alongside the existing `LICENSE-binary` check. `LICENSE-binary` stays hand-maintained (it needs human judgment on each license); only `NOTICE-binary` — a mechanical carry-forward of upstream notices — is generated. So future dep bumps fail CI with the exact command to regenerate, instead of silently drifting. ### Any related issues, documentation, discussions? Closes apache#4674 ASF guidance: https://infra.apache.org/licensing-howto.html (Apache-2.0 §4(d)). ### How was this PR tested? - Built all six module dists locally (`sbt <project>/Universal/stage`) and ran the generator against each freshly-built `lib/`; the committed `NOTICE-binary` files are byte-identical to the generator output, so the new CI drift-check passes for every module. - Verified the existing `LICENSE-binary` checks (`check_binary_deps.py`, PR mode) still pass against the same libs for all six modules. - `build.yml` validated as well-formed YAML. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 (1M context) --------- Co-authored-by: Bob Bai <[email protected]>
…CI checks for detecting NOTICE-binary drifting (apache#5417) ### What changes were proposed in this PR? Auto-generates each module's `NOTICE-binary` from the third-party `META-INF/NOTICE` files in its bundled jars — replacing the hand-curated subsets introduced in apache#4668 — and adds a CI drift-check so the committed files can never silently rot when dependencies change. - **New generator — `bin/licensing/generate_notice_binary.py`:** walks a module's dist `lib/` dir, extracts every `META-INF/NOTICE` (and root-level `NOTICE`) from each bundled jar, skips first-party `org.apache.texera.*` jars, dedupes by content hash so jars sharing an upstream notice collapse into one block, prepends the project's own root `NOTICE`, and emits one block per unique notice with a synthesized heading + the contributing-jar list. Output is deterministic (CRLF→LF normalized, stably sorted by jar-count). An optional `--extras <file>` appends non-jar attributions. - **`amber/NOTICE-binary-extras` (new):** the aiohttp + Matplotlib notices, which ship as Python wheels (not jars) and so can't be extracted from the `lib/` dir. - **6 per-module `NOTICE-binary` files regenerated** from the actual bundled jars: `amber`, `access-control-service`, `config-service`, `file-service`, `computing-unit-managing-service`, `workflow-compiling-service`. - **CI drift-check (`build.yml`):** after each dist is built and unzipped, a new step regenerates that module's `NOTICE-binary` and diffs it against the committed file, failing the build with a one-line fix-up command on any drift. The amber check runs in the scala job; the five platform services are each checked in the per-service `platform` matrix job, alongside the existing `LICENSE-binary` check. `LICENSE-binary` stays hand-maintained (it needs human judgment on each license); only `NOTICE-binary` — a mechanical carry-forward of upstream notices — is generated. So future dep bumps fail CI with the exact command to regenerate, instead of silently drifting. ### Any related issues, documentation, discussions? Closes apache#4674 ASF guidance: https://infra.apache.org/licensing-howto.html (Apache-2.0 §4(d)). ### How was this PR tested? - Built all six module dists locally (`sbt <project>/Universal/stage`) and ran the generator against each freshly-built `lib/`; the committed `NOTICE-binary` files are byte-identical to the generator output, so the new CI drift-check passes for every module. - Verified the existing `LICENSE-binary` checks (`check_binary_deps.py`, PR mode) still pass against the same libs for all six modules. - `build.yml` validated as well-formed YAML. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 (1M context) --------- Co-authored-by: Bob Bai <[email protected]>
) ### What changes were proposed in this PR? Remove unused imports, bindings, helpers and fields, and settings that repeat a default or another entry, from the Amber Python runtime, the Python test resources of the workflow compiler and operators, the `bin/` licensing, local-dev and observability scripts, repository configuration, and three GitHub workflows (**+102/-172 lines**). There is no behavior change. - **Amber Python runtime:** `StatisticsManager` uses `defaultdict` instead of the deprecated `typing.DefaultDict`, and `BroadcastPartitioner` builds its batch with `[]`. `LargeBinaryOutputStream` raises and documents `OSError` (which `IOError` aliases), wraps its best-effort cleanup delete in `contextlib.suppress`, and drops the `pass` after `flush`'s docstring. - **Operator verification test resources:** `py_op_driver.py` drops ten `pytexera` imports and `RAW_TYPE_MAPPING` that it never reads. User code runs in its own namespace seeded by `from pytexera import *`, so the "used dynamically" note on those imports did not hold. `compare.py` drops the uncalled `_string_columns` helper and two dict copies of `double_kinds_a`/`double_kinds_e`, and `hf_parse_probe.py` drops unused `io` and `re` imports. Quoted annotations, `open(..., "r")`, `startswith` plus a slice, and a placeholder-free f-string take their plain forms here and in `standalone_worker.py`, `py_compile_worker.py` and `hf_binary_value_probe.py`. - **`bin/` scripts:** the licensing tools use a tuple `startswith`, read the one regex group they need instead of unpacking all four, print plain strings where f-strings had no placeholders, return a `bool` expression directly, drop annotation quotes under `from __future__ import annotations`, use `removesuffix`, and name unused loop values `_`. Two licensing tests drop `# noqa: E402` comments that suppress nothing under Ruff, and `test_local_dev_tui.py` drops the never-passed `version` parameter of `_seed_jvm_layout` together with the docstring sentence about a jar it never wrote. `bin/observability/smoke_test.py` stops returning an unread status from `_post`, builds the trace id from one `uuid4().hex` (the first 32 hex digits of two concatenated ones were always the first), and drops a `leaked = False` that both branches of the following `try` overwrite. - **Repository configuration:** `amber/pyproject.toml` drops `line-length = 88` and `max-complexity = 10`, which are Ruff's defaults (and `C901` is not selected). `.dockerignore` drops a root `user-resources/` entry that its first rule, `**/user-resources/`, already covers. `bin/fix-format.sh` drops the `""` case that `TARGET="${1:-all}"` makes unreachable, and `bin/frontend-proto-gen.sh` drops a `--proto_path` that repeats its `-I`. `bin/k8s/templates/aws/.gitkeep` goes, since the folder holds `s3-credentials-secret.yaml`. `bin/y-websocket-server/package.json` drops npm-init's `main` and placeholder `test` script (the image runs `npx y-websocket`), and a `bin/observability/docker-compose.yml` comment stops pointing at a `start_app.sh` that the repository does not have. - **GitHub workflows:** `comment-commands.yml` drops `github.event_name == 'issue_comment' && github.event.action == 'created'` from three job conditions, because the workflow only runs on `issue_comment: [created]`. `pr-assignment.yml` drops a `|| ''` that follows a `typeof ... === 'string'` guard. `benchmarks-pr-comment.yml` stops storing per-benchmark commit and date, a sample count and delta labels that nothing reads, takes each row's status from the deltas it already computed instead of a second `deltaInfo` pass, reuses each metric's 7-day delta, and builds the PR-only CSV table only when there is no comparison to show. | Event | PR / Commit | | --- | --- | | Introduced by | Amber Python runtime: apache#1891 (2023-05-01), apache#3262 (2025-02-18), apache#4100 (2025-12-15), apache#4707 (2026-05-03), apache#5249 (2026-06-06), apache#8260 (2026-11-18); test resources: apache#7207 (2026-08-14), apache#8617 (2026-10-15), apache#9306 (2026-11-10), apache#8357 (2026-11-17), apache#8358 (2026-11-18), apache#8359 (2026-11-19); `bin/` scripts: apache#4387 (2026-04-29), apache#4668 (2026-05-02), apache#4693 (2026-05-02), apache#4711 (2026-05-03), apache#5057 (2026-05-15), apache#5417 (2026-06-10), apache#5961 (2026-06-28), apache#5377 (2026-10-28); configuration: apache#3019 (2024-11-20), apache#3335 (2025-03-23), apache#3441 (2025-05-19), apache#3890 (2025-10-14), apache#4005 (2025-10-29), apache#4105 (2025-12-05), apache#5757 (2026-06-24); workflows: apache#4885 (2026-05-03), apache#4986 (2026-05-08), apache#5148 (2026-05-22), apache#5557 (2026-06-11), apache#5639 (2026-06-12) | | Usage removed by | `issue_comment` checks: apache#4899 (2026-05-04, `ci: drop the triage label, use is:open no:assignee filter`) moved `/take` out of `issue-triage.yml`, which also ran on `issues` events, into a workflow that only runs on created comments, and apache#4986 and apache#5148 copied the checks into two new jobs; `aws/.gitkeep`: apache#5932 (2026-07-01, `feat(k8s): make app-tier object storage configurable via storage.s3`) added the folder's first template; PR-only CSV table: apache#5639 (2026-06-12, `ci: compare benchmark PRs with main`) shows it only when there is no comparison; everything else: unused or redundant since introduction | As of 2026-11-23, the unread test-resource code is under a week old, the `.gitkeep` placeholder and the unread benchmark fields have been redundant for about 5 months, the `issue_comment` checks for over 6 months, and the duplicate `.dockerignore` entry and `--proto_path` for 20 and 24 months. ### Any related issues, documentation, discussions? Closes apache#9676. ### How was this PR tested? Ran on `525f8ce3fb` and on `main` at `89a492f97e` (Windows 11, Python 3.12 with CI's pinned `ruff` 0.14.7, `pytest` 9.0.3 and `textual` 8.2.8, JDK 17): ```bash cd amber ruff check src/main/python src/test/python ruff format --check src/main/python src/test/python pytest -m "not integration" cd .. ruff check $(git diff --name-only origin/main -- '*.py' ':!amber/') python -m pytest bin/ -v --tb=short sbt "WorkflowCompilingService/testOnly org.apache.texera.amber.translator.verify.ComparatorSpec org.apache.texera.amber.translator.verify.HarnessSpec org.apache.texera.amber.translator.verify.PyOpExecHarnessSpec org.apache.texera.amber.translator.verify.VisualizationJsonComparatorSpec" sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.codegen.HuggingFaceBinaryValueBehaviorSpec org.apache.texera.amber.operator.huggingFace.codegen.HuggingFaceParseBehaviorSpec org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec" ``` - Ruff: passed on `amber/` (218 files already formatted) and on the 14 changed Python files outside `amber/`. - `pytest -m "not integration"` in `amber/` (JUnit XML): each of the 1,524 tests has the same outcome as on `main`: 1,496 passed, 10 skipped, and the same 18 platform-dependent tests (Iceberg catalog on PostgreSQL and `s3fs`, time zones, object reprs) fail on this Windows machine on both. - `python -m pytest bin/` (JUnit XML): each of the 196 tests has the same outcome as on `main`: 186 passed, and nine `bin/mounter` tests plus `test_stamp_dir_for_matches_shell_sha1`, which assume POSIX paths and shells, fail on Windows on both. - sbt (JUnit XML, `UDF_PYTHON_PATH` set to Python 3.12 because Windows has no `python3`): these seven suites load the edited test resources. `WorkflowCompilingService` passed 52 of 52 in 4 suites and `WorkflowOperator` 11 of 11 in 3 suites, with 0 canceled, the same as on `main`. - Licensing scripts: `concat_license_binary.py` writes byte-identical combined licenses for the Python and frontend images, and `check_binary_deps.py jar` prints byte-identical reports and exit codes for a synthetic lib folder with missing, extra and version-mismatched jars, with and without `--ignore-transitive-version`. - Workflows: the three edited workflows run only from the default branch (`issue_comment`, `pull_request_target` and `workflow_run`), so this PR's CI cannot run them. Each edited `github-script` body ran before and after under Node with recording stubs for `github`, `core`, `fs` and `fetch`, over 496 fixtures (missing or malformed CSV and baseline data, failed API calls, body edits with and without closing references). Every API call, comment body and log line is identical, and a one-line change to each script does show up in its traces. The `comment-commands.yml` conditions differ from `main` only by the two removed checks. - `bash -n` passes on `bin/fix-format.sh` and `bin/frontend-proto-gen.sh`, and the edited YAML, TOML and JSON files parse. - After review, `f84888ca6c` changes only three docstrings in `large_binary_output_stream.py` and inlines one local in `py_op_driver.py`. On it, Ruff passes as above, each of the 1,524 `amber` tests again has the same outcome as on `main`, the four `WorkflowCompilingService` suites pass 52 of 52, and `_jsonify` returns the same strings as on `525f8ce3fb` for seven `BINARY` inputs, with and without the pickle marker. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
### What changes were proposed in this PR? Remove redundant code from the frontend, the licensing scripts, two Scala sources and the agent service (**+26/−41 lines**). There is no behavior change. - **Dataset and model detail pages:** each `route.params` emission was switched to `this.route.data`, and the empty `.subscribe()` threw away what that emitted. The pages now `tap` the params, so the same fetches run in the same order without the extra subscription. The dataset page's `THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and the hub spec import the copy in `hub-workflow-detail.component.ts`, never this one. - **Version uploader:** the abort handler's 404 branch called `done()` and returned, which is what the handler already does for every error it does not retry. Its three constants become file-local: nothing imported `FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two. The spec now states the retry policy it expects. - **Computing-unit actions:** `confirmAndTerminate` reads `unit.computingUnit.uri` and `unit.computingUnit.name` before `unit?.computingUnit.type`, so the `?.` goes. - **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec imported it, and the spec now checks the backend's `"LoopEnd"` name directly. - **Agent interaction:** two imports from `agent.service` become one. - **Licensing scripts:** `audit_jar_licenses.py` stored each group's notice hash in a field that nothing reads, and the NOTICE test helper `make_jar` had an `extra` parameter that no caller passes. - **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers. - **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`. The `_` matches those types as well, so each becomes `case _`. - **`agent-service/.dockerignore`:** Docker reads the ignore file at the root of the build context. CI's image matrix (`build-and-push-images.yml`) and `bin/build-images.sh` both use the repository root as the context, and the agent Dockerfile copies `agent-service/...` paths from there, so the root `.dockerignore` applies and this file is never read. | Event | PR / Commit | | --- | --- | | Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269 (2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05), moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09); loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13); licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10); `PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013 (2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25); `agent-service/.dockerignore`: apache#4495 (2026-04-28) | | Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01) added the agent image's Dockerfile with paths from the repository root, so no build has read the file. Everything else: unused or redundant since introduction. | As of 2026-11-25: - The SQL sources' fallback arms have listed redundant types for over 5 years. - The dataset page's discarded subscription is almost 3 years old. - The version uploader's 404 branch has been redundant for over 10 months. - `agent-service/.dockerignore` has gone unread for almost 7 months. - The duplicate agent import is 12 days old. ### Any related issues, documentation, discussions? Closes apache#9691. ### How was this PR tested? Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24 with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff` 0.14.7; JDK 17): ```bash cd frontend npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.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 .. pytest bin/licensing ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py python bin/licensing/audit_jar_licenses.py <directory of 60 jars> sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" ``` - **Frontend:** the six specs run 379 tests, all passing on both sides. Both typechecks, prettier-eslint and ESLint pass. - **Python:** the licensing tests run 53 tests and 5 subtests, all passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints the same report on both sides for 60 jars from the local Coursier cache. - **Scala:** - The 11 `source.sql` suites run 204 tests, all passing on both sides. - The two PVE resource suites run 75 tests on both sides: 74 pass and 1 is canceled. The canceled test needs a file that is not executable, which this Windows filesystem cannot represent. - scalafmt and scalafix pass on both modules. - **`agent-service/.dockerignore`:** no image was built. The build context comes from `context="."` for every `bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from the `..` that `bin/build-images.sh` passes from `bin/`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
What changes were proposed in this PR?
Auto-generates each module's
NOTICE-binaryfrom the third-partyMETA-INF/NOTICEfiles in its bundled jars — replacing the hand-curated subsets introduced in #4668 — and adds a CI drift-check so the committed files can never silently rot when dependencies change.bin/licensing/generate_notice_binary.py: walks a module's distlib/dir, extracts everyMETA-INF/NOTICE(and root-levelNOTICE) from each bundled jar, skips first-partyorg.apache.texera.*jars, dedupes by content hash so jars sharing an upstream notice collapse into one block, prepends the project's own rootNOTICE, and emits one block per unique notice with a synthesized heading + the contributing-jar list. Output is deterministic (CRLF→LF normalized, stably sorted by jar-count). An optional--extras <file>appends non-jar attributions.amber/NOTICE-binary-extras(new): the aiohttp + Matplotlib notices, which ship as Python wheels (not jars) and so can't be extracted from thelib/dir.NOTICE-binaryfiles regenerated from the actual bundled jars:amber,access-control-service,config-service,file-service,computing-unit-managing-service,workflow-compiling-service.build.yml): after each dist is built and unzipped, a new step regenerates that module'sNOTICE-binaryand diffs it against the committed file, failing the build with a one-line fix-up command on any drift. The amber check runs in the scala job; the five platform services are each checked in the per-serviceplatformmatrix job, alongside the existingLICENSE-binarycheck.LICENSE-binarystays hand-maintained (it needs human judgment on each license); onlyNOTICE-binary— a mechanical carry-forward of upstream notices — is generated. So future dep bumps fail CI with the exact command to regenerate, instead of silently drifting.Any related issues, documentation, discussions?
Closes #4674
ASF guidance: https://infra.apache.org/licensing-howto.html (Apache-2.0 §4(d)).
How was this PR tested?
sbt <project>/Universal/stage) and ran the generator against each freshly-builtlib/; the committedNOTICE-binaryfiles are byte-identical to the generator output, so the new CI drift-check passes for every module.LICENSE-binarychecks (check_binary_deps.py, PR mode) still pass against the same libs for all six modules.build.ymlvalidated as well-formed YAML.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8 (1M context)