mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(mcp): replace uuid with url and changed_on_humanized in default list columns (#38566)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,8 @@ class TestListChartsRequestSchema:
|
||||
"""Test creating request with all defaults.
|
||||
|
||||
Note: select_columns defaults to empty list, which triggers
|
||||
minimal default columns (id, slice_name, viz_type, uuid) in the tool.
|
||||
minimal default columns (id, slice_name, viz_type, url,
|
||||
changed_on_humanized) in the tool.
|
||||
"""
|
||||
request = ListChartsRequest()
|
||||
|
||||
@@ -183,7 +184,13 @@ class TestChartDefaultColumnFiltering:
|
||||
from superset.mcp_service.common.schema_discovery import CHART_DEFAULT_COLUMNS
|
||||
|
||||
# Required minimal columns must be present
|
||||
required_columns = {"id", "slice_name", "viz_type", "uuid"}
|
||||
required_columns = {
|
||||
"id",
|
||||
"slice_name",
|
||||
"viz_type",
|
||||
"url",
|
||||
"changed_on_humanized",
|
||||
}
|
||||
assert required_columns.issubset(set(CHART_DEFAULT_COLUMNS))
|
||||
|
||||
# Heavy columns should NOT be in defaults
|
||||
@@ -191,6 +198,7 @@ class TestChartDefaultColumnFiltering:
|
||||
assert "query_context" not in CHART_DEFAULT_COLUMNS
|
||||
assert "description" not in CHART_DEFAULT_COLUMNS
|
||||
assert "datasource_name" not in CHART_DEFAULT_COLUMNS
|
||||
assert "uuid" not in CHART_DEFAULT_COLUMNS
|
||||
|
||||
def test_empty_select_columns_default(self):
|
||||
"""Test that select_columns defaults to empty list which triggers
|
||||
|
||||
Reference in New Issue
Block a user