Repository navigation
fix(semantic): name the assets that block a semantic layer or view delete - #45642
Open
mikebridge wants to merge 22 commits into
Open
mikebridge wants to merge 22 commits into
mikebridge wants to merge 22 commits into
Conversation
…lete The deletion refusal already returns up to 20 visible dependents, but the dialogs showed counts only, and archived dependents were never named, even to admins, because visibility was computed over live rows only. Name archived charts and dashboards to the audience Recently Archived shows them to (admins and the asset's editors), flag each dependent as archived, and list the dependents in the layer and view delete dialogs with links for live assets, an "and N more" overflow, and an "ask an admin" hint when some dependents are hidden. Also replace "Semantic source" in the refusal, bold the view name and add the trash icon to the view dialog, and align "Recently Archived" capitalisation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retain both the semantic deletion guidance and upstream bulk-create messages in the translation catalog; no runtime conflict resolution.
Bypassing the soft-delete listener for charts and dashboards across the whole dependents statement also changed the live access filters: the dashboard filter's chart join started counting archived charts. Keep the live filters as they were and add archived rows through a separate audience read from the editor tables, which is the Recently Archived audience (admins see every archived row, others the rows they edit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An Admin-role guest token skipped straight to the admin branch of the archived audience, naming more than Recently Archived would show it. Fail closed for guests first, as the restore gate does, and pin that editorship names archived rows only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…names # Conflicts: # superset/translations/messages.pot
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Use /dashboard/<id>/ rather than a hard-coded /superset/ path, as the navigation invariant requires; ensureAppRoot applies the deployment root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45642 +/- ##
===========================================
+ Coverage 65.62% 84.71% +19.09%
===========================================
Files 3069 3070 +1
Lines 205661 205699 +38
Branches 48336 48349 +13
===========================================
+ Hits 134956 174268 +39312
+ Misses 67624 28139 -39485
- Partials 3081 3292 +211
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The blocker ids come from the error response, so a non-numeric id could steer the link off the app. Build links only from whole-number ids and keep names as plain text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…delete-dialog # Conflicts: # superset/translations/messages.pot
…-blocker-names # Conflicts: # superset/translations/messages.pot
mikebridge
marked this pull request as ready for review
October 23, 2026 23:35
Contributor
aminghadersohi
approved these changes
Oct 26, 2026
aminghadersohi
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Archived charts and dashboards now block the delete, are named only to users who can restore them, and the counts and API schema are consistent. CI green.
Preserve the restore-audience naming rule and its permission matrix while retaining upstream delete wording and regenerating the API and translation artifacts.
Preserve the master archive-message updates alongside blocker details. Local candidate only: owned DatasetList, archive documentation and translation files auto-merged and require independent review before publication.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: when deleting a semantic layer or view is refused because other assets depend on it, the dialog now names those assets, including archived ones, so you can find and fix them. You only see names you could already see elsewhere; anything else is shown as a count with a hint to ask an admin.
SUMMARY
The delete refusal (409) already returned up to 20 dependents, but the dialogs showed counts only. Archived dependents were never named, even to admins, because visibility was computed over live rows only.
archivedflag, and the rest are counted ininaccessible_countas before.The deletion policy itself is unchanged.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: "Deletion is blocked by 15 dependent assets (2 archived)", with no names. After: the same line plus a list of the blocking charts and dashboards, archived ones marked, live ones linked.
TESTING INSTRUCTIONS
pytest tests/unit_tests/commands/semantic_layer/delete_test.py tests/unit_tests/semantic_layers/api_test.pynpm run test -- src/pages/DatasetList src/pages/DatabaseListSEMANTIC_LAYERSandSOFT_DELETEon:ADDITIONAL INFORMATION
SEMANTIC_LAYERS(andSOFT_DELETEfor archived assets)The 409 gains one additive field per dependent (
archived); existing fields keep their meaning.