sadpandajoe commented on code in PR #43499:
URL: https://github.com/apache/superset/pull/43499#discussion_r4255081876
##########
tests/unit_tests/commands/chart/update_test.py:
##########
@@ -409,19 +409,18 @@ def
test_update_chart_query_context_without_datasource_is_allowed(
).validate()
[email protected]("datasource_type", ["saved_query", "query", "bogus"])
[email protected]("datasource_type", ["query", "bogus"])
Review Comment:
Dropping `saved_query` from this rejection list leaves no test on the update
path: nothing now exercises `UpdateChartCommand` for a `saved_query` chart,
whether repointing `datasource_id` or changing only `datasource_type`. The new
`test_access_checks.py` cases only build `CreateChartCommand`, so a regression
in the update-side lookup ID (`effective_id`), the `datasource_name`
population, or the `raise_for_access` denial would pass unnoticed. Could you
add an `update_test.py` case with a real `SavedQuery` asserting the lookup uses
the effective ID, `datasource_name` is set from the query, and
`ChartForbiddenError` is raised when access is denied?
--
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]