tien238lnd opened a new pull request, #45176:
URL: https://github.com/apache/superset/pull/45176

   ### SUMMARY
   
   Since #37815 the Datasets list always loads its rows from `GET 
/api/v1/datasource/`, the combined endpoint that lists semantic views next to 
datasets, even when `SEMANTIC_LAYERS` is off. When the flag is off every row is 
a dataset, so the combined endpoint adds nothing, and it has been the source of 
several regressions on this page (#45174): filters that are not applied, and a 
read gate that differed from `/api/v1/dataset/`.
   
   This makes the page call `/api/v1/dataset/` when `SEMANTIC_LAYERS` is off, 
and the combined endpoint only when it is on. It is the same gate 
`DatabaseList` (`showSemanticLayers`) and `DatasetSelect` (`useSemanticLayers`) 
already use, and it is what 6.1.0 did for everyone.
   
   Request and response shapes are compatible: the page reads `kind`, `sql`, 
`rls_filters`, `editors`, `changed_by*` and the optional `source_type`, all of 
which `/api/v1/dataset/` returns.
   
   With the flag on nothing changes; the filters of that path are handled in 
#45175.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   No visual change. Network panel with `SEMANTIC_LAYERS` off: the list request 
goes to `/api/v1/dataset/?q=...` instead of `/api/v1/datasource/?q=...`, and 
the Editor, Modified by, Schema and Certified filters narrow the list.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npm run test -- src/pages/DatasetList
   ```
   
   Two new tests in `DatasetList.test.tsx` assert which endpoint the list uses 
with the flag off and on. The assertions in the other `DatasetList.*.test.tsx` 
files that counted calls to the combined endpoint now count calls to the 
dataset endpoint, since that is what the default (flag off) page calls.
   
   Manual: with `SEMANTIC_LAYERS` off, open the Datasets list and apply the 
Editor, Modified by and Schema filters.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: part of #45174
   - [x] Required feature flags: `SEMANTIC_LAYERS` (behavior with it on is 
unchanged)
   - [ ] 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
   
   ### Question for reviewers
   
   cc @betodealmeida (combined endpoint) and @mikebridge (reviewed #43887): is 
routing the page by the feature flag the intended direction, or is the combined 
endpoint meant to be the single list endpoint for this page even without 
semantic layers? If the latter, #45175 makes it filter correctly and this PR is 
not needed.
   
   🤖 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]

Reply via email to