You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kgabryje (via GitHub)" <gi...@apache.org> on 2026/03/19 15:34:10 UTC
[PR] fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps [superset]
kgabryje opened a new pull request, #38746:
URL: https://github.com/apache/superset/pull/38746
### SUMMARY
Followup fixes from code review of #38740:
- **DRY extraction**: Extracted duplicated `wrap_single_group_by` validator body into shared `_normalize_group_by_input()` helper used by both `XYChartConfig` and `MixedTimeseriesChartConfig`
- **Template fix**: Updated `chart_configs.py` resource templates to use the new list format for `group_by` (`[{...}]` instead of `{...}`), so LLMs consuming the resource produce correct payloads
- **Missing alias**: Added `groupby_secondary` alias to `MixedTimeseriesChartConfig.group_by_secondary` (already had `groupby_b`, was missing the underscore variant)
- **Test gap**: Added test for bare string `group_by="region"` input path through `wrap_single_group_by`
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — backend schema changes only.
### TESTING INSTRUCTIONS
- `pytest tests/unit_tests/mcp_service/chart/test_chart_schemas.py tests/unit_tests/mcp_service/chart/test_new_chart_types.py tests/unit_tests/mcp_service/chart/validation/test_column_name_normalization.py`
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38746:
URL: https://github.com/apache/superset/pull/38746#issuecomment-4091024571
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps [superset]
Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje merged PR #38746:
URL: https://github.com/apache/superset/pull/38746
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #38746:
URL: https://github.com/apache/superset/pull/38746#issuecomment-4091060338
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/38746?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `10.00000%` with `9 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 54.41%. Comparing base ([`03de7e1`](https://app.codecov.io/gh/apache/superset/commit/03de7e1ec62964ae9ad2e9a67ef9c329f49f9e3d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1328a91`](https://app.codecov.io/gh/apache/superset/commit/1328a91b8c02d5ca3b6a5a40342b2b13df2d25c3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/38746?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [superset/mcp\_service/chart/schemas.py](https://app.codecov.io/gh/apache/superset/pull/38746?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fchart%2Fschemas.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvY2hhcnQvc2NoZW1hcy5weQ==) | 10.00% | [9 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/38746?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
:x: Your project check has failed because the head coverage (99.92%) is below the target coverage (100.00%). You can increase the head coverage or adjust the [target](https://docs.codecov.com/docs/commit-status#target) coverage.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #38746 +/- ##
===========================================
- Coverage 65.28% 54.41% -10.87%
===========================================
Files 1819 2532 +713
Lines 72700 129834 +57134
Branches 23239 30016 +6777
===========================================
+ Hits 47460 70652 +23192
- Misses 25240 58837 +33597
- Partials 0 345 +345
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/38746/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [presto](https://app.codecov.io/gh/apache/superset/pull/38746/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.59% <10.00%> (?)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/38746/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.59% <10.00%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/38746?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38746:
URL: https://github.com/apache/superset/pull/38746#issuecomment-4091033176
## **Sequence Diagram**
This PR aligns chart templates with the expected group by list format and centralizes group by normalization logic used by both XY and mixed timeseries schemas. It also expands secondary group by alias support so more payload variants are accepted consistently.
```mermaid
sequenceDiagram
participant User
participant MCPService
participant ChartTemplates
participant SchemaValidator
participant ChartConfigModel
User->>MCPService: Request chart configuration example
MCPService->>ChartTemplates: Load example template
ChartTemplates-->>MCPService: Return group by as list format
User->>MCPService: Submit chart config payload
MCPService->>SchemaValidator: Validate XY or Mixed config
SchemaValidator->>SchemaValidator: Normalize group by input and map secondary alias
SchemaValidator-->>MCPService: Return normalized config model
MCPService-->>User: Accept config for chart generation
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org