mikebridge commented on PR #43781:
URL: https://github.com/apache/superset/pull/43781#issuecomment-5536095585

   @aminghadersohi — both items addressed at head `e0dd7eb200`:
   
   **CI regression (`test_all_database_access`)**: your diagnosis was exact — 
`get_datasource_mock()`'s reassigned `__class__` doesn't stop 
`MagicMock.__getattr__`, so the duck-typed fallback bound 
`mock.semantic_layer.perm` as a SQL parameter. Took your suggestion nearly 
verbatim: `_semantic_layer_grant_allows` now `isinstance`-checks for 
`SemanticView` before any lookup (keeping the `getattr` only for the nullable 
`semantic_layer` relationship's `perm`), and the unit test you asked for pins 
that a non-`SemanticView` datasource — built exactly like the integration mock, 
`MagicMock` with `__class__ = SqlaTable` — returns False with `can_access` 
never called 
(`test_layer_fallback_never_consults_grants_for_non_semantic_datasource`). 
Verified locally on sqlite: at `27a1958d14` the standalone run reproduces your 
exact `Error binding parameter … MagicMock` failure; at this head no Mock-bind 
error remains (the residual standalone failures are a local `g.user`-None 
artifact shared b
 y three tests CI passes). CI on this head is the final arbiter for the 
postgres lane — same driver-level root cause.
   
   **UPDATING.md mixed-dashboard widening**: confirmed intended — it's the 
pre-existing at-least-one-member semantics applied uniformly across datasource 
types rather than only to table-backed members (and the chart-list follow-up 
#43848 keeps the surfaces aligned). Added your suggested clause to the entry, 
covering the semantic-view-or-parent-layer grant case.
   
   Left for follow-ups as you suggested: the `Slice.perm` rename desync is 
SC-119502 (your `semantic_view_before_update` propagation fix + A/B evidence 
are now linked there as the root cause), and the orphaned-PVM edge stays a 
later nit.
   


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