aminghadersohi opened a new pull request, #40853:
URL: https://github.com/apache/superset/pull/40853

   ## Summary
   
   - `UpdateChartRequest` lacked a `dataset_id` field, so Pydantic silently 
dropped the parameter whenever the LLM passed it
   - `_build_update_payload` always fell back to `chart.datasource_id` and 
never included `datasource_id`/`datasource_type` in the `UpdateChartCommand` 
payload — the tool returned `success: true` while the chart stayed bound to its 
original dataset
   - Added `dataset_id: int | None` to `UpdateChartRequest` and plumbed it 
through `_build_update_payload`, `_build_preview_form_data`, 
`_validate_update_against_dataset`, and `_create_preview_url`
   - Also enables dataset-only updates (rebind without config or name change)
   
   ## Test plan
   
   - [ ] `TestBuildUpdatePayloadDatasetId` — 4 unit tests covering 
dataset-only, dataset+name, dataset+config, and config-without-dataset payloads
   - [ ] `TestBuildPreviewFormDataDatasetId` — 3 unit tests verifying the 
`datasource` field is set correctly in preview form_data
   - [ ] `TestUpdateChartDatasetIdIntegration` — async integration test 
verifying `UpdateChartCommand` receives `datasource_id` and `datasource_type` 
in payload


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