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

   **TL;DR:** when a bulk delete of semantic views is refused, the message now 
names only the views that are actually blocked, and offers to delete the others 
in one more step. Previously one blocked view made the message name every 
selected view.
   
   > **Depends on #45545.** This branch is stacked on it, so the diff includes 
its commits until it merges. Only the last commits belong to this PR.
   
   ### SUMMARY
   
   Bulk deleting semantic views stays all-or-nothing: if any selected view has 
dependents, nothing is deleted. What changes is how the refusal is reported.
   
   - **API.** The bulk delete 409 adds `blocked_view_ids`, the selected views 
that have dependents. It is computed only when the delete is refused. Existing 
fields are unchanged.
   - **Dataset list.** The refusal names only the blocked views. When some 
selected views aren't blocked, a confirmation names the blocked ones and offers 
to delete the others. It still needs the typed DELETE, because semantic views 
are deleted permanently.
   - **Bulk dialog copy.** The dialog no longer says the remaining items move 
to Recently Archived when the selection is only semantic views.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: selecting `cash_flow`, `gl_balances` and the blocked 
`revenue_by_region` gave "Could not delete semantic views cash_flow, 
gl_balances, revenue_by_region". After: "No semantic views were deleted because 
other assets depend on revenue_by_region. Delete the other semantic views, 
cash_flow, gl_balances?" If datasets were selected too, a toast reports the 
ones that were archived.
   
   ### TESTING INSTRUCTIONS
   
   - `pytest tests/unit_tests/commands/semantic_layer/delete_test.py 
tests/unit_tests/semantic_layers/api_test.py`
   - `npm run test -- src/pages/DatasetList`
   - Manually, with `SEMANTIC_LAYERS` on: select two unused semantic views and 
one with a chart, then bulk delete. Only the blocked view is named, and 
confirming the follow-up deletes the other two.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `SEMANTIC_LAYERS`
   - [x] 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
   
   `blocked_view_ids` costs one dependency check per selected view, and only on 
the refusal path.
   


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