Repository navigation
fix(gtf): address GAQ→GTF interim-review findings - #43532
Conversation
- update_task(immediate=True) bypasses throttling; use it for the async totals cache-key publish so a dependent contribution query can read it - deduplicate contribution-totals normalization behind a shared helper and drop the unused contribution_queries/contribution_totals_idx state - document the remaining removed GLOBAL_ASYNC_QUERIES_* config keys and note the realtime websocket transport is opt-in/experimental in UPDATING.md - relocate the misplaced WEBSOCKET_K8S_OPERATOR_REQUIREMENTS.md out of the repo - add tests: guest subscriber key derivation, AsyncModeSection, update_task immediate-write throttle bypass
|
Bito Automatic Review Skipped - Branch Excluded |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## gaq-to-gtf #43532 +/- ##
==============================================
+ Coverage 78.97% 79.02% +0.04%
==============================================
Files 2885 2890 +5
Lines 165820 166435 +615
Branches 38342 38338 -4
==============================================
+ Hits 130956 131523 +567
- Misses 32390 32442 +52
+ Partials 2474 2470 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/review |
There was a problem hiding this comment.
Code Review Agent Run #8e41b5
Actionable Suggestions - 1
-
tests/unit_tests/tasks/test_guest.py - 1
- Incomplete scope-affecting claim coverage · Line 89-95
Review Details
-
Files reviewed - 10 · Commit Range:
986a092..c73c371- superset-core/src/superset_core/tasks/types.py
- superset-frontend/src/dashboard/components/PropertiesModal/sections/AsyncModeSection.test.tsx
- superset/common/query_context.py
- superset/common/query_context_processor.py
- superset/tasks/async_queries.py
- superset/tasks/context.py
- tests/unit_tests/common/test_query_serialization.py
- tests/unit_tests/tasks/test_async_queries.py
- tests/unit_tests/tasks/test_context.py
- tests/unit_tests/tasks/test_guest.py
-
Files skipped - 3
- UPDATING.md - Reason: Filter setting
- WEBSOCKET_K8S_OPERATOR_REQUIREMENTS.md - Reason: Filter setting
- docs/developer_docs/extensions/tasks.md - Reason: Filter setting
-
Tools
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers an incremental AI Review. -
/review full- Manually triggers a full AI Review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
| for claim, value in ( | ||
| ("rls_rules", [{"clause": "tenant_id = 2"}]), | ||
| ("resources", [{"type": "dashboard", "id": "xyz"}]), | ||
| ("datasets", [3]), | ||
| ("rev", 2), | ||
| ("exp", 3000), | ||
| ): |
There was a problem hiding this comment.
The test_scope_affecting_claims_change_the_key test covers only 5 of the 8 claims used in key derivation (lines 89-95). Three claims are omitted: aud, iat, and user. These claims are included in the message dict in superset/tasks/guest.py (lines 56-64) and could cause key collisions if they differ between tokens but aren't tested. Complete the coverage loop to include these claims.
Code Review Run #8e41b5
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
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_coreabstract +TaskContext) that bypasses progress-update throttling and writes synchronously. The async chart-data task now publishes its result cache key withimmediate=True, so a chained contribution query reading that key viaget_dependency_payloads()can't observe a throttle-buffered write. Today this publish is the task's onlyupdate_taskcall, so it was race-free by accident; this makes it race-free by contract before any future progress reporting is added.QueryContext._normalize_contribution_totalsandQueryContextProcessor._prepare_contribution_totalswere 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 singlenormalize_contribution_totals()helper. Removed the unusedcontribution_queries/contribution_totals_idxinstance state (only the returned tuple is ever consumed).GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT,…_REDIS_STREAM_LIMIT_FIREHOSE,…_REGISTER_REQUEST_HANDLERS) inUPDATING.md, and added a note that the realtime websocket transport is opt-in (WEBSOCKET_ENABLE=False) and experimental — polling remains the correctness path.WEBSOCKET_K8S_OPERATOR_REQUIREMENTS.mdout of the repo root.AsyncModeSectiondashboard control, and theupdate_taskimmediate-write throttle bypass.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
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.tsxADDITIONAL INFORMATION
GLOBAL_ASYNC_QUERIES(no new flags)immediatekwarg to the task-contextupdate_taskAPI)Targets the
gaq-to-gtfepic branch. Part of #43407.