serenajiang opened a new pull request #16997: URL: https://github.com/apache/superset/pull/16997
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### 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 before `set_query`, so the `execution_context` does not have a `query` attribute if `_validate_access` throws 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 a `query` attribute since it's a dataclass? But I'm not sure what the intended behavior is, so input is welcome. @ofekisr @etr2460 -- 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]
