villebro opened a new pull request, #43437: URL: https://github.com/apache/superset/pull/43437
### SUMMARY Step 8 of the [GAQ→GTF epic](https://github.com/apache/superset/pull/43407) (targets `gaq-to-gtf`): make the realtime WebSocket transport (`superset-websocket`) a **first-class part of the official image**, launchable via an alternate entrypoint — so operators no longer need a separately built image to run the realtime transport. - **`Dockerfile`**: new `superset-websocket` build stage (`node:24-trixie-slim`) that `npm ci`s, compiles the TypeScript server, and prunes to production deps. The `lean` image bundles the Node runtime (copied `node` binary + `libstdc++6`) plus the built server and its prod `node_modules`. Only the `lean` lineage references the stage, so `dev` builds are unaffected. - **`docker/entrypoints/run-websocket.sh`**: alternate entrypoint running the server from the bundled runtime, configured via env (`JWT_SECRET`/`JWT_COOKIE_NAME` must match the app's `WEBSOCKET_JWT_SECRET`/`WEBSOCKET_JWT_COOKIE_NAME`; Redis via `REDIS_*`). Launch with `docker run <official-image> /app/docker/entrypoints/run-websocket.sh`. - **`docker-compose-non-dev.yml`**: opt-in `superset-websocket` service behind a `websocket` compose profile (default `up` is unchanged), running the official image with the ws entrypoint against the compose Redis. - **`docker.yml`**: a smoke test on the `lean` build starts the bundled server and asserts `GET /health` — so the packaging is validated in the main image pipeline (runs on PRs, since `lean` is in the PR matrix). - **Docs**: `superset-websocket/README.md` + the `UPDATING.md` 7.0 entry document running it from the official image; dropped the stale "TODO: containerize" note. The standalone `superset-websocket/Dockerfile` and the existing `websocket` CI preset are left in place (dev / dedicated-image use); this PR adds the bundled-in-the-official-image path as the recommended distribution. **Image size note:** the `lean` image grows by the Node runtime + the server's prod deps (~40–60MB). This was an explicit decision to make the transport part of the official image rather than ship a separate one. ### TESTING INSTRUCTIONS - CI: the `lean` docker build runs a new smoke test — launches `run-websocket.sh` and polls `GET /health` (a ≥32-byte `JWT_SECRET` is passed; no Redis needed for `/health`). - Local: `docker build --target lean -t superset:ws .` then `docker run --rm -p 8080:8080 -e JWT_SECRET="$(openssl rand -base64 42)" superset:ws /app/docker/entrypoints/run-websocket.sh` and `curl localhost:8080/health` → `OK`. - Compose: `docker compose --profile websocket up superset-websocket`. - Verified locally: the ws server still `tsc`-builds; `docker-compose-non-dev.yml` passes `docker compose config`; pre-commit clean on all changed files. (The image build itself is validated by CI — no local Docker in the authoring env.) ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: `WEBSOCKET_ENABLED` (to use the transport) - [ ] Changes UI - [ ] Includes DB Migration - [x] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
