villebro opened a new pull request, #43532:
URL: https://github.com/apache/superset/pull/43532

   ### SUMMARY
   
   Follow-up hardening for the GAQ→GTF epic (#43407), addressing findings from 
an interim review of the feature branch. No behavior change for existing 
deployments; the async path remains opt-in.
   
   - **`update_task(immediate=True)`** — new keyword-only flag on the task 
context (`superset_core` abstract + `TaskContext`) that bypasses 
progress-update throttling and writes synchronously. The async chart-data task 
now publishes its result cache key with `immediate=True`, so a chained 
contribution query reading that key via `get_dependency_payloads()` can't 
observe a throttle-buffered write. Today this publish is the task's only 
`update_task` call, so it was race-free by accident; this makes it race-free by 
contract before any future progress reporting is added.
   - **DRY contribution-totals normalization** — 
`QueryContext._normalize_contribution_totals` and 
`QueryContextProcessor._prepare_contribution_totals` were byte-for-byte 
duplicates that both had to be kept in sync (drift would diverge sync vs async 
totals cache keys). Both now call a single `normalize_contribution_totals()` 
helper. Removed the unused `contribution_queries` / `contribution_totals_idx` 
instance state (only the returned tuple is ever consumed).
   - **Docs** — documented the remaining removed config keys 
(`GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT`, `…_REDIS_STREAM_LIMIT_FIREHOSE`, 
`…_REGISTER_REQUEST_HANDLERS`) in `UPDATING.md`, and added a note that the 
realtime websocket transport is opt-in (`WEBSOCKET_ENABLE=False`) and 
experimental — polling remains the correctness path.
   - **Relocated** the misplaced, unlinked 
`WEBSOCKET_K8S_OPERATOR_REQUIREMENTS.md` out of the repo root.
   - **Tests** — added coverage for guest subscriber key derivation (the guest 
cross-tenant isolation boundary), the `AsyncModeSection` dashboard control, and 
the `update_task` immediate-write throttle bypass.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   pytest tests/unit_tests/tasks/test_guest.py 
tests/unit_tests/tasks/test_context.py \
     tests/unit_tests/tasks/test_async_queries.py \
     tests/unit_tests/common/test_query_context_processor.py \
     tests/unit_tests/common/test_query_serialization.py -q
   npm run test -- 
src/dashboard/components/PropertiesModal/sections/AsyncModeSection.test.tsx
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `GLOBAL_ASYNC_QUERIES` (no new flags)
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API (adds `immediate` kwarg to the 
task-context `update_task` API)
   - [ ] Removes existing feature or API
   
   Targets the `gaq-to-gtf` epic branch. Part of #43407.
   


-- 
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]

Reply via email to