You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2026/07/13 13:38:37 UTC
(superset) branch 6.2 updated (592d92e5825 -> a7dbbcb6a9d)
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a change to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
from 592d92e5825 feat(extensions): add Chat contribution type (SIP-214) (#41205)
new fb552055fb7 fix(chart-explore): allow Save (Overwrite) after editing chart properties (#41602)
new 7077ced9707 fix(chart): chart description not showing (#41453)
new 977bdd35502 chore(ci): update GHA actions to Node.js 24-compatible versions (#40477) (#41932)
new 55d2e54c8eb fix(jinja): drill-to-detail respects remove_filter=True in Jinja templates (#41934)
new ec0f2e6d148 fix(cross-filter): correctly cast adhoc column types when cross filtering (#41936)
new a7dbbcb6a9d fix: playwright-tests-experimental failures
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/actions/setup-docker/action.yml | 6 +-
.github/actions/setup-supersetbot/action.yml | 4 +-
.github/workflows/docker.yml | 6 +-
superset-frontend/playwright/helpers/navigation.ts | 57 +++++
.../playwright/pages/ChartCreationPage.ts | 3 +-
.../playwright/pages/ChartListPage.ts | 3 +-
.../playwright/pages/CreateDatasetPage.ts | 3 +-
.../playwright/pages/DashboardListPage.ts | 3 +-
.../playwright/pages/DashboardPage.ts | 5 +-
.../playwright/pages/DatasetListPage.ts | 3 +-
.../MessageToasts/ToastPresenter.test.tsx | 8 +
.../components/MessageToasts/ToastPresenter.tsx | 8 +
superset-frontend/src/dashboard/actions/hydrate.ts | 2 +-
.../src/explore/components/SaveModal.test.tsx | 8 +
.../src/explore/reducers/exploreReducer.test.ts | 48 ++++-
.../src/explore/reducers/exploreReducer.ts | 29 ++-
superset/connectors/sqla/models.py | 21 +-
superset/jinja_context.py | 37 ++++
superset/models/helpers.py | 16 +-
superset/models/sql_lab.py | 13 +-
tests/unit_tests/jinja_context_test.py | 95 +++++++++
tests/unit_tests/models/helpers_test.py | 233 ++++++++++++++++++++-
22 files changed, 568 insertions(+), 43 deletions(-)
create mode 100644 superset-frontend/playwright/helpers/navigation.ts
(superset) 04/06: fix(jinja): drill-to-detail respects remove_filter=True in Jinja templates (#41934)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 55d2e54c8eb85fc26a7d283e6183a002e81ae378
Author: Luiz Otavio <45...@users.noreply.github.com>
AuthorDate: Fri Jul 10 16:38:21 2026 -0300
fix(jinja): drill-to-detail respects remove_filter=True in Jinja templates (#41934)
Co-authored-by: Michael S. Molina <70...@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <no...@anthropic.com>
(cherry picked from commit c898341a82cf180612318a3108eda2248226f156)
---
superset/jinja_context.py | 37 +++++++++++++
tests/unit_tests/jinja_context_test.py | 95 ++++++++++++++++++++++++++++++++++
2 files changed, 132 insertions(+)
diff --git a/superset/jinja_context.py b/superset/jinja_context.py
index 15b8d0495a1..c0b26333f61 100644
--- a/superset/jinja_context.py
+++ b/superset/jinja_context.py
@@ -141,6 +141,7 @@ class ExtraCache:
database: Database | None = None,
dialect: Dialect | None = None,
table: SqlaTable | None = None,
+ query_context_filters: list[Any] | None = None,
):
self.extra_cache_keys = extra_cache_keys
self.applied_filters = applied_filters if applied_filters is not None else []
@@ -148,6 +149,7 @@ class ExtraCache:
self.database = database
self.dialect = dialect
self.table = table
+ self.query_context_filters: list[Any] = query_context_filters or []
def current_user_id(self, add_to_cache_keys: bool = True) -> int | None:
"""
@@ -444,6 +446,40 @@ class ExtraCache:
filters.append({"op": op, "col": column, "val": val})
+ # Drill-to-detail queries send filters in native {col, op, val} format
+ # rather than adhoc_filters, so get_form_data() above finds nothing.
+ # query_context_filters carries those native filters from
+ # template_kwargs["filter"], already available in the Jinja context.
+ # Only consult them when adhoc_filters produced no match to avoid
+ # duplicating entries for aggregated queries where both formats exist.
+ if not filters:
+ filters = self._get_filters_from_query_context(column, remove_filter)
+
+ return filters
+
+ def _get_filters_from_query_context(
+ self, column: str, remove_filter: bool
+ ) -> list[Filter]:
+ filters: list[Filter] = []
+ for flt in self.query_context_filters:
+ col = flt.get("col")
+ val = flt.get("val")
+ op = (flt.get("op") or FilterOperator.IN).upper()
+ if col != column or (
+ val is None
+ and op not in ("IS NULL", "IS NOT NULL", "IS_NULL", "IS_NOT_NULL")
+ ):
+ continue
+ if op in (
+ FilterOperator.IN,
+ FilterOperator.NOT_IN,
+ ) and not isinstance(val, list):
+ val = [val]
+ if remove_filter and column not in self.removed_filters:
+ self.removed_filters.append(column)
+ if column not in self.applied_filters:
+ self.applied_filters.append(column)
+ filters.append({"op": op, "col": column, "val": val})
return filters
# pylint: disable=too-many-arguments
@@ -808,6 +844,7 @@ class JinjaTemplateProcessor(BaseTemplateProcessor):
database=self._database,
dialect=self._database.get_dialect(),
table=self._table,
+ query_context_filters=self._context.get("filter") or [],
)
from_dttm = (
diff --git a/tests/unit_tests/jinja_context_test.py b/tests/unit_tests/jinja_context_test.py
index 9ba84315fac..cfdbc2090d0 100644
--- a/tests/unit_tests/jinja_context_test.py
+++ b/tests/unit_tests/jinja_context_test.py
@@ -259,6 +259,101 @@ def test_get_filters_remove_not_present() -> None:
assert cache.removed_filters == []
+def test_get_filters_query_context_filters() -> None:
+ """
+ Test that ``get_filters`` falls back to native query_context_filters when no
+ adhoc_filters are present — the drill-to-detail path sends filters in native
+ {col, op, val} format rather than adhoc_filters.
+ """
+ cache = ExtraCache(
+ query_context_filters=[{"col": "name", "op": "IN", "val": ["foo", "bar"]}]
+ )
+ assert cache.get_filters("name") == [
+ {"op": "IN", "col": "name", "val": ["foo", "bar"]}
+ ]
+ assert cache.applied_filters == ["name"]
+ assert cache.removed_filters == []
+
+
+def test_get_filters_query_context_filters_remove_filter() -> None:
+ """
+ Test that ``get_filters`` with ``remove_filter=True`` marks the column as removed
+ when matching via query_context_filters.
+ """
+ cache = ExtraCache(
+ query_context_filters=[{"col": "name", "op": "IN", "val": "foo"}]
+ )
+ assert cache.get_filters("name", remove_filter=True) == [
+ {"op": "IN", "col": "name", "val": ["foo"]}
+ ]
+ assert cache.removed_filters == ["name"]
+ assert cache.applied_filters == ["name"]
+
+
+def test_get_filters_query_context_filters_is_null() -> None:
+ """
+ Test that IS_NULL filters (which have no val) are returned correctly from
+ query_context_filters. Unary null operators legitimately have val=None.
+ """
+ cache = ExtraCache(query_context_filters=[{"col": "name", "op": "IS_NULL"}])
+ assert cache.get_filters("name") == [{"op": "IS_NULL", "col": "name", "val": None}]
+ assert cache.applied_filters == ["name"]
+ assert cache.removed_filters == []
+
+
+def test_get_filters_query_context_filters_is_not_null() -> None:
+ """
+ Test that IS_NOT_NULL filters (which have no val) are returned correctly from
+ query_context_filters. Unary null operators legitimately have val=None.
+ """
+ cache = ExtraCache(query_context_filters=[{"col": "name", "op": "IS_NOT_NULL"}])
+ assert cache.get_filters("name") == [
+ {"op": "IS_NOT_NULL", "col": "name", "val": None}
+ ]
+ assert cache.applied_filters == ["name"]
+ assert cache.removed_filters == []
+
+
+def test_get_filters_adhoc_filters_take_precedence_over_query_context_filters() -> None:
+ """
+ Test that adhoc_filters takes precedence over query_context_filters to avoid
+ duplicate filter entries for aggregated queries where both formats are present.
+ """
+ with current_app.test_request_context(
+ data={
+ "form_data": json.dumps(
+ {
+ "adhoc_filters": [
+ {
+ "clause": "WHERE",
+ "comparator": ["adhoc_val"],
+ "expressionType": "SIMPLE",
+ "operator": "in",
+ "subject": "name",
+ }
+ ],
+ }
+ )
+ }
+ ):
+ cache = ExtraCache(
+ query_context_filters=[{"col": "name", "op": "IN", "val": ["native_val"]}]
+ )
+ result = cache.get_filters("name")
+ assert result == [{"op": "IN", "col": "name", "val": ["adhoc_val"]}]
+
+
+def test_filter_values_query_context_filters() -> None:
+ """
+ Test that ``filter_values`` works via query_context_filters (drill-to-detail path).
+ """
+ cache = ExtraCache(
+ query_context_filters=[{"col": "name", "op": "IN", "val": ["foo", "bar"]}]
+ )
+ assert cache.filter_values("name") == ["foo", "bar"]
+ assert cache.applied_filters == ["name"]
+
+
def test_url_param_query() -> None:
"""
Test the ``url_param`` macro.
(superset) 05/06: fix(cross-filter): correctly cast adhoc column types when cross filtering (#41936)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit ec0f2e6d1488db128efeca6e9f789fdbbf212abb
Author: Luiz Otavio <45...@users.noreply.github.com>
AuthorDate: Fri Jul 10 16:54:33 2026 -0300
fix(cross-filter): correctly cast adhoc column types when cross filtering (#41936)
Co-authored-by: Claude Sonnet 4.6 <no...@anthropic.com>
(cherry picked from commit e0b1fe4ff4c1cde9d5709e04aa2c47e6651a1f4f)
---
superset/connectors/sqla/models.py | 21 ++-
superset/models/helpers.py | 16 ++-
superset/models/sql_lab.py | 13 +-
tests/unit_tests/models/helpers_test.py | 233 ++++++++++++++++++++++++++++++--
4 files changed, 263 insertions(+), 20 deletions(-)
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 050eee5e5a7..b012c8756ba 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -1598,7 +1598,7 @@ class SqlaTable(
col: AdhocColumn,
force_type_check: bool = False,
template_processor: BaseTemplateProcessor | None = None,
- ) -> ColumnElement:
+ ) -> tuple[ColumnElement, utils.GenericDataType | None]:
"""
Turn an adhoc column into a sqlalchemy column.
@@ -1607,8 +1607,13 @@ class SqlaTable(
This is needed to validate if a filter with an adhoc column
is applicable.
:param template_processor: template_processor instance
- :returns: The metric defined as a sqlalchemy column
- :rtype: sqlalchemy.sql.column
+ :returns: A tuple of (SQLAlchemy column, generic column type). The
+ generic type is populated when the column type is resolved
+ (either because the adhoc column matches a physical column, or
+ because ``force_type_check`` triggered a DB probe); otherwise
+ ``None``. Callers use it to coerce filter values to the correct
+ Python type (e.g. numeric casts for numeric adhoc expressions).
+ :rtype: tuple[sqlalchemy.sql.ColumnElement, Optional[GenericDataType]]
"""
label = utils.get_column_name(col)
sql_expression = col["sqlExpression"]
@@ -1617,6 +1622,7 @@ class SqlaTable(
is_dttm = False
pdf = None
is_column_reference = col.get("isColumnReference", False)
+ generic_type: utils.GenericDataType | None = None
# First, check if this is a column reference that exists in metadata
if col_in_metadata := self.get_column(sql_expression):
@@ -1626,6 +1632,7 @@ class SqlaTable(
)
is_dttm = col_in_metadata.is_temporal
pdf = col_in_metadata.python_date_format
+ generic_type = col_in_metadata.type_generic
else:
# Column doesn't exist in metadata or is not a reference - treat as ad-hoc
# expression Note: If isColumnReference=true but column not found, we still
@@ -1681,6 +1688,12 @@ class SqlaTable(
if not col_desc:
raise SupersetGenericDBErrorException("Column not found")
is_dttm = col_desc[0]["is_dttm"] # type: ignore
+ # ResultSet already resolves the generic type from the
+ # driver's cursor.description; reuse it so callers can
+ # coerce filter values correctly (e.g. numeric IN-lists
+ # stay unquoted for numeric adhoc expressions like
+ # CAST(... AS BIGINT)).
+ generic_type = col_desc[0].get("type_generic")
except SupersetGenericDBErrorException as ex:
raise ColumnNotFoundException(message=str(ex)) from ex
@@ -1690,7 +1703,7 @@ class SqlaTable(
pdf=pdf,
time_grain=time_grain,
)
- return self.make_sqla_column_compatible(sqla_column, label)
+ return self.make_sqla_column_compatible(sqla_column, label), generic_type
def _get_series_orderby(
self,
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 3364e589fd4..d0db5812776 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -2275,7 +2275,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
col: "AdhocColumn", # type: ignore # noqa: F821
force_type_check: bool = False,
template_processor: Optional[BaseTemplateProcessor] = None,
- ) -> ColumnElement:
+ ) -> tuple[ColumnElement, Optional[GenericDataType]]:
raise NotImplementedError()
def _get_top_groups(
@@ -2826,7 +2826,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
None,
)
if adhoc_col:
- col = self.adhoc_column_to_sqla(
+ col, _unused = self.adhoc_column_to_sqla(
col=adhoc_col,
template_processor=template_processor,
)
@@ -2877,7 +2877,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
outer = literal_column(f"({selected})")
outer = self.make_sqla_column_compatible(outer, selected)
else:
- outer = self.adhoc_column_to_sqla(
+ outer, _unused = self.adhoc_column_to_sqla(
col=selected,
template_processor=template_processor,
)
@@ -3005,6 +3005,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
op = utils.FilterOperator(flt["op"].upper())
col_obj: Optional["TableColumn"] = None
sqla_col: Optional[Column] = None
+ adhoc_generic_type: Optional[GenericDataType] = None
is_metric_filter = (
False # Track if this is a filter on a metric (needs HAVING clause)
)
@@ -3012,7 +3013,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
col_obj = dttm_col
elif is_adhoc_column(flt_col):
try:
- sqla_col = self.adhoc_column_to_sqla(
+ sqla_col, adhoc_generic_type = self.adhoc_column_to_sqla(
flt_col,
force_type_check=True,
template_processor=template_processor,
@@ -3088,6 +3089,13 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
if col_spec and not col_advanced_data_type:
target_generic_type = col_spec.generic_type
+ elif adhoc_generic_type is not None and not col_advanced_data_type:
+ # Adhoc columns have no TableColumn metadata; fall back to
+ # the generic type resolved by adhoc_column_to_sqla so
+ # filter values get coerced to match the SQL expression
+ # (e.g. numeric IN-lists stay unquoted when the expression
+ # casts to BIGINT).
+ target_generic_type = adhoc_generic_type
else:
target_generic_type = GenericDataType.STRING
eq = self.filter_values_handler(
diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py
index 382b272af42..447439a18b8 100644
--- a/superset/models/sql_lab.py
+++ b/superset/models/sql_lab.py
@@ -71,6 +71,7 @@ from superset.sqllab.limiting_factor import LimitingFactor
from superset.superset_typing import ExplorableData, QueryObjectDict
from superset.utils import json
from superset.utils.core import (
+ GenericDataType,
get_column_name,
LongText,
MediumText,
@@ -414,13 +415,15 @@ class Query(
col: "AdhocColumn", # type: ignore # noqa: F821
force_type_check: bool = False,
template_processor: Optional[BaseTemplateProcessor] = None,
- ) -> ColumnElement:
+ ) -> tuple[ColumnElement, Optional[GenericDataType]]:
"""
Turn an adhoc column into a sqlalchemy column.
:param col: Adhoc column definition
:param template_processor: template_processor instance
- :returns: The metric defined as a sqlalchemy column
- :rtype: sqlalchemy.sql.column
+ :returns: A tuple of (SQLAlchemy column, generic column type). The
+ generic type is resolved from query result column metadata when
+ the adhoc label matches a known column; otherwise ``None``.
+ :rtype: tuple[sqlalchemy.sql.ColumnElement, Optional[GenericDataType]]
"""
label = get_column_name(col)
expression = self._process_sql_expression(
@@ -431,7 +434,9 @@ class Query(
template_processor=template_processor,
)
sqla_column = literal_column(expression)
- return self.make_sqla_column_compatible(sqla_column, label)
+ col_meta = next((c for c in self.columns if c.column_name == label), None)
+ generic_type = col_meta.type_generic if col_meta else None
+ return self.make_sqla_column_compatible(sqla_column, label), generic_type
class SavedQuery(
diff --git a/tests/unit_tests/models/helpers_test.py b/tests/unit_tests/models/helpers_test.py
index c2a32416c2e..d9aac9f80d5 100644
--- a/tests/unit_tests/models/helpers_test.py
+++ b/tests/unit_tests/models/helpers_test.py
@@ -31,6 +31,7 @@ from sqlalchemy.pool import StaticPool
from sqlalchemy.sql.elements import ColumnElement
from superset.superset_typing import AdhocColumn
+from superset.utils.core import GenericDataType
if TYPE_CHECKING:
from superset.models.core import Database
@@ -1419,10 +1420,12 @@ def test_adhoc_column_to_sqla_with_column_reference(database: Database) -> None:
"isColumnReference": True,
}
- result = table.adhoc_column_to_sqla(col_with_spaces)
+ result, generic_type = table.adhoc_column_to_sqla(col_with_spaces)
# Should return a valid SQLAlchemy column
assert result is not None
+ # TEXT column should resolve to STRING generic type
+ assert generic_type == GenericDataType.STRING
result_str = str(result)
# The column name should be present (may or may not be quoted depending on dialect)
@@ -1470,9 +1473,11 @@ def test_adhoc_column_to_sqla_preserves_column_type_for_time_grain(
}
# Should not raise ColumnNotFoundException
- result = table.adhoc_column_to_sqla(date_col)
+ result, generic_type = table.adhoc_column_to_sqla(date_col)
assert result is not None
+ # DATE column maps to the TEMPORAL generic type
+ assert generic_type == GenericDataType.TEMPORAL
result_str = str(result)
# Verify the column name is present (may be quoted depending on dialect)
@@ -1513,7 +1518,7 @@ def test_adhoc_column_to_sqla_with_temporal_column_types(database: Database) ->
"columnType": "BASE_AXIS",
}
- result = table.adhoc_column_to_sqla(time_col)
+ result, _ = table.adhoc_column_to_sqla(time_col)
assert result is not None
result_str = str(result)
@@ -1611,7 +1616,7 @@ def test_adhoc_column_with_spaces_generates_quoted_sql(database: Database) -> No
"isColumnReference": True,
}
- result = table.adhoc_column_to_sqla(col_with_spaces)
+ result, _ = table.adhoc_column_to_sqla(col_with_spaces)
# Compile the column to SQL to see how it's rendered
with database.get_sqla_engine() as engine:
@@ -1632,7 +1637,7 @@ def test_adhoc_column_with_spaces_generates_quoted_sql(database: Database) -> No
"isColumnReference": True,
}
- result_numeric = table.adhoc_column_to_sqla(col_numeric)
+ result_numeric, _ = table.adhoc_column_to_sqla(col_numeric)
with database.get_sqla_engine() as engine:
sql_numeric = str(
@@ -1681,8 +1686,8 @@ def test_adhoc_column_with_spaces_in_full_query(database: Database) -> None:
}
# Get SQLAlchemy columns
- customer_sqla = table.adhoc_column_to_sqla(customer_col)
- order_sqla = table.adhoc_column_to_sqla(order_col)
+ customer_sqla, _ = table.adhoc_column_to_sqla(customer_col)
+ order_sqla, _ = table.adhoc_column_to_sqla(order_col)
# Build a full query
tbl = table.get_sqla_table()
@@ -1912,7 +1917,7 @@ def _run_probe(
),
patch.object(spec_cls, "type_probe_needs_row", type_probe_needs_row),
):
- result = table.adhoc_column_to_sqla(adhoc_col)
+ result, _ = table.adhoc_column_to_sqla(adhoc_col)
assert result is not None
assert len(captured) == 1, "Expected exactly one type-probe query"
@@ -2011,3 +2016,215 @@ def test_filter_by_verbose_name_resolves_to_column(
assert "WHERE" in sql, f"Expected WHERE clause, got SQL: {sql}"
assert "country_code" in sql, f"Expected filter on 'country_code', got SQL: {sql}"
assert "'US'" in sql, f"Expected filter value 'US', got SQL: {sql}"
+
+
+def _adhoc_col_with_probed_type(
+ database: Database,
+ probed_type: str,
+ probed_is_dttm: bool = False,
+) -> "GenericDataType | None":
+ """
+ Run adhoc_column_to_sqla against a mocked DB probe that returns
+ ``probed_type``, and return the resolved generic type.
+
+ Uses an expression (not a bare column name) so the metadata-lookup branch
+ is skipped and the probe branch runs.
+ """
+ from superset.connectors.sqla.models import SqlaTable, TableColumn
+
+ table = SqlaTable(
+ database=database,
+ schema=None,
+ table_name="t",
+ columns=[TableColumn(column_name="pending_duration_seconds", type="BIGINT")],
+ )
+ adhoc_col: AdhocColumn = {
+ "sqlExpression": "CAST(FLOOR(pending_duration_seconds / 86400) AS BIGINT)",
+ "label": "Pending Days",
+ }
+
+ def fake_get_columns_description(
+ db: object,
+ catalog: object,
+ schema: object,
+ sql: str,
+ ) -> list[dict[str, object]]:
+ """Return a single-column description mirroring SupersetResultSet output."""
+ # Mirror what SupersetResultSet.columns builds: it derives type_generic
+ # from the native type via db_engine_spec.get_column_spec().
+ spec = table.db_engine_spec.get_column_spec(native_type=probed_type)
+ type_generic = spec.generic_type if spec else None
+ return [
+ {
+ "column_name": "Pending Days",
+ "name": "Pending Days",
+ "type": probed_type,
+ "type_generic": type_generic,
+ "is_dttm": probed_is_dttm,
+ }
+ ]
+
+ with patch(
+ "superset.connectors.sqla.models.get_columns_description",
+ side_effect=fake_get_columns_description,
+ ):
+ _, generic_type = table.adhoc_column_to_sqla(
+ adhoc_col,
+ force_type_check=True,
+ )
+ return generic_type
+
+
+def test_adhoc_column_to_sqla_returns_numeric_type_from_probe(
+ database: Database,
+) -> None:
+ """
+ Regression: when the adhoc SQL expression casts to a numeric type,
+ adhoc_column_to_sqla must surface the NUMERIC generic type from the DB
+ probe so downstream filter-value coercion unquotes numeric values.
+ """
+ assert _adhoc_col_with_probed_type(database, "BIGINT") == GenericDataType.NUMERIC
+
+
+def test_adhoc_column_to_sqla_returns_string_type_from_probe(
+ database: Database,
+) -> None:
+ """String-typed adhoc expressions should report the STRING generic type."""
+ assert _adhoc_col_with_probed_type(database, "VARCHAR") == GenericDataType.STRING
+
+
+def test_adhoc_column_to_sqla_skips_probe_when_not_forced(
+ database: Database,
+) -> None:
+ """
+ Without ``force_type_check`` and no time grain, the probe is skipped and
+ the returned generic type is None (there's no cheap way to infer it).
+ """
+ from superset.connectors.sqla.models import SqlaTable, TableColumn
+
+ table = SqlaTable(
+ database=database,
+ schema=None,
+ table_name="t",
+ columns=[TableColumn(column_name="a", type="INTEGER")],
+ )
+ adhoc_col: AdhocColumn = {
+ "sqlExpression": "CAST(a AS BIGINT)",
+ "label": "a_bigint",
+ }
+
+ def _should_not_be_called(*_: object, **__: object) -> list[dict[str, object]]:
+ """Sentinel that fails if the DB probe is unexpectedly triggered."""
+ raise AssertionError("probe should not run without force_type_check")
+
+ with patch(
+ "superset.connectors.sqla.models.get_columns_description",
+ side_effect=_should_not_be_called,
+ ):
+ _, generic_type = table.adhoc_column_to_sqla(adhoc_col)
+
+ assert generic_type is None
+
+
+def test_adhoc_column_to_sqla_returns_type_from_column_metadata(
+ database: Database,
+) -> None:
+ """
+ When the adhoc ``sqlExpression`` resolves to a real column in the dataset,
+ the returned generic type comes from that column's ``type`` — not from a
+ DB probe.
+ """
+ from superset.connectors.sqla.models import SqlaTable, TableColumn
+
+ table = SqlaTable(
+ database=database,
+ schema=None,
+ table_name="t",
+ columns=[TableColumn(column_name="amount", type="BIGINT")],
+ )
+ adhoc_col: AdhocColumn = {
+ "sqlExpression": "amount",
+ "label": "amount",
+ "isColumnReference": True,
+ }
+
+ def _should_not_be_called(*_: object, **__: object) -> list[dict[str, object]]:
+ """Sentinel that fails if the DB probe runs despite metadata resolution."""
+ raise AssertionError(
+ "probe should not run when the column resolves from metadata"
+ )
+
+ with patch(
+ "superset.connectors.sqla.models.get_columns_description",
+ side_effect=_should_not_be_called,
+ ):
+ _, generic_type = table.adhoc_column_to_sqla(
+ adhoc_col,
+ force_type_check=True,
+ )
+
+ assert generic_type == GenericDataType.NUMERIC
+
+
+def test_numeric_adhoc_filter_value_is_unquoted_in_where_clause(
+ database: Database,
+) -> None:
+ """
+ End-to-end regression for the cross-filter bug: an IN-filter on an adhoc
+ numeric expression must render the value as an int (``IN (3)``) rather
+ than a string (``IN ('3')``).
+
+ Before the fix, filter value coercion defaulted to STRING for adhoc
+ columns because the filter path could not discover the column's type.
+ """
+ from superset.connectors.sqla.models import SqlaTable, TableColumn
+
+ table = SqlaTable(
+ database=database,
+ schema=None,
+ table_name="t",
+ columns=[TableColumn(column_name="pending_duration_seconds", type="BIGINT")],
+ )
+ adhoc_col: AdhocColumn = {
+ "sqlExpression": (
+ "CAST(FLOOR(pending_duration_seconds / (60 * 60 * 24)) AS BIGINT)"
+ ),
+ "label": "Pending Days",
+ }
+
+ def fake_get_columns_description(
+ *_: object, **__: object
+ ) -> list[dict[str, object]]:
+ """Return a BIGINT column description for the numeric adhoc expression."""
+ return [
+ {
+ "column_name": "Pending Days",
+ "name": "Pending Days",
+ "type": "BIGINT",
+ "type_generic": GenericDataType.NUMERIC,
+ "is_dttm": False,
+ }
+ ]
+
+ with patch(
+ "superset.connectors.sqla.models.get_columns_description",
+ side_effect=fake_get_columns_description,
+ ):
+ sqla_query = table.get_sqla_query(
+ columns=["pending_duration_seconds"],
+ filter=[{"col": adhoc_col, "op": "IN", "val": ["3"]}],
+ is_timeseries=False,
+ row_limit=10,
+ )
+
+ with database.get_sqla_engine() as engine:
+ sql = str(
+ sqla_query.sqla_query.compile(
+ dialect=engine.dialect,
+ compile_kwargs={"literal_binds": True},
+ )
+ )
+
+ # The numeric value should be emitted without quotes.
+ assert "IN (3)" in sql, f"Expected numeric IN-list, got SQL: {sql}"
+ assert "IN ('3')" not in sql, f"Value should not be quoted, got SQL: {sql}"
(superset) 03/06: chore(ci): update GHA actions to Node.js 24-compatible versions (#40477) (#41932)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 977bdd35502969e12a273e99c2b72edd21ec5282
Author: Luiz Otavio <45...@users.noreply.github.com>
AuthorDate: Fri Jul 10 10:39:20 2026 -0300
chore(ci): update GHA actions to Node.js 24-compatible versions (#40477) (#41932)
(cherry picked from commit b50d423fd06d37d56b9e908b3d0dfc0e68584bde)
---
.github/actions/setup-docker/action.yml | 6 +++---
.github/actions/setup-supersetbot/action.yml | 4 ++--
.github/workflows/docker.yml | 6 +++++-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/.github/actions/setup-docker/action.yml b/.github/actions/setup-docker/action.yml
index 91f2c8ce954..dd5f69936db 100644
--- a/.github/actions/setup-docker/action.yml
+++ b/.github/actions/setup-docker/action.yml
@@ -26,16 +26,16 @@ runs:
- name: Set up QEMU
if: ${{ inputs.build == 'true' }}
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
+ uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
- name: Set up Docker Buildx
if: ${{ inputs.build == 'true' }}
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
+ uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Try to login to DockerHub
if: ${{ inputs.login-to-dockerhub == 'true' }}
continue-on-error: true
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
+ uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
username: ${{ inputs.dockerhub-user }}
password: ${{ inputs.dockerhub-token }}
diff --git a/.github/actions/setup-supersetbot/action.yml b/.github/actions/setup-supersetbot/action.yml
index c557b9b7e83..9ae360bf930 100644
--- a/.github/actions/setup-supersetbot/action.yml
+++ b/.github/actions/setup-supersetbot/action.yml
@@ -10,7 +10,7 @@ runs:
steps:
- name: Setup Node Env
- uses: actions/setup-node@v4
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
@@ -21,7 +21,7 @@ runs:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
if: ${{ inputs.from-npm == 'false' }}
- uses: actions/checkout@v4
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: apache-superset/supersetbot
path: supersetbot
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index bce41c7fd03..4493fd7e667 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -89,7 +89,11 @@ jobs:
# in the context of push (using multi-platform build), we need to pull the image locally
- name: Docker pull
if: github.event_name == 'push' && (steps.check.outputs.python || steps.check.outputs.frontend || steps.check.outputs.docker)
- run: docker pull $IMAGE_TAG
+ run: |
+ for i in 1 2 3; do
+ docker pull $IMAGE_TAG && break
+ [ $i -lt 3 ] && sleep 30
+ done
- name: Print docker stats
if: steps.check.outputs.python || steps.check.outputs.frontend || steps.check.outputs.docker
(superset) 01/06: fix(chart-explore): allow Save (Overwrite) after editing chart properties (#41602)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit fb552055fb72a8cffd3a67013547800260d736d2
Author: Luiz Otavio <45...@users.noreply.github.com>
AuthorDate: Wed Jul 1 10:33:26 2026 -0300
fix(chart-explore): allow Save (Overwrite) after editing chart properties (#41602)
(cherry picked from commit 569cfc982571d07f39bb11a41c467acd08954818)
---
.../MessageToasts/ToastPresenter.test.tsx | 8 ++++
.../components/MessageToasts/ToastPresenter.tsx | 8 ++++
.../src/explore/components/SaveModal.test.tsx | 8 ++++
.../src/explore/reducers/exploreReducer.test.ts | 48 +++++++++++++++++++++-
.../src/explore/reducers/exploreReducer.ts | 29 +++++++++----
5 files changed, 92 insertions(+), 9 deletions(-)
diff --git a/superset-frontend/src/components/MessageToasts/ToastPresenter.test.tsx b/superset-frontend/src/components/MessageToasts/ToastPresenter.test.tsx
index 1a3e4894816..60813264394 100644
--- a/superset-frontend/src/components/MessageToasts/ToastPresenter.test.tsx
+++ b/superset-frontend/src/components/MessageToasts/ToastPresenter.test.tsx
@@ -47,3 +47,11 @@ test('should pass removeToast to the Toast component', async () => {
fireEvent.click(getAllByTestId('close-button')[0]);
await waitFor(() => expect(removeToast).toHaveBeenCalledTimes(1));
});
+
+test('presenter container does not capture pointer events over its empty area', () => {
+ const { container } = setup();
+ const presenter = container.querySelector('#toast-presenter');
+ // The container spans a tall fixed region; its empty area must let clicks
+ // pass through to underlying controls (e.g. the Explore Save button).
+ expect(presenter).toHaveStyle('pointer-events: none');
+});
diff --git a/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx b/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx
index de90f4a8f31..11af975d94a 100644
--- a/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx
+++ b/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx
@@ -39,6 +39,11 @@ const StyledToastPresenter = styled.div<VisualProps>(
height: calc(100vh - 100px);
+ /* The container spans a tall region on the right edge of the screen.
+ Let clicks pass through its empty area so it doesn't block underlying
+ controls (e.g. the Explore Save button); toasts re-enable pointer events. */
+ pointer-events: none;
+
display: flex;
flex-direction: ${position === 'bottom' ? 'column-reverse' : 'column'};
align-items: stretch;
@@ -107,6 +112,8 @@ const StyledToastPresenter = styled.div<VisualProps>(
transition:
transform ${theme.motionDurationMid},
opacity ${theme.motionDurationMid};
+ /* Off-screen/hidden toasts must not capture clicks; only visible ones do. */
+ pointer-events: none;
&:after {
content: '';
position: absolute;
@@ -125,6 +132,7 @@ const StyledToastPresenter = styled.div<VisualProps>(
.toast--visible {
opacity: 1;
transform: translateY(0);
+ pointer-events: auto;
}
`,
);
diff --git a/superset-frontend/src/explore/components/SaveModal.test.tsx b/superset-frontend/src/explore/components/SaveModal.test.tsx
index 1c79be556f5..e8d40e27dee 100644
--- a/superset-frontend/src/explore/components/SaveModal.test.tsx
+++ b/superset-frontend/src/explore/components/SaveModal.test.tsx
@@ -265,6 +265,14 @@ test('disables overwrite option for non-owner', () => {
expect(getByRole('radio', { name: 'Save (Overwrite)' })).toBeDisabled();
});
+test('enables and selects overwrite option for owner', () => {
+ // Owners is a normalized array of user IDs, matching the current user
+ const { getByRole } = setup();
+ const overwriteRadio = getByRole('radio', { name: 'Save (Overwrite)' });
+ expect(overwriteRadio).toBeEnabled();
+ expect(overwriteRadio).toBeChecked();
+});
+
test('updates slice name and selected dashboard', async () => {
const dashboardId = mockEvent.value;
const saveDataset = jest.fn().mockResolvedValue(undefined);
diff --git a/superset-frontend/src/explore/reducers/exploreReducer.test.ts b/superset-frontend/src/explore/reducers/exploreReducer.test.ts
index 9c87137d0ea..26b8007d935 100644
--- a/superset-frontend/src/explore/reducers/exploreReducer.test.ts
+++ b/superset-frontend/src/explore/reducers/exploreReducer.test.ts
@@ -18,7 +18,7 @@
*/
import exploreReducer, { ExploreState } from './exploreReducer';
-import { setStashFormData } from '../actions/exploreActions';
+import { setStashFormData, sliceUpdated } from '../actions/exploreActions';
import { QueryFormData } from '@superset-ui/core';
test('reset hiddenFormData on SET_STASH_FORM_DATA', () => {
@@ -52,3 +52,49 @@ test('skips updates when the field is already updated on SET_STASH_FORM_DATA', (
const newState = exploreReducer(initialState, restoreAction);
expect(newState).toBe(initialState);
});
+
+test('normalizes API owner objects to id array on SLICE_UPDATED', () => {
+ const initialState: ExploreState = {
+ form_data: {} as unknown as QueryFormData,
+ controls: {},
+ slice: { slice_id: 1, owners: [1] },
+ } as ExploreState;
+ // The chart API returns owners as objects: {id, first_name, last_name}
+ const action = sliceUpdated({
+ slice_id: 1,
+ slice_name: 'My chart',
+ owners: [{ id: 5, first_name: 'Superset', last_name: 'Admin' }],
+ } as never) as Parameters<typeof exploreReducer>[1];
+ const newState = exploreReducer(initialState, action);
+ expect(newState.slice?.owners).toEqual([5]);
+ expect(newState.metadata?.owners).toEqual(['Superset Admin']);
+});
+
+test('normalizes select control owners ({value, label}) on SLICE_UPDATED', () => {
+ const initialState: ExploreState = {
+ form_data: {} as unknown as QueryFormData,
+ controls: {},
+ slice: { slice_id: 1, owners: [1] },
+ } as ExploreState;
+ const action = sliceUpdated({
+ slice_id: 1,
+ owners: [{ value: 7, label: 'Jane Doe' }],
+ } as never) as Parameters<typeof exploreReducer>[1];
+ const newState = exploreReducer(initialState, action);
+ expect(newState.slice?.owners).toEqual([7]);
+ expect(newState.metadata?.owners).toEqual(['Jane Doe']);
+});
+
+test('keeps numeric owner ids on SLICE_UPDATED', () => {
+ const initialState: ExploreState = {
+ form_data: {} as unknown as QueryFormData,
+ controls: {},
+ slice: { slice_id: 1, owners: [1] },
+ } as ExploreState;
+ const action = sliceUpdated({
+ slice_id: 1,
+ owners: [3, 4],
+ } as never) as Parameters<typeof exploreReducer>[1];
+ const newState = exploreReducer(initialState, action);
+ expect(newState.slice?.owners).toEqual([3, 4]);
+});
diff --git a/superset-frontend/src/explore/reducers/exploreReducer.ts b/superset-frontend/src/explore/reducers/exploreReducer.ts
index 47b0bf9f01b..bd8a6719e5f 100644
--- a/superset-frontend/src/explore/reducers/exploreReducer.ts
+++ b/superset-frontend/src/explore/reducers/exploreReducer.ts
@@ -152,9 +152,13 @@ interface SetStashFormDataAction {
isHidden: boolean;
}
-// Owner can be either a number (user ID) or an object with value/label
-// This handles both Slice format (number[]) and select control format ({value, label}[])
-type OwnerItem = number | { value: number; label: string };
+// Owner can be a number (user ID), a select control option ({value, label}),
+// or an API entity object ({id, first_name, last_name}). This handles the Slice
+// format (number[]), select control format, and the raw chart API response format.
+type OwnerItem =
+ | number
+ | { value: number; label: string }
+ | { id: number; first_name?: string; last_name?: string };
interface SliceUpdatedAction {
type: typeof actions.SLICE_UPDATED;
@@ -601,11 +605,20 @@ export default function exploreReducer(
},
[actions.SLICE_UPDATED]() {
const typedAction = action as SliceUpdatedAction;
- // Handle owners that can be either number[] or Array<{value, label}>
- const getOwnerId = (owner: OwnerItem): number =>
- typeof owner === 'number' ? owner : owner.value;
- const getOwnerLabel = (owner: OwnerItem): string | null =>
- typeof owner === 'number' ? null : owner.label;
+ // Handle owners in number[], {value, label}[], or API {id, first_name, ...}[] form
+ const getOwnerId = (owner: OwnerItem): number => {
+ if (typeof owner === 'number') return owner;
+ return 'value' in owner ? owner.value : owner.id;
+ };
+ const getOwnerLabel = (owner: OwnerItem): string | null => {
+ if (typeof owner === 'number') return null;
+ if ('value' in owner) return owner.label;
+ const name = [owner.first_name, owner.last_name]
+ .filter(Boolean)
+ .join(' ')
+ .trim();
+ return name || null;
+ };
return {
...state,
slice: {
(superset) 06/06: fix: playwright-tests-experimental failures
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a7dbbcb6a9d9dfb13f58c88211f89c82925c1fef
Author: Michael S. Molina <mi...@gmail.com>
AuthorDate: Mon Jul 13 10:37:56 2026 -0300
fix: playwright-tests-experimental failures
---
superset-frontend/playwright/helpers/navigation.ts | 57 ++++++++++++++++++++++
.../playwright/pages/ChartCreationPage.ts | 3 +-
.../playwright/pages/ChartListPage.ts | 3 +-
.../playwright/pages/CreateDatasetPage.ts | 3 +-
.../playwright/pages/DashboardListPage.ts | 3 +-
.../playwright/pages/DashboardPage.ts | 5 +-
.../playwright/pages/DatasetListPage.ts | 3 +-
7 files changed, 70 insertions(+), 7 deletions(-)
diff --git a/superset-frontend/playwright/helpers/navigation.ts b/superset-frontend/playwright/helpers/navigation.ts
new file mode 100644
index 00000000000..0a1baf9eb3f
--- /dev/null
+++ b/superset-frontend/playwright/helpers/navigation.ts
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+import { Page, Response } from '@playwright/test';
+
+/**
+ * Werkzeug (Flask's dev server, used in CI) periodically drops connections
+ * during page navigation under concurrent load — surfacing as
+ * `ERR_EMPTY_RESPONSE`, `ERR_CONNECTION_RESET`, or a socket hang up. These
+ * are transport-layer failures, not application errors, so retrying the
+ * navigation is safe: the next request hits a fresh werkzeug worker thread.
+ *
+ * Application errors (4xx/5xx, JS exceptions during load) bubble up
+ * unchanged — the matcher is narrow on purpose.
+ */
+const TRANSIENT_NAV_ERROR =
+ /ERR_EMPTY_RESPONSE|ERR_CONNECTION_RESET|ERR_CONNECTION_CLOSED|socket hang up|ECONNRESET/i;
+const NAV_RETRY_ATTEMPTS = 3;
+const NAV_RETRY_BACKOFF_MS = 400;
+
+export async function gotoWithRetry(
+ page: Page,
+ url: string,
+ options?: Parameters<Page['goto']>[1],
+): Promise<Response | null> {
+ let lastError: unknown;
+ for (let attempt = 0; attempt < NAV_RETRY_ATTEMPTS; attempt += 1) {
+ try {
+ return await page.goto(url, options);
+ } catch (error) {
+ lastError = error;
+ if (!TRANSIENT_NAV_ERROR.test(String(error))) {
+ throw error;
+ }
+ await new Promise(resolve => {
+ setTimeout(resolve, NAV_RETRY_BACKOFF_MS * (attempt + 1));
+ });
+ }
+ }
+ throw lastError;
+}
diff --git a/superset-frontend/playwright/pages/ChartCreationPage.ts b/superset-frontend/playwright/pages/ChartCreationPage.ts
index 8dc38142938..ec7541b07d4 100644
--- a/superset-frontend/playwright/pages/ChartCreationPage.ts
+++ b/superset-frontend/playwright/pages/ChartCreationPage.ts
@@ -19,6 +19,7 @@
import { expect, Locator, Page } from '@playwright/test';
import { Button, Select } from '../components/core';
+import { gotoWithRetry } from '../helpers/navigation';
/**
* Chart Creation Page object for the "Create a new chart" wizard.
@@ -74,7 +75,7 @@ export class ChartCreationPage {
* Navigate to the chart creation page
*/
async goto(): Promise<void> {
- await this.page.goto('chart/add');
+ await gotoWithRetry(this.page, 'chart/add');
}
/**
diff --git a/superset-frontend/playwright/pages/ChartListPage.ts b/superset-frontend/playwright/pages/ChartListPage.ts
index 74f75181d24..d5a9ff3a86f 100644
--- a/superset-frontend/playwright/pages/ChartListPage.ts
+++ b/superset-frontend/playwright/pages/ChartListPage.ts
@@ -20,6 +20,7 @@
import { Page, Locator } from '@playwright/test';
import { Table } from '../components/core';
import { BulkSelect } from '../components/ListView';
+import { gotoWithRetry } from '../helpers/navigation';
import { URL } from '../utils/urls';
/**
@@ -52,7 +53,7 @@ export class ChartListPage {
* (ListviewsDefaultCardView feature flag may enable card view).
*/
async goto(): Promise<void> {
- await this.page.goto(`${URL.CHART_LIST}?viewMode=table`);
+ await gotoWithRetry(this.page, `${URL.CHART_LIST}?viewMode=table`);
}
/**
diff --git a/superset-frontend/playwright/pages/CreateDatasetPage.ts b/superset-frontend/playwright/pages/CreateDatasetPage.ts
index ff129c7364c..411212b2b7e 100644
--- a/superset-frontend/playwright/pages/CreateDatasetPage.ts
+++ b/superset-frontend/playwright/pages/CreateDatasetPage.ts
@@ -19,6 +19,7 @@
import { Page } from '@playwright/test';
import { Button, Select } from '../components/core';
+import { gotoWithRetry } from '../helpers/navigation';
/**
* Create Dataset Page object for the dataset creation wizard.
@@ -75,7 +76,7 @@ export class CreateDatasetPage {
* Navigate to the create dataset page
*/
async goto(): Promise<void> {
- await this.page.goto('dataset/add/');
+ await gotoWithRetry(this.page, 'dataset/add/');
}
/**
diff --git a/superset-frontend/playwright/pages/DashboardListPage.ts b/superset-frontend/playwright/pages/DashboardListPage.ts
index 8c8472f0224..d432dd29fdf 100644
--- a/superset-frontend/playwright/pages/DashboardListPage.ts
+++ b/superset-frontend/playwright/pages/DashboardListPage.ts
@@ -20,6 +20,7 @@
import { Page, Locator } from '@playwright/test';
import { Button, Table } from '../components/core';
import { BulkSelect } from '../components/ListView';
+import { gotoWithRetry } from '../helpers/navigation';
import { URL } from '../utils/urls';
/**
@@ -52,7 +53,7 @@ export class DashboardListPage {
* (ListviewsDefaultCardView feature flag may enable card view).
*/
async goto(): Promise<void> {
- await this.page.goto(`${URL.DASHBOARD_LIST}?viewMode=table`);
+ await gotoWithRetry(this.page, `${URL.DASHBOARD_LIST}?viewMode=table`);
}
/**
diff --git a/superset-frontend/playwright/pages/DashboardPage.ts b/superset-frontend/playwright/pages/DashboardPage.ts
index f94695ad4fd..a61ff3415c1 100644
--- a/superset-frontend/playwright/pages/DashboardPage.ts
+++ b/superset-frontend/playwright/pages/DashboardPage.ts
@@ -19,6 +19,7 @@
import { Page, Download } from '@playwright/test';
import { Menu } from '../components/core';
+import { gotoWithRetry } from '../helpers/navigation';
import { TIMEOUT } from '../utils/constants';
/**
@@ -43,7 +44,7 @@ export class DashboardPage {
* @param slug - The dashboard slug (e.g., 'world_health')
*/
async gotoBySlug(slug: string): Promise<void> {
- await this.page.goto(`superset/dashboard/${slug}/`);
+ await gotoWithRetry(this.page, `superset/dashboard/${slug}/`);
}
/**
@@ -51,7 +52,7 @@ export class DashboardPage {
* @param id - The dashboard ID
*/
async gotoById(id: number): Promise<void> {
- await this.page.goto(`superset/dashboard/${id}/`);
+ await gotoWithRetry(this.page, `superset/dashboard/${id}/`);
}
/**
diff --git a/superset-frontend/playwright/pages/DatasetListPage.ts b/superset-frontend/playwright/pages/DatasetListPage.ts
index 77e9a87db25..a184ca3d126 100644
--- a/superset-frontend/playwright/pages/DatasetListPage.ts
+++ b/superset-frontend/playwright/pages/DatasetListPage.ts
@@ -20,6 +20,7 @@
import { Page, Locator } from '@playwright/test';
import { Button, Table } from '../components/core';
import { BulkSelect } from '../components/ListView';
+import { gotoWithRetry } from '../helpers/navigation';
import { URL } from '../utils/urls';
/**
@@ -54,7 +55,7 @@ export class DatasetListPage {
* Navigate to the dataset list page
*/
async goto(): Promise<void> {
- await this.page.goto(URL.DATASET_LIST);
+ await gotoWithRetry(this.page, URL.DATASET_LIST);
}
/**
(superset) 02/06: fix(chart): chart description not showing (#41453)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 7077ced9707b633c0db8bebb2c74f8e2c50e94d6
Author: Luiz Otavio <45...@users.noreply.github.com>
AuthorDate: Fri Jun 26 16:38:30 2026 -0300
fix(chart): chart description not showing (#41453)
(cherry picked from commit 834ccf2613dd6bc9fca235c74ea0dd9b30628311)
(cherry picked from commit 10d3a16e267148ff62c42b21845b1e20dda5c950)
---
superset-frontend/src/dashboard/actions/hydrate.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/actions/hydrate.ts b/superset-frontend/src/dashboard/actions/hydrate.ts
index 4639589ec24..5c135d8b8cc 100644
--- a/superset-frontend/src/dashboard/actions/hydrate.ts
+++ b/superset-frontend/src/dashboard/actions/hydrate.ts
@@ -178,7 +178,7 @@ export const hydrateDashboard =
viz_type: slice.form_data.viz_type,
datasource: slice.form_data.datasource,
description: slice.description,
- description_markeddown: slice.description_markeddown,
+ description_markdown: slice.description_markeddown,
owners: slice.owners,
modified: slice.modified,
changed_on: new Date(slice.changed_on).getTime(),