Skip to content

Make LICENSE-wheel reflect the bundled UI dependencies, plus two 0.43.0 RC0 fixes - #868

Merged
skrawcz merged 4 commits into
apache:mainfrom
potiuk:fix/wheel-third-party-license
Aug 3, 2026
Merged

Make LICENSE-wheel reflect the bundled UI dependencies, plus two 0.43.0 RC0 fixes#868
skrawcz merged 4 commits into
apache:mainfrom
potiuk:fix/wheel-third-party-license

Conversation

@potiuk

@potiuk potiuk commented Aug 3, 2026

Copy link
Copy Markdown
Member

Follow-up to my -1 on the 0.43.0 RC0 vote thread, plus two smaller
things found while verifying that RC.

1. LICENSE-wheel did not reflect what the wheel contains

The wheel's only non-source content is the compiled tracking UI at
burr/tracking/server/build/assets/index-*.js. That bundle contains code
from 130 npm packages — MIT (115), ISC (9), Apache-2.0 (3),
BSD-3-Clause (2), PSF (1) — while LICENSE-wheel listed exactly one
third-party work (the deep-researcher MIT text). BSD-3-Clause in
particular requires the copyright notice be reproduced in redistributions.

This was raised as a non-blocking note on the 0.42.0 RC3 thread, and the
CRA → Vite migration (#793) made it worse by dropping the webpack-emitted
main.*.js.LICENSE.txt sidecar, so 0.43.0 ships less third-party license
information than 0.42.0 did.

Rather than hand-maintain the list — it drifts silently on every
dependency bump — this adds scripts/generate_wheel_license.py, which
derives it from the build itself: run a sourcemap build, read the
sourcemap's sources array to find every node_modules file actually
compiled into the bundle, resolve each to its owning package, and rewrite
everything below a marker line in LICENSE-wheel. Content above the
marker stays hand-maintained.

python scripts/generate_wheel_license.py           # regenerate
python scripts/generate_wheel_license.py --check   # fail if stale

NOTICE is deliberately unchanged: none of the 130 bundled packages
ships a NOTICE file, so there is no NOTICE content to carry over.

One thing worth a reviewer's eye: 28 of the packages ship no license file
at all (the micromark-* family, @react-aria/*, react-select,
@heroicons/react, heap). Those are listed with their package.json
license identifier and marked as such rather than silently omitted.

2. Release validation now catches this class of drift

RAT excludes burr/tracking/server/build/**, so the existing license step
never inspects the compiled UI — the only content the wheel adds over the
sdist. That is precisely where this gap hid. release-validation.yml now
runs generate_wheel_license.py --check after the artifact build (which
has already installed telemetry/ui/node_modules), so a UI dependency
bump that isn't reflected in LICENSE-wheel fails the PR.

3. pytest tests/ aborted collection without boto3

tests/integrations/test_bip0042_bedrock.py imported botocore at module
level, above the pytest.importorskip("boto3") guard. botocore ships with
boto3, so without the [bedrock] extra the import raised and pytest
reported a collection error rather than a skip — and a collection error
interrupts the whole run. pytest tests/, the command
scripts/README.md gives release voters, therefore executed zero
tests on a plain pip install -e ".[tests]".

CI doesn't catch it because the main test job passes
--ignore=tests/integrations/test_bip0042_bedrock.py.

Moving the import below the guard fixes it. Before: 1 error during collection. After: 1 skipped, and the rest of the suite runs.

4. GET /api/v0/version returned 500 on a clean install

The endpoint used pkg_resources. setuptools isn't a declared dependency,
isn't present in a venv created by modern tooling, and dropped
pkg_resources in 81.0, so the endpoint raised ModuleNotFoundError.
Switched to importlib.metadata; the fallback chain to the legacy burr
distribution and then "unknown" is unchanged. No UI component calls
this, but it is public API and is in the generated OpenAPI client.

Verification

  • generate_wheel_license.py --check from a clean npm ci → 130 packages,
    up to date, exit 0 (reproduced from a different node_modules tree than
    the one used to generate the file)
  • pytest tests/ without boto3 → 664 passed, 5 skipped (was: aborted)
  • pytest tests/ with boto3 → 687 passed, 4 skipped
  • GET /api/v0/version on a setuptools-free venv → 200 {"version":"0.43.0"}

Targets main. If this lands before an RC1 it will need cherry-picking
onto the release branch, since v0.43.0-incubating-RC0 was cut from
chore/release-0.43.0-rc0 rather than main.

🤖 Generated with Claude Code

potiuk added 4 commits August 3, 2026 03:01
The wheel's only non-source content is the compiled tracking UI at
burr/tracking/server/build/assets/index-*.js, which bundles code from
130 npm packages under MIT, ISC, Apache-2.0, BSD-3-Clause and PSF.
LICENSE-wheel listed exactly one third-party work, so the binary
distribution's LICENSE did not reflect its contents.

Rather than maintain that list by hand, derive it from the build:
scripts/generate_wheel_license.py runs a sourcemap build, reads the
sources array to find every node_modules file compiled into the bundle,
resolves each to its owning package, and rewrites everything below the
generated marker in LICENSE-wheel. --check fails when the file is stale,
so CI can catch drift on dependency bumps.

None of the bundled packages ships a NOTICE file, so NOTICE is unchanged.

Generated-by: Claude Opus 5 (1M context)
test_bip0042_bedrock.py imported botocore at module level, above the
pytest.importorskip("boto3") guard, which made the guard dead code:
botocore ships with boto3, so without the [bedrock] extra the import
raised and pytest reported a collection error rather than a skip. Since
a collection error interrupts the whole run, `pytest tests/` -- the
command scripts/README.md gives release voters -- executed no tests at
all on a plain `pip install -e ".[tests]"`.

CI did not catch this because the main test job passes
--ignore=tests/integrations/test_bip0042_bedrock.py.

Move the botocore import below the guard. Without boto3 the module now
skips and the rest of the suite runs; with it, the tests are unchanged.

Generated-by: Claude Opus 5 (1M context)
The version endpoint imported pkg_resources, which is a setuptools
module. setuptools is not a declared dependency of apache-burr, is not
present in a venv created by modern tooling, and dropped pkg_resources
entirely in 81.0. On a clean install of the 0.43.0 wheel the endpoint
therefore raised ModuleNotFoundError and returned 500.

importlib.metadata is in the standard library on every Python we
support. Behaviour is otherwise unchanged, including the fallback to
the legacy "burr" distribution and then to "unknown".

Generated-by: Claude Opus 5 (1M context)
RAT excludes burr/tracking/server/build/**, so the existing license step
never inspects the compiled UI -- the only content the wheel adds over
the sdist. That is exactly where the LICENSE gap went unnoticed, and it
is what silently drifts whenever a UI dependency is added or bumped.

Add a release-validation step that re-derives the bundled npm packages
from a sourcemap build and fails if LICENSE-wheel no longer matches. It
runs after the artifact build, which has already installed
telemetry/ui/node_modules.

Generated-by: Claude Opus 5 (1M context)
@github-actions github-actions Bot added area/tracking Telemetry, tracing, OpenTelemetry area/ci Workflows, build, release scripts labels Aug 3, 2026
@potiuk
potiuk requested review from elijahbenizzy and skrawcz August 3, 2026 01:20
@skrawcz
skrawcz merged commit 8a91bcc into apache:main Aug 3, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Workflows, build, release scripts area/tracking Telemetry, tracing, OpenTelemetry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants