eschutho commented on PR #44312:
URL: https://github.com/apache/superset/pull/44312#issuecomment-5682928049

   @rebenitez1802 — assigning you as reviewer here for **continuity** on the 
Jinja template-error / raw-exception-leak bug-class you've carried end-to-end 
(#42366, #42401, and most recently #44172, also in 
`ExploreMixin`/`superset/models/helpers.py`).
   
   **What it is:** `ExploreMixin.get_rendered_sql` only caught 
`UndefinedError`/`TemplateError`/`SupersetSyntaxErrorException`, so a 
`TypeError` from `str.join()` on the `list[int]` that `filter_values()` returns 
(virtual-dataset SQL template joining a numeric-column filter) escaped as an 
unhandled 500 (Sentry `SUPERSET-PYTHON-16YX`, culprit `ChartDataRestApi.data`). 
The fix adds a narrowly-scoped `except TypeError` around the 
`template_processor.process_template(sql)` call, mapping it to the 
`QueryObjectValidationError` (400) its sibling exception types already get. 
+32/-0 across `superset/models/helpers.py` and a regression test.
   
   **Note given #44172:** the self-review empirically verified (live 
MRO/dispatch check under an initialized app) that the patched 
`ExploreMixin.get_rendered_sql` **is** the method actually dispatched on the 
real path (`SqlaTable` → `ExploreMixin`, no override) — i.e. this is not a 
repeat of the #44172 dead-code-guard trap where the guard sat on a class the 
runtime never hit. Worth confirming independently since you're the one who 
caught that last time.
   
   **Load flag:** you're carrying the highest active-review count on the roster 
right now — happy to **re-route** this to another roster reviewer if you'd 
rather not take it; just say the word.
   


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