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

   ### SUMMARY
   
   Exclude the internal `sanitization_warnings` attribute from chart generation 
and dashboard generation, update, and duplication input schemas using 
Pydantic's `SkipJsonSchema`.
   
   Investigation against master confirmed all four models advertise the field. 
Runtime warning injection was not reproduced: existing before-validators 
discard caller-supplied warnings. Those validators, title 
sanitization/rejection safeguards, and genuine response warnings remain 
unchanged.
   
   Regression coverage checks `model_json_schema()`, type-adapter schemas, 
actual MCP tool discovery, caller-supplied JSON warnings, and genuine warnings 
in a tool response.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable; input schemas no longer advertise the internal warning 
attribute. Response warnings remain available.
   
   ### TESTING INSTRUCTIONS
   
   Run from the repository root:
   
   ```bash
   PYTHONPATH=$PWD/superset-core/src:$PWD pytest -q \
     tests/unit_tests/mcp_service/test_sanitization_warning_inputs.py \
     tests/unit_tests/mcp_service/chart/test_chart_schemas.py \
     tests/unit_tests/mcp_service/dashboard/test_dashboard_schemas.py \
     tests/unit_tests/mcp_service/dashboard/tool/test_duplicate_dashboard.py
   pre-commit run
   ```
   
   Results: 301 tests passed; all applicable pre-commit hooks passed, including 
mypy.
   
   Tests use local fixtures and mocked persistence; deployed instances were not 
tested.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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