rusackas commented on code in PR #44553:
URL: https://github.com/apache/superset/pull/44553#discussion_r4080610330
##########
superset/utils/log.py:
##########
@@ -321,7 +408,10 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
with self.log_context(
action=action_str, object_ref=object_ref_str, **wrapper_kwargs
) as log:
- log(**kwargs)
+ # Resolve the object's id before the route runs so that delete
+ # and purge can still identify the row they are about to
remove.
+ view = args[0] if args else None
+ log(**kwargs, **get_object_ids_from_view_args(view, kwargs))
Review Comment:
It's a single indexed lookup scoped to slug/uuid routes on Dashboard and
Slice, not much next to the rest of what these handlers already do. Resolving
the id up front is the whole point of this PR, so I don't see a way to skip it.
--
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]