-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sqllab): SqlJsonExecutionContext.query null pointer #16997
fix(sqllab): SqlJsonExecutionContext.query null pointer #16997
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16997 +/- ##
==========================================
- Coverage 76.93% 76.85% -0.08%
==========================================
Files 1030 1030
Lines 55029 55029
Branches 7465 7465
==========================================
- Hits 42338 42294 -44
- Misses 12437 12481 +44
Partials 254 254
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ehh, i think this is fine. It's only for getting query details anyway
maybe we should also add unit test for that cover that usecase in SqlJsonExecutionContext so future would be stronger |
🏷 v1.4 |
(cherry picked from commit cde4cdc)
SUMMARY
Users saw this error when their sqllab queries failed due to access errors:
'SqlJsonExecutionContext' object has no attribute 'query'
The issue is that
_validate_access
is run beforeset_query
, so theexecution_context
does not have aquery
attribute during_validate_access
, which may throw an exception that uses query details to generate an error message. This was likely a regression caused by #16852.I am not very satisfied with this fix -
SqlJsonExecutionContext
should probably always have aquery
attribute since it's a dataclass? But I'm not sure what the intended behavior is, so input is welcome.@ofekisr @etr2460