sadpandajoe commented on code in PR #34880:
URL: https://github.com/apache/superset/pull/34880#discussion_r3600799020


##########
superset/commands/dashboard/importers/v1/__init__.py:
##########
@@ -67,6 +68,30 @@ class ImportDashboardsCommand(ImportModelsCommand):
     }
     import_error = DashboardImportError
 
+    def __init__(self, contents: dict[str, str], *args: Any, **kwargs: Any) -> 
None:
+        self.overwrite_all = kwargs.pop("overwrite_all", False)
+        super().__init__(contents, *args, **kwargs)
+
+    # not sure if overriding run is the best approach here
+    # it works fine and is better than a global variable imo
+    # open to suggestions
+    def run(self) -> None:

Review Comment:
   Without the outer transaction wrapper, nested tag imports can commit earlier 
assets before a later import failure, leaving a partially imported dashboard. 
Can we preserve the base command's transaction boundary on this override?



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