mistercrunch commented on issue #33152:
URL: https://github.com/apache/superset/issues/33152#issuecomment-2902841708
Here's a bit of guesswork on qualifying the issue and blast radius, this is
important for us to understand whether this is a blocker for Preset migrating
to 5.0:
Some things related to this:
- The logic taking a chart configuration and transforming it into a
"dimensional query" (aka the `query_object`) lives on the frontend only. The
backend doesn't know how a chart definition computes into a query, that's all
in plugins/frontend code
- `query_object` was added to the chart model at some point to enable some
"Alert & Reports"-related feature
- The alerts & reports "force refresh" or "cache warmup" feature needs the
query_object to operate
- Some chart types that are backend-rendered (as opposed to
headless-browser-rendered), like the Table and Pivot Table, where the data is
fetched and put into an email as an html table (as opposed to a screenshot),
require having the query_object as well
- the may be other features that build upon the assumption that the
query_object exists on the backend (???)
- the `query_object` is schema-free JSON, not versioned nor schema-ed AFAIK
- while we have database migrations that migrate the form_data (chart
definition/settings), we don't have some that migrate the query_object
- older instances of Superset may have different structures or straight out
missing `query_object` field (?)
Some potential solutions:
- sandbox/execute the frontend code that provides the `query_context` from
`form_data` directly in the backend (?)
- write database migrations for query_context
- identify alerts and reports affected, and "disable" them upon migration,
have users reenable them manually on the frontend and regenerate the
query_context there based on frontend logic
- hack: for out-of-sync query_object, fire up a headless browser async task
to fix the broken charts prior to running the alerts and reports. Meaning if we
can identify broken query_objects, we could have alert and reports identify
them, and call an endpoint `/api/v1/frontend/regenerate_query_object`, wait for
a result, and then fire up the alerts and reports
- ???
--
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]