You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2026/09/03 20:44:44 UTC
[PR] feat: stable Global Async Queries and websocket support [superset-kubernetes-operator]
villebro opened a new pull request, #341:
URL: https://github.com/apache/superset-kubernetes-operator/pull/341
## Summary
This PR brings **first-class, stable support for Global Async Queries (GAQ) and the realtime websocket transport** to the operator, tracking Apache Superset's migration of GAQ onto the Global Task Framework and the promotion of the websocket server to GA ([apache/superset#43407](https://github.com/apache/superset/pull/43407)). It requires a Superset image that includes that work (**Superset 7.0+**).
A new top-level `spec.realtime` block centralizes the cross-component wiring that GAQ and the websocket transport need, so operators no longer have to hand-assemble feature flags, coordination config, a shared JWT secret, and a bespoke websocket image. The websocket server now ships in the official Superset image and is configured entirely by operator-injected environment variables, and a new `spec.baseUrl` centralizes the deployment's external URL so the operator can derive the websocket URL, its origin allowlist, and the Alerts & Reports link base from a single field.
## Details
### New API: `spec.realtime`
- `realtime.asyncQueries` — presence enables the `GLOBAL_ASYNC_QUERIES` feature flag (which auto-enables the Global Task Framework upstream). The operator also renders the `superset.tasks.async_queries` Celery import (the one module the Celery app does not auto-import) and a short `reap_orphaned_tasks` beat schedule (every 60s), so orphaned GTF tasks — those abandoned by a worker that died mid-execution — are recovered automatically. A Celery worker **and** beat are required for the reaper to run. GAQ tuning knobs (`GLOBAL_ASYNC_QUERIES_POLLING_*`, `*_MIN_CACHE_TTL`, `*_QUERY_TIMEOUT`, `GTF_ORPHAN_TASK_TIMEOUT`) remain available via `spec.config`.
- `realtime.webSocket` — turns on the push transport (`WEBSOCKET_ENABLE`). Fields: `jwtSecret` (dev-only) / `jwtSecretFrom` (the shared `WEBSOCKET_JWT_SECRET`), `url` (auto-derived when unset), `allowedOrigins`, `cookieName`, `jwtExpirationSeconds`.
- Both require `spec.valkey.distributedCoordination` (the Redis/Valkey coordination backend the operator already renders).
### Websocket server promoted to GA
The `websocketServer` component now inherits `spec.image` and runs from the official Superset image via the `/app/docker/entrypoints/run-websocket.sh` entrypoint — no separate/custom websocket image. It is configured entirely through operator-injected env vars (`JWT_SECRET`, `JWT_COOKIE_NAME`, `ALLOWED_ORIGINS`, and the coordination `REDIS_*` connection). Readiness now probes `/ready` (liveness stays `/health`). The previous `config.json` model (`websocketServer.config`/`configFrom`) and the custom-image CEL requirement are **removed** (the component was experimental).
### Centralized `spec.baseUrl` and security defaults
`spec.baseUrl` (external, browser-visible base URL) drives three things:
- the websocket `WEBSOCKET_URL` (falling back to `spec.networking` when unset);
- the websocket server's `ALLOWED_ORIGINS`, defaulting to that single origin to mitigate Cross-Site WebSocket Hijacking (empty `ALLOWED_ORIGINS` upstream skips the origin check entirely) — overridable via `realtime.webSocket.allowedOrigins`;
- `WEBDRIVER_BASEURL_USER_FRIENDLY`, so Alerts & Reports hyperlinks point at the real external host.
The internal `WEBDRIVER_BASEURL` (the in-cluster URL the headless browser renders against) is now **operator-managed** — it targets the web-server Service — and is no longer something users must configure.
### Validation, tests, docs
- CEL rules: `asyncQueries` ⇒ `valkey`; `webSocket` ⇔ `websocketServer` (+ `valkey`); inline `jwtSecret` dev-only + mutually exclusive with `jwtSecretFrom`; `webSocket` requires a URL source (`url`, `baseUrl`, or `networking`); `baseUrl` must be an `http(s)` URL.
- Unit + envtest coverage for config rendering, websocket env injection, URL/origin derivation, and the CEL matrix; regenerated CRDs, DeepCopy, Helm CRDs, and API reference.
- Docs updated (configuration, migration, security, architecture internals, index) and a release note added; the websocket server is no longer described as experimental.
> Draft: opened for early review while Superset 7.0 (apache/superset#43407) lands.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: stable Global Async Queries and websocket support [superset-kubernetes-operator]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #341:
URL: https://github.com/apache/superset-kubernetes-operator/pull/341#issuecomment-5531936537
## [Codecov](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `89.33333%` with `16 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 92.98%. Comparing base ([`7900f01`](https://app.codecov.io/gh/apache/superset-kubernetes-operator/commit/7900f01f7bf8cffa9f727fa5f42364bc1fbde92a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`9121d4d`](https://app.codecov.io/gh/apache/superset-kubernetes-operator/commit/9121d4d79b3c89a54a556ad885a22f69383751b6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [internal/controller/config\_builder.go](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?src=pr&el=tree&filepath=internal%2Fcontroller%2Fconfig_builder.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZXJuYWwvY29udHJvbGxlci9jb25maWdfYnVpbGRlci5nbw==) | 83.33% | [11 Missing :warning: ](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [internal/controller/networking.go](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?src=pr&el=tree&filepath=internal%2Fcontroller%2Fnetworking.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZXJuYWwvY29udHJvbGxlci9uZXR3b3JraW5nLmdv) | 89.79% | [5 Missing :warning: ](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/341?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org