This is an automated email from the ASF dual-hosted git repository. aminghadersohi pushed a commit to branch aminghadersohi/fix/mcp-info-tools-select-columns in repository https://gitbox.apache.org/repos/asf/superset.git
commit fd921b4425236c14a1ac700d51be11ebd43b9d81 Author: Amin Ghadersohi <[email protected]> AuthorDate: Thu May 28 01:03:48 2026 +0000 fix(mcp): fix unit test failures after select_columns defaults - Add permalink_key and filter_state to DEFAULT_GET_DASHBOARD_INFO_COLUMNS so permalink tests can assert on those fields - Update test assertion: form_data excluded from default select_columns, so assert absence rather than assert None --- superset/mcp_service/dashboard/schemas.py | 2 ++ tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/superset/mcp_service/dashboard/schemas.py b/superset/mcp_service/dashboard/schemas.py index 41becbb0813..0a3b17176ba 100644 --- a/superset/mcp_service/dashboard/schemas.py +++ b/superset/mcp_service/dashboard/schemas.py @@ -310,6 +310,8 @@ DEFAULT_GET_DASHBOARD_INFO_COLUMNS: List[str] = [ "native_filters", "cross_filters_enabled", "is_permalink_state", + "permalink_key", + "filter_state", ] diff --git a/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py b/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py index 7459ab46bb0..5e001e41392 100644 --- a/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py +++ b/tests/unit_tests/mcp_service/chart/tool/test_get_chart_info.py @@ -365,7 +365,8 @@ class TestGetChartInfoPrivacy: assert result["datasource_name"] is None assert result["datasource_type"] is None assert result["filters"] is None - assert result["form_data"] is None + # form_data is excluded from default select_columns, so it won't be in result + assert "form_data" not in result def test_form_data_override_does_not_double_sanitize(self) -> None: """Saved chart fields stay single-wrapped after unsaved overrides."""
