sadpandajoe commented on code in PR #45554:
URL: https://github.com/apache/superset/pull/45554#discussion_r4405395077
##########
superset/semantic_layers/api.py:
##########
@@ -338,13 +345,12 @@ def structure(self, pk: int) -> Response:
]
except SupersetSecurityException as ex:
return self.response(403, message=ex.message,
errors=[ex.to_dict()])
- except Exception: # pylint: disable=broad-except
- logger.exception(
- "Error fetching structure for semantic view %d",
- pk,
- )
+ except Exception as ex: # pylint: disable=broad-except
+ log_provider_failure("Error fetching semantic view structure", ex)
Review Comment:
This call (and the two like it for the configuration-schema preview and the
runtime schema) now logs only a fixed message plus the exception type, where
the previous `logger.exception(...)` calls included the view `pk` / layer
identifiers. With several semantic layers configured, a provider failure now
reads `Error fetching semantic view structure
(requests.exceptions.ConnectionError)` with no view or layer id, and the DEBUG
traceback doesn't carry one either, so an operator can't tell which view
failed; `_log_discovery_fault` in `exceptions.py` already logs
`view_id`/`layer_uuid` without provider text. Could the integer `pk` / layer
uuid be passed to `log_provider_failure` and included in the message?
--
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]