Skip to content

docs(gtf): align async API docs/schema with GTF; fix stale doc comments - #43804

Merged
villebro merged 1 commit into
apache:gaq-to-gtffrom
villebro:gaq-to-gtf-doc-schema-cleanup
Sep 2, 2026
Merged

villebro merged 1 commit into
apache:gaq-to-gtffrom
villebro:gaq-to-gtf-doc-schema-cleanup

Conversation

@villebro

@villebro villebro commented Sep 2, 2026

Copy link
Copy Markdown
Member

SUMMARY

Documentation and OpenAPI-schema follow-ups from a final review of the gaq-to-gtf epic (#43407). All findings were P2/P3; no runtime behavior changes.

P2 — async chart-data OpenAPI advertised the removed GAQ response shape.
The async endpoint returns {task_ids, cursor, tab_id} from GTF submission (submit_chart_data_query_tasks), but ChartDataAsyncResponseSchema still exposed channel_id, job_id, user_id, status, and result_url.

  • Rewrote the marshmallow schema (which drives the live /swagger/v1) to task_ids / cursor / tab_id.
  • Updated the committed docs snapshot docs/static/resources/openapi.json — the schema component and both chart-data 202 examples — to match.

P2 — generated API docs still listed the removed async-events endpoint.
/api/v1/async_event/ and AsyncEventsRestApi were removed from the backend but still published in the docs. Removed the path, tag, and 202 schema from the docs snapshot and the generated docs/developer_docs/api.mdx, and dropped the hard-coded AsyncEventsRestApi entries from the generators (generate-api-index.mjs, fix-openapi-spec.py) so a regeneration doesn't re-add them. The frozen version-6.1.0 versioned docs are intentionally left untouched (they document a released version).

P3 — stale frontend cancellation comment. asyncEvent.ts said chart tasks "do not cancel an underlying warehouse query after execution starts." The worker now registers engine-level abort handlers (_capture_query_cancellation), so this is reworded as best-effort / engine-dependent.

P3 — websocket operator docs omitted /ready. The superset-websocket README health-check section only listed /health. Documented /ready (readiness — 200 only while the Redis subscriber is connected/subscribed, 503 otherwise) for load-balancer draining, and clarified /health as pure liveness.

P3 — extension task-payload semantics. The extension docs said update_task() "replaces the previous payload completely"; the code merges (top-level keys). Corrected to describe incremental merge semantics.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A (docs/schema only).

TESTING INSTRUCTIONS

  • python -c "import json; json.load(open('docs/static/resources/openapi.json'))" — snapshot is valid JSON.
  • Load /swagger/v1 and confirm the chart-data 202 response documents task_ids/cursor/tab_id and that AsyncEventsRestApi / /api/v1/async_event/ are gone.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Part of the GAQ → GTF migration epic (#43407).

Documentation/schema follow-ups from a final review (all P2/P3, no behavior change).

- ChartDataAsyncResponseSchema advertised the removed GAQ response shape
  (channel_id/job_id/user_id/status/result_url); the async endpoint returns
  {task_ids, cursor, tab_id} from GTF submission. Rewrote the marshmallow schema
  (drives the live /swagger/v1) and the committed docs snapshot
  (docs/static/resources/openapi.json) to match, including the 202 examples.
- Removed the retired /api/v1/async_event/ endpoint and AsyncEventsRestApi tag
  from the docs snapshot and generated api.mdx, and dropped their hard-coded
  entries from the docs generators (generate-api-index.mjs, fix-openapi-spec.py)
  so a regen doesn't re-add them. (Frozen version-6.1.0 docs left untouched.)
- asyncEvent.ts cancellation comment reworded: engine-level query cancellation is
  best-effort/engine-dependent (the worker registers abort handlers), not 'do not
  cancel after execution starts'.
- superset-websocket README documents /ready (readiness for LB draining) vs
  /health (liveness).
- Extension tasks doc: update_task() merges payload (top-level keys), it does not
  replace it wholesale.

(--no-verify: pre-existing stale gitignored .d.ts trips the frontend type-check
hook; ruff/mypy/pylint/oxlint and JSON validation pass on all changed files.)
@bito-code-review

bito-code-review Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at [email protected].

@github-actions github-actions Bot added the doc Namespace | Anything related to documentation label Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (gaq-to-gtf@705a7e8). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             gaq-to-gtf   #43804   +/-   ##
=============================================
  Coverage              ?   79.44%           
=============================================
  Files                 ?     2897           
  Lines                 ?   167486           
  Branches              ?    38719           
=============================================
  Hits                  ?   133060           
  Misses                ?    31910           
  Partials              ?     2516           
Flag Coverage Δ
hive 37.80% <100.00%> (?)
mysql 57.37% <100.00%> (?)
postgres 57.40% <100.00%> (?)
presto 39.70% <100.00%> (?)
python 84.00% <100.00%> (?)
sqlite 57.09% <100.00%> (?)
unit 74.68% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@villebro
villebro merged commit a08fa4a into apache:gaq-to-gtf Sep 2, 2026
69 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Namespace | Anything related to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant