aminghadersohi commented on code in PR #44096:
URL: https://github.com/apache/superset/pull/44096#discussion_r3980944387


##########
superset-frontend/src/dataMask/reducer.ts:
##########
@@ -138,8 +138,20 @@ function fillNativeFilters(
     //  (2) loaded has a value but no extraFormData and the default does — the
     //      "value present in UI but not applied to charts" gap-window case 
where
     //      a permalink was captured before FilterValue produced extraFormData.
+    // A select filter's explicit match-nothing predicate is a complete clear,
+    // not an incomplete permalink captured while the filter was initializing.
+    const isExplicitSelectClear =
+      filter.filterType === 'filter_select' &&
+      !loadedHasValue &&
+      loaded?.extraFormData?.adhoc_filters?.some(
+        predicate =>
+          predicate.expressionType === 'SQL' &&
+          predicate.clause === 'WHERE' &&
+          predicate.sqlExpression === '1 = 0',
+      );

Review Comment:
   Fixed in 93b4c81c9d: hydration checks Array.isArray before calling some and 
tolerates null/undefined entries. Eight malformed-input regression cases verify 
default restoration without exceptions.



##########
superset/mcp_service/dashboard/permalink.py:
##########
@@ -100,6 +107,31 @@ def get_dashboard_permalink(
     return (key, value) if value else None
 
 
+def build_dashboard_permalink_url(key: str) -> str:
+    """Return the absolute shared URL for a dashboard permalink key.
+
+    ``/dashboard/p/<key>/`` is the canonical route (``Superset.dashboard_
+    permalink``, mounted at the application root); the ``/superset``-prefixed
+    form is a legacy path that only redirects here.
+    """
+    return f"{get_superset_base_url()}/dashboard/p/{key}/"

Review Comment:
   Fixed in 93b4c81c9d: permalink construction uses the existing get_url_path 
helper for Superset.dashboard_permalink with user_friendly=True. This removes 
the MCP-specific localhost:9001 fallback, uses the configured public origin, 
and respects APPLICATION_ROOT / request SCRIPT_NAME. Five regression cases 
cover custom hosts, subdirectories, request and non-request contexts, and a 
proxy mount prefix; the configuration is documented.



##########
superset/realtime/publish.py:
##########
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""Neutral publisher for the shared realtime envelope protocol."""
+
+from typing import Any
+
+from flask import current_app, Flask
+
+
+def get_realtime_channel(app: Flask | None = None) -> str:
+    """Resolve the deployment channel once per app, including callable 
prefixes."""
+    app = app if app is not None else current_app
+    channel = app.extensions.get("realtime_channel")
+    if isinstance(channel, str):
+        return channel
+    prefix = app.config.get("REALTIME_CHANNEL_PREFIX", "")
+    channel = f"{prefix() if callable(prefix) else prefix}realtime"
+    app.extensions["realtime_channel"] = channel

Review Comment:
   Fixed in 93b4c81c9d: cache initialization is protected by a lock and 
rechecks the app cache inside it. A deterministic two-thread test forces 
simultaneous initial cache misses and verifies a single callable evaluation and 
identical channel names. The stable once-per-app contract remains intentional 
because the websocket consumer subscribes to one fixed deployment channel.



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