182 lines
9.9 KiB
Markdown
182 lines
9.9 KiB
Markdown
# Cesium upgrade and cache-preserving rollback
|
|
|
|
## Delivered on 16 November 2026
|
|
|
|
The canonical Mission Core service on `127.0.0.1:8000` now uses **CesiumJS
|
|
1.147.0**, supplied by Design Guideline `@nodedc/map-cesium-react` **0.1.2**.
|
|
The prior release was CesiumJS 1.143.0 / adapter 0.1.1. BIM client 0.2.47,
|
|
host 0.2.15 and Worker 0.2.12 did not require new distributions.
|
|
|
|
Latest stable was checked against the official
|
|
[release history](https://github.com/CesiumGS/cesium/releases),
|
|
[1.147 package](https://raw.githubusercontent.com/CesiumGS/cesium/1.147/package.json)
|
|
and [changelog](https://raw.githubusercontent.com/CesiumGS/cesium/1.147/CHANGES.md).
|
|
It was released on 2 November 2026. Pin the exact version; do not resolve a future
|
|
release implicitly when reproducing this delivery.
|
|
|
|
Only the shared client dependency, matching BFF version declaration, runtime
|
|
asset paths, tests and documentation changed. The NAS Gateway was **not deployed
|
|
or reconfigured**. Updating the DG catalog diagnostic in source does not establish
|
|
that the separately deployed Foundry application has upgraded.
|
|
|
|
## Preserve this boundary
|
|
|
|
```text
|
|
Mission Core / BIM map
|
|
-> /api/v1/map/runtime-config
|
|
-> /api/v1/map/gateway/ion/assets/{id}/endpoint
|
|
-> /api/v1/map/gateway/cache?url=...
|
|
-> existing Map Gateway on Synology
|
|
-> existing persistent TileCache / upstream on a real miss
|
|
```
|
|
|
|
At acceptance the Core internal Gateway URL was `http://127.0.0.1:18103`, an
|
|
existing SSH tunnel to DC_1221RP (`100.109.216.21:18103`). The operator identity,
|
|
asset allowlist (terrain 1, imagery 2, buildings 96188) and credential boundary
|
|
are unchanged. Credentials remain server-side.
|
|
|
|
Live cache host path:
|
|
`/volume1/docker/nodedc-platform/map-gateway/live-tile-cache`, mounted at
|
|
`/var/lib/nodedc-map-live-cache`. The sibling offline snapshot is read-only and
|
|
reported zero entries at this acceptance. The live cache reports persistence,
|
|
append-only/no-eviction writes and a 20 GiB quota. These are Gateway/runtime
|
|
observations and the existing deployment contract; root-level NAS filesystem
|
|
inventory was not available to the operator account.
|
|
|
|
The index remains v1. Objects retain their content-key paths. Credential-free
|
|
canonical URL hashing, sorted query parameters, Bing host normalization and
|
|
removal of client revision/cache-intent parameters remain Gateway responsibilities.
|
|
Do not inject a Cesium version into tile URLs, replace provider revisions, change
|
|
mounts, delete the index or switch to an empty cache to make an upgrade appear
|
|
healthy. A changed resource URL must first be compared with its previous
|
|
canonical identity. Fix the binding or roll back the client before considering
|
|
any separate data migration.
|
|
|
|
Client **code assets** now use `/cesium/1.147.0/{Workers,Assets,Widgets,ThirdParty}`.
|
|
This prevents a stale tab from mixing an old JS bundle with new workers. It is
|
|
independent of tile identities. During this transition, the existing unversioned
|
|
1.143 assets and previous hashed frontend chunks were retained in the live dist
|
|
without overwriting new files. Only one previous generation is retained; retire
|
|
it after old tabs have reloaded and the rollback retention decision is made.
|
|
|
|
## Pipeline used
|
|
|
|
1. Record clean committed source baselines and inspect unrelated work in the
|
|
shared checkouts. Do not reset another task's changes or create a second Core.
|
|
2. Record BFF runtime configuration, Gateway health/counts and representative
|
|
cached metadata/binary hashes before changing the client. Check available disk
|
|
and active imports before restarting the canonical Core process.
|
|
3. Pin the previous built interface with a hash manifest. Keep the previous lock
|
|
files and version declaration. No tile archive, NAS snapshot or new cache is
|
|
required for this client-only rollback.
|
|
4. Update the shared adapter dependency and version contract together; refresh
|
|
exact lock files. Core continues importing this adapter. Review upstream API,
|
|
Resource/proxy behavior and Camera changes; do not introduce a second viewer.
|
|
5. Build/test DG, Core frontend and Map BFF; publish the matched frontend and
|
|
server declaration on the existing service. Retain previous code assets for
|
|
already-open tabs. Never interrupt active uploads to run a smoke test.
|
|
6. Check Libre/Cesium switching, existing terrain/imagery/buildings, project focus,
|
|
restored camera and the browser console. Compare warmed resource bytes and
|
|
Gateway counters; an ordinary cache miss may append data but is not a reason
|
|
to rebuild the cache.
|
|
7. Actually restore the old interface and BFF declaration, restart the same Core,
|
|
verify 1.143 from HTTP and render the map. Then reapply the matched 1.147 pair,
|
|
restart and verify again. This rehearsal was completed successfully.
|
|
8. Preserve the bounded rollback archive and compact evidence; remove only the
|
|
task's extracted duplicate builds/npm scratch. Commit only owned paths and
|
|
record current delivery, limitations and rollback in Ops.
|
|
|
|
## Acceptance evidence
|
|
|
|
Evidence directory (local, not a second checkout):
|
|
`.runtime/cesium-upgrade-20261116/`.
|
|
|
|
- Initial Gateway cache: **72,624 entries / 1,694,493,925 bytes**.
|
|
- After normal missing-resource reads: **72,627 / 1,694,980,798 bytes**.
|
|
There was no reset or decrease. Further UI exploration can append more tiles.
|
|
- Six warmed resources before/after activation had identical SHA-256 values:
|
|
terrain `layer.json`, building `tileset.json`, child metadata, terrain binary,
|
|
building `.b3dm` and Bing imagery. The first four were already cached at the
|
|
initial probe; the last two were first warmed before client activation.
|
|
- During the controlled six-read comparison: egress **774 -> 774**, upstream
|
|
**774 -> 774**, misses **323 -> 323**, refreshes **0 -> 0**; hit +3 and stale-hit
|
|
+3. Responses were `live-cache-hit` / `live-cache-stale`.
|
|
- `cache-verification.json` retains exact public resource identities, hashes and
|
|
before/after counters. `rollback-runtime-verified.json` records the old runtime
|
|
declaration after the real rollback. The pinned manifest verifies old artifacts.
|
|
- Shared adapter: **12 tests**; Gateway/cache Resource contract: **2 tests**;
|
|
registry valid. Core frontend: **1,608 tests**, typecheck and production build;
|
|
focused Python Map checks passed. New tests exercise actual Cesium Resource
|
|
derived URLs, incompatible runtime rejection and Camera focus/persistence.
|
|
- UI rendered existing imagery, terrain and buildings. Libre/Cesium switching
|
|
and project focus were exercised. Both old and new runtime worker URLs returned
|
|
JavaScript successfully. A one-off too-close camera transition was observed;
|
|
controlled repeats on old and new versions both focused correctly. No proven
|
|
root cause or camera fix is claimed.
|
|
|
|
Limits: no NAS-wide Internet interruption, expired-Ion-endpoint/new-session
|
|
offline test or complete filesystem hash inventory was performed. Warm cached
|
|
reads without additional egress are established; uncached coverage still requires
|
|
the upstream. At final UI verification all current projects had `map_product_id`
|
|
unset, so project markers were checked; ready BIM mesh placement acceptance
|
|
remains the earlier dated qualification in `docs/BIM_MODULE.md`, not a fresh
|
|
1.147 mesh rendering claim. Do not mark the separately deployed Foundry upgraded.
|
|
|
|
## Rollback artifact and procedure
|
|
|
|
Pinned directory:
|
|
`.runtime/cesium-upgrade-20261116/rollback-1.143.0/`.
|
|
|
|
`control-station-dist.tar.gz` is **120,787,409 bytes** (about 121 MB), containing
|
|
the previous built `dist/`, with SHA-256:
|
|
|
|
```text
|
|
5eae647f1e326936428851f9ae2cff8e53b711d928d67018fbe69cffb32bf049
|
|
```
|
|
|
|
`manifest.json` contains hashes of the archive, old DG/Core locks, adapter
|
|
package and old `map_api.py`. This is a copy of client code, **not tile data**.
|
|
Keep it pinned until explicitly superseded by another qualified rollback.
|
|
|
|
Source baselines already published before the upgrade:
|
|
|
|
| Repository | Baseline |
|
|
| --- | --- |
|
|
| Mission Core | `a80e3a8ff53b6d351d05bd1381a2f8033de6a202` |
|
|
| Design Guideline | `f4e7369eeccc9745c30ddf6476810ddc1efd523d` |
|
|
| BIM Mod | `581666957ed3855906be34081f5ebdfe04307b1a` |
|
|
|
|
For an immediate runtime rollback:
|
|
|
|
1. Verify the archive hash against `manifest.json`; confirm there are no active
|
|
browser uploads before the managed Core restart. Record the current matched
|
|
version and retain its built dist temporarily for reapplication.
|
|
2. Extract the archive into a **new empty task scratch directory**, using safe
|
|
tar extraction. Rename the current `apps/control-station/dist` to a bounded
|
|
candidate path, then rename the extracted `dist` into that canonical location.
|
|
Do not overlay files from two bundles or touch `.runtime/mission-core` data.
|
|
3. Change only `CESIUM_RENDERER_VERSION` in `src/k1link/web/map_api.py` back to
|
|
`1.143.0`. Do not replace the entire source file if it has newer unrelated
|
|
changes. The built old frontend already contains the matched adapter.
|
|
4. Restart the existing managed service (operator Mac):
|
|
|
|
```sh
|
|
launchctl kickstart -k gui/$(id -u)/com.nodedc.mission-core.local
|
|
```
|
|
|
|
5. Verify `/api/v1/map/runtime-config` reports 1.143.0; reload the map and verify
|
|
known cached imagery/terrain/buildings through the unchanged Gateway. A stale
|
|
incompatible tab must reload, not bypass the version check.
|
|
6. To reapply, restore the saved 1.147 dist, set the BFF declaration to 1.147.0,
|
|
restart the same service and repeat HTTP/UI checks. Retire extracted duplicate
|
|
directories only after verifying the pinned rollback archive remains intact.
|
|
|
|
An archive rollback changes the served runtime only. Before a subsequent source
|
|
build, either reapply the matching source release or revert the **owned upgrade
|
|
commits** in DG/Core and reinstall their matching locks. Never reset the shared
|
|
checkouts wholesale. No rollback step modifies NAS cache mounts/index/objects,
|
|
provider metadata, project JSON, Worker sources or prepared BIM products.
|
|
|
|
Ops records: [MISSIONCOR-100](https://ops.nodedc.ru/nodedc/browse/MISSIONCOR-100)
|
|
and [DCPLATFORM-61](https://ops.nodedc.ru/nodedc/browse/DCPLATFORM-61).
|