Summary
Add a build-time assertion in Dockerfile.integrated that fails the build if BlueSky's navigation data did not get installed.
Why
The integrated image installs BlueSky via uv pip install ./WebATM-integrated, which pulls bluesky-simulator[headless]. BlueSky's nav data comes from the bluesky-navdata package (~32 MB wheel), which is a hard transitive dependency — so today it gets installed automatically and lives in site-packages/bluesky_navdata/. There is no runtime download path in the fork (loadnavdata.py reads local .dat files and builds a local pickle cache).
The risk is a silent failure mode: if bluesky-navdata ever fails to resolve at build time (a transient PyPI issue, a future dependency/pin change, an accidental --no-deps), the build would still succeed and ship an image with no nav data. That only surfaces at runtime — and in deployments without egress (e.g. a sandboxed public demo on an internal/no-egress network) the container cannot fetch it and recover, so the simulation would come up with no waypoints/airports.
A build-time guard converts that quiet, hard-to-debug runtime failure into an immediate, obvious build error.
Proposed change
Add after the uv pip install ./WebATM-integrated step in Dockerfile.integrated:
# Fail the build loudly if the bundled BlueSky nav database didn't get
# installed. It ships via the bluesky-navdata dependency; a deployment without
# egress has no way to fetch it at runtime, so a missing one must fail here.
RUN python -c "import bluesky_navdata, pathlib, sys; \
d = pathlib.Path(bluesky_navdata.__file__).parent; \
dats = list(d.rglob('*.dat')); \
print(f'bluesky-navdata OK: {len(dats)} .dat files at {d}'); \
sys.exit('FATAL: bluesky-navdata has no .dat files' if not dats else 0)"
Notes / out of scope
- This is optional hardening — current builds already bundle the data correctly. The guard only protects against future builds silently regressing.
- Do not attempt to pre-bake the derived nav cache (
~/bluesky/cache/navdata.p): in deployments that mount a tmpfs over ~/bluesky it would be shadowed at runtime. The source .dat files in site-packages/bluesky_navdata/ are unaffected by such mounts.
- Verify the import/package name (
bluesky_navdata) against the installed package when implementing.
Acceptance criteria
Summary
Add a build-time assertion in
Dockerfile.integratedthat fails the build if BlueSky's navigation data did not get installed.Why
The integrated image installs BlueSky via
uv pip install ./WebATM-integrated, which pullsbluesky-simulator[headless]. BlueSky's nav data comes from thebluesky-navdatapackage (~32 MB wheel), which is a hard transitive dependency — so today it gets installed automatically and lives insite-packages/bluesky_navdata/. There is no runtime download path in the fork (loadnavdata.pyreads local.datfiles and builds a local pickle cache).The risk is a silent failure mode: if
bluesky-navdataever fails to resolve at build time (a transient PyPI issue, a future dependency/pin change, an accidental--no-deps), the build would still succeed and ship an image with no nav data. That only surfaces at runtime — and in deployments without egress (e.g. a sandboxed public demo on an internal/no-egress network) the container cannot fetch it and recover, so the simulation would come up with no waypoints/airports.A build-time guard converts that quiet, hard-to-debug runtime failure into an immediate, obvious build error.
Proposed change
Add after the
uv pip install ./WebATM-integratedstep inDockerfile.integrated:Notes / out of scope
~/bluesky/cache/navdata.p): in deployments that mount a tmpfs over~/blueskyit would be shadowed at runtime. The source.datfiles insite-packages/bluesky_navdata/are unaffected by such mounts.bluesky_navdata) against the installed package when implementing.Acceptance criteria
Dockerfile.integratedfails the build with a clear message if no nav-data.datfiles are present after the install step..datfile count/location.