rusackas opened a new pull request, #41968:
URL: https://github.com/apache/superset/pull/41968
### SUMMARY
Test-only PR adding regression coverage for #29707, where the Row Level
Security rule form's dataset selector reportedly showed an **incomplete list
of datasets when filtering by a search mask** (typing "birth" returned an
empty/partial list even though `birth_names` and `birth_france_by_region`
both exist).
The RLS dataset selector is backed by the `GET
/api/v1/rowlevelsecurity/related/tables`
endpoint, whose search is applied by `FilterRelatedTables`
(`SqlaTable.table_name.ilike("%<mask>%")`). This PR pins that backend
behavior: it creates two datasets whose names both contain the mask,
searches for the mask, and asserts the endpoint returns **every** matching
dataset (and that `count` does not under-report them).
No product code is changed — this is a characterization/regression test to
localize the reported bug.
### How to interpret CI
- **Green (as observed locally):** the backend `related/tables`
search-by-mask
correctly returns all matching datasets and does not truncate them. That
means the incomplete-list behavior in #29707 does **not** originate in this
backend endpoint/filter, and the remaining suspect is the frontend
`AsyncSelect` in `RowLevelSecurityModal` (the reporter's own note — "scroll
the list to the bottom, then the search works" — is consistent with a
client-side option-caching/pagination issue rather than a server filter).
- **Red:** the endpoint would be dropping or truncating masked matches,
confirming the bug lives in the backend lookup and pointing a fix at
`FilterRelatedTables` / the related-field pagination.
This test currently passes on `master`.
### TESTING INSTRUCTIONS
```bash
pytest
tests/integration_tests/security/row_level_security_tests.py::TestRowLevelSecurityWithRelatedAPI::test_rls_tables_related_api_returns_all_masked_matches
-v
```
### ADDITIONAL INFORMATION
- [ ] Has associated issue: Closes #29707
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]