aminghadersohi commented on PR #44681:
URL: https://github.com/apache/superset/pull/44681#issuecomment-5902923300

   ### Acceptance at b4cc6fd8288555a4fc4b7e621be13fa203ecbd76
   
   Tested with an in-process FastMCP client, real SQLite metadata/data 
databases, persisted users/roles, and RBAC enabled; no mocked authentication, 
authorization, DAOs, or tool results. Charts 1/2 stored `stale_events` but 
referenced dataset 1 (`live_events`); chart 3 referenced missing dataset 999; 
semantic chart 4 shared numeric datasource ID 1.
   
   Requests below show the exact inner `request` argument; outputs show 
relevant response fields.
   
   | Criterion | Verdict and evidence |
   |---|---|
   | Live chart name and dataset ID, including rename/repoint | **PASS** — 
`get_chart_info({"identifier":1,"select_columns":["id","datasource_id","datasource_name"]})`
 → `{"id":1,"datasource_id":1,"datasource_name":"live_events"}`; identical 
request after dataset rename → `renamed_events`; after repoint → ID 2 / 
`replacement_events`. `get_chart_sql({"identifier":1})` → name `live_events`, 
SQL `SELECT value AS value \nFROM live_events GROUP BY value\n LIMIT 10 OFFSET 
0;`. |
   | Dashboard responses agree with live datasets | **PASS** — 
`get_dashboard_datasets({"identifier":1})` → dataset 1 / `live_events`. 
`update_dashboard({"identifier":1,"dashboard_title":"Updated acceptance"})`, 
`add_chart_to_existing_dashboard({"dashboard_id":1,"chart_id":2})`, and 
`remove_chart_from_dashboard({"dashboard_id":1,"chart_id":2})` all returned 
`error:null`, with every retained chart reporting dataset 1 / `live_events`. |
   | Semantic views, missing datasets, compatibility | **PASS** — 
`get_chart_info({"identifier":4,"select_columns":["id","datasource_id","datasource_name","datasource_type"]})`
 → ID 1 / `Live semantic` / `semantic_view`. 
`get_dashboard_info({"identifier":2})` returned semantic name `Live semantic` 
and orphan name `null`. Both `get_chart_info({"identifier":3})` and 
`get_chart_sql({"identifier":3})` → `DatasetNotAccessible`. Unit coverage also 
passes stored-name fallback for row-like/query-backed objects. |
   | List fields, filtering, bounded loading | **PASS** — 
`list_charts({"select_columns":["id","datasource_id","datasource_name","params"],"order_column":"id","order_direction":"asc"})`
 → live table/semantic names, orphan name `null`, 
`columns_loaded:["id","datasource_id","datasource_name"]`; no `params` or 
internal relationships. 
`list_charts({"select_columns":["id"],"filters":[{"col":"datasource_name","opr":"eq","value":"live_events"}],"order_column":"id","page_size":1})`
 → `charts:[{"id":1}],total_count:2`. Filtering `stale_events` returned zero. 
Regression tests verify two SELECTs for both one and three charts, and exclude 
computation dependencies. |
   | Metadata privacy and caller without dataset access | **PASS** — a 
dataset-granted reader without metadata permission, using the chart-info 
request above, received both datasource fields `null`; 
`list_charts({"select_columns":["id","datasource_id","datasource_name"]})` 
exposed only IDs and `columns_loaded:["id"]`; 
`get_dashboard_info({"identifier":1})` redacted both fields. A separate caller 
granted tool read/drill/SQL permissions but **no dataset/database access** 
received `not_found` from `get_chart_info({"identifier":1})`, `NotFound` from 
`get_chart_sql({"identifier":1})`, an empty chart list, and `not_found` from 
`get_dashboard_datasets({"identifier":1})`. |
   | Standalone permalink dataset ID | **PASS** — 
`get_chart_info({"permalink_key":"B7QzLXK43jl","select_columns":["datasource_id","datasource_name"]})`
 → `{"datasource_id":1,"datasource_name":"live_events"}`. |
   | Original production chart confirmation | **DEFERRED** — no production 
deployment access exercised; the stale-name mechanism was reproduced locally, 
not verified against production chart 115. |
   
   Validation: `pytest 
tests/unit_tests/mcp_service/chart/test_live_chart_datasource.py -q`: **42 
passed**; chart + dashboard directories: **2,846 passed, 3 skipped**; `pytest 
tests/unit_tests/mcp_service -q`: **5,717 passed, 3 skipped**. All **23** 
recorded FastMCP request/response checks passed. Branch-file pre-commit passed, 
including mypy, ruff, and pylint. No fix or push needed. Temporary SQLite 
environment removed; no containers/volumes created.
   


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