[#1] feat: add --cascade/--no-cascade flag to sync import-assets#375
Merged
richardfogaca merged 11 commits intomainfrom Feb 27, 2026
Merged
[#1] feat: add --cascade/--no-cascade flag to sync import-assets#375richardfogaca merged 11 commits intomainfrom
richardfogaca merged 11 commits intomainfrom
Conversation
Introduces a --cascade/--no-cascade option (default: --cascade) to the sync native import command. When --no-cascade is used, existing dependency assets (databases, datasets, charts) are not overwritten during import—only the primary assets being imported are updated. Also fixes clean_logs() to use unlink(missing_ok=True) so that a missing progress log file does not raise an error during cleanup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EnxDev
reviewed
Feb 25, 2026
EnxDev
reviewed
Feb 25, 2026
Contributor
EnxDev
left a comment
There was a problem hiding this comment.
Would it make sense to split the command.py file and extract the no-cascade logic into a dedicated module?
EnxDev
reviewed
Feb 25, 2026
geido
reviewed
Feb 26, 2026
EnxDev
approved these changes
Feb 27, 2026
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.
What Changed
Added
--cascade/--no-cascade(default:--cascade) topreset-cli superset import-assets/sync native.Behavior with
--no-cascade:--overwriteapplies only to the selected primary asset type--asset-type dashboard— updates the dashboard without overwriting existing dependent charts/datasets--asset-type chart— updates the chart without overwriting the existing dependent dataset/database--asset-type dataset— updates the dataset without overwriting the existing dependent database--asset-type database— updates the database onlydatabaseassets directlyAlso accepts
.zipbundle input in addition to directory input, with path-safety checks during extraction.Fixes
clean_logs()to useunlink(missing_ok=True)so a missing progress log does not raise during cleanup.Test plan
pytest tests/cli/superset/sync/native/command_test.py— 100 tests passpreset superset sync native --no-cascade <path>— confirm existing dependencies are left untouchedpreset superset sync native --cascade <path>(default) — confirm behavior is unchanged.zipbundle as input — confirm it is extracted and imported correctly