rusackas commented on code in PR #37120:
URL: https://github.com/apache/superset/pull/37120#discussion_r3653909441
##########
superset/commands/dashboard/export.py:
##########
@@ -177,8 +177,12 @@ def _file_content(model: Dashboard) -> str:
@staticmethod
# ruff: noqa: C901
def _export(
- model: Dashboard, export_related: bool = True
+ model: Dashboard, export_related: bool = True, seen: set[str] | None =
None
) -> Iterator[tuple[str, Callable[[], str]]]:
+ # Initialize seen set if not provided
+ if seen is None:
+ seen = set()
Review Comment:
@/tmp/pr37120_replies/r0.txt
##########
superset/commands/dashboard/export.py:
##########
@@ -177,8 +177,12 @@ def _file_content(model: Dashboard) -> str:
@staticmethod
# ruff: noqa: C901
def _export(
- model: Dashboard, export_related: bool = True
+ model: Dashboard, export_related: bool = True, seen: set[str] | None =
None
) -> Iterator[tuple[str, Callable[[], str]]]:
+ # Initialize seen set if not provided
+ if seen is None:
+ seen = set()
Review Comment:
`seen` is typed as `set[str] | None` and nothing in this codebase ever
passes anything else in, so I don't think we need to coerce arbitrary iterables
here.
##########
superset/commands/dashboard/export.py:
##########
@@ -189,7 +193,8 @@ def _export(
dashboard_ids = model.id
command = ExportChartsCommand(chart_ids)
command.disable_tag_export()
- yield from command.run()
+ # Pass the shared seen set to the chart export command
+ yield from command.run(seen=seen)
command.enable_tag_export()
Review Comment:
Already fixed, this got wrapped in a try/finally so a failed chart export
doesn't leave tag export disabled for later requests.
--
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]