Copilot commented on code in PR #45531:
URL: https://github.com/apache/superset/pull/45531#discussion_r4340005027
##########
superset/mcp_service/semantic_layer/tool/list_metrics.py:
##########
@@ -228,11 +229,16 @@ async def _collect_external_metrics(
compatible_dimensions=compat_dims,
)
)
- except Exception as exc: # noqa: BLE001
- # External registry may be empty in OSS — degrade gracefully
+ except AmbiguousDimensionError as exc:
await ctx.warning(
"Could not load metrics for view id=%s: %s" % (view.id,
str(exc))
)
+ except Exception: # noqa: BLE001
+ # External registry may be empty in OSS — degrade gracefully
+ logger.warning(
Review Comment:
This logs a full stack trace (`exc_info=True`) at WARNING for every failing
view. If provider outages/registry-missing are common, this can create noisy
logs and high-volume tracebacks. Consider narrowing the exception handling
(e.g., special-case the expected 'registry missing/empty' exception(s) and log
them at INFO/DEBUG without traceback), or rate-limit/log-once per request while
still keeping diagnostics available when truly unexpected exceptions occur.
##########
superset/translations/de/LC_MESSAGES/messages.po:
##########
@@ -18355,6 +18355,12 @@ msgstr "Wert kann nicht dekodiert werden"
msgid "Unable to encode value"
msgstr "Wert kann nicht kodiert werden"
+msgid "Unable to fetch semantic layer runtime schema."
+msgstr ""
+
+msgid "Unable to fetch semantic view structure."
+msgstr ""
Review Comment:
These new msgids are present in locale catalogs with an empty `msgstr` and
are not marked `fuzzy`. In GNU gettext, an empty `msgstr` is treated as a real
translation (empty string), which can yield blank user-visible messages for
those locales. Consider either (a) marking these entries as `#, fuzzy` so they
don’t compile as empty translations, or (b) providing a non-empty translation
(even temporarily copying the English msgid) until proper translations are
available. This applies across all updated `*/LC_MESSAGES/messages.po` files.
--
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]