You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aminghadersohi (via GitHub)" <gi...@apache.org> on 2026/01/14 22:33:20 UTC
[PR] fix(mcp): Handle big_number charts and make semantic warnings non-blocking [superset]
aminghadersohi opened a new pull request, #37142:
URL: https://github.com/apache/superset/pull/37142
## Summary
Two fixes for MCP chart tools discovered during Claude Desktop testing:
1. **Big Number charts fallback query fix**: Charts of type `big_number` and `big_number_total` use `metric` (singular) in form_data, not `metrics` (plural). The fallback query construction in `get_chart_data` now handles this correctly, preventing "Empty query?" errors when retrieving data from these chart types.
2. **Semantic warnings now non-blocking**: Runtime semantic warnings (format compatibility, cardinality hints, chart type suggestions) were incorrectly blocking chart generation. These are now logged as informational messages but no longer fail validation. They are optimization hints, not hard errors.
## Test plan
- [ ] Test `get_chart_data` tool with a `big_number` chart that has no saved query_context
- [ ] Test `generate_chart` with table config using aggregates (previously blocked by semantic warnings)
- [ ] Verify semantic warnings are logged but chart generation succeeds
🤖 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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3757374162
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3752271291
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3755454768
<!-- Bito Reply -->
The PR adds support for big_number chart types, including BigNumberPeriodOverPeriod, by checking if viz_type starts with 'big_number' and using 'metric' (singular) from form_data instead of 'metrics' (plural), with no groupby columns.
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #37142:
URL: https://github.com/apache/superset/pull/37142#discussion_r2696198713
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -161,6 +161,24 @@ async def get_chart_data( # noqa: C901
or form_data.get("row_limit")
or current_app.config["ROW_LIMIT"]
)
+
+ # Handle different chart types that have different form_data structures
+ # Some charts use "metric" (singular), not "metrics" (plural):
+ # - big_number, big_number_total
+ # - pop_kpi (BigNumberPeriodOverPeriod)
+ # These charts also don't have groupby columns
+ viz_type = chart.viz_type or ""
+ single_metric_types = ("big_number", "pop_kpi")
+ if viz_type.startswith("big_number") or viz_type in single_metric_types:
+ # These chart types use "metric" (singular)
+ metric = form_data.get("metric")
+ metrics = [metric] if metric else []
+ groupby_columns: list[str] = [] # These charts don't group by
Review Comment:
**Suggestion:** Using the runtime-evaluated type annotation `list[str]` on `groupby_columns` can raise a TypeError on Python versions <3.9 because built-in generics were not subscriptable at runtime; replace with the typing-compatible `List[str]` which is already imported to ensure compatibility. [type error]
<details>
<summary><b>Severity Level:</b> Critical 🚨</summary>
```mdx
- ❌ get_chart_data crashes for big_number fallback charts.
- ⚠️ MCP data retrieval fails for older unsaved charts.
```
</details>
```suggestion
groupby_columns: List[str] = [] # These charts don't group by
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Run the MCP service with this PR code and Python 3.8 runtime.
2. Trigger get_chart_data() fallback branch by requesting a chart without saved
query_context:
call get_chart_data in superset/mcp_service/chart/tool/get_chart_data.py (function
get_chart_data) such that execution reaches the fallback branch (see lines ~146-176
in that file). The variable annotation on line 176 is executed in function scope.
3. Execution hits the branch for single-metric charts (viz_type starting with
"big_number")
and evaluates the variable annotation at line 176: "groupby_columns: list[str] = []".
4. On Python <3.9 this attempts to subscript built-in 'list' at runtime and raises
TypeError,
causing get_chart_data to raise and return an InternalError ChartError instead of data.
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/mcp_service/chart/tool/get_chart_data.py
**Line:** 176:176
**Comment:**
*Type Error: Using the runtime-evaluated type annotation `list[str]` on `groupby_columns` can raise a TypeError on Python versions <3.9 because built-in generics were not subscriptable at runtime; replace with the typing-compatible `List[str]` which is already imported to ensure compatibility.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
```
</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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #37142:
URL: https://github.com/apache/superset/pull/37142#discussion_r2696226301
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -161,6 +161,24 @@ async def get_chart_data( # noqa: C901
or form_data.get("row_limit")
or current_app.config["ROW_LIMIT"]
)
+
+ # Handle different chart types that have different form_data structures
+ # Some charts use "metric" (singular), not "metrics" (plural):
+ # - big_number, big_number_total
+ # - pop_kpi (BigNumberPeriodOverPeriod)
+ # These charts also don't have groupby columns
+ viz_type = chart.viz_type or ""
+ single_metric_types = ("big_number", "pop_kpi")
+ if viz_type.startswith("big_number") or viz_type in single_metric_types:
+ # These chart types use "metric" (singular)
+ metric = form_data.get("metric")
+ metrics = [metric] if metric else []
+ groupby_columns: list[str] = [] # These charts don't group by
Review Comment:
This suggestion is not applicable to this codebase. Superset requires **Python >= 3.10** (see `pyproject.toml`: `requires-python = ">=3.10"`), so `list[str]` is valid and is the preferred modern Python syntax.
The project's `mcp_service/CLAUDE.md` explicitly states to use Python 3.10+ style type hints:
> **CRITICAL**: Always use modern Python 3.10+ union syntax for type hints.
Using `List[str]` from typing would actually violate the project's coding standards.
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3752045555
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/37142?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 67.83%. Comparing base ([`76d897e`](https://app.codecov.io/gh/apache/superset/commit/76d897eaa2f9e137102bc194c2e3109c29d0348f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e4e0086`](https://app.codecov.io/gh/apache/superset/commit/e4e0086536f51fd09109ba9d3d5f8fd7251a89b5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 3354 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #37142 +/- ##
==========================================
+ Coverage 60.48% 67.83% +7.34%
==========================================
Files 1931 642 -1289
Lines 76236 48057 -28179
Branches 8568 5257 -3311
==========================================
- Hits 46114 32599 -13515
+ Misses 28017 14168 -13849
+ Partials 2105 1290 -815
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `42.86% <ø> (-6.30%)` | :arrow_down: |
| [javascript](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.94% <ø> (?)` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.43% <ø> (-7.37%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.80% <ø> (+4.30%)` | :arrow_up: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.66% <ø> (?)` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/37142/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+42.36%)` | :arrow_up: |
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/37142?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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3752004972
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #37142:
URL: https://github.com/apache/superset/pull/37142#discussion_r2694878065
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -161,6 +161,21 @@ async def get_chart_data( # noqa: C901
or form_data.get("row_limit")
or current_app.config["ROW_LIMIT"]
)
+
+ # Handle different chart types that have different form_data structures
+ # big_number charts use "metric" (singular), not "metrics" (plural)
+ # and don't have groupby columns
+ viz_type = chart.viz_type or ""
+ if viz_type.startswith("big_number"):
+ # big_number/big_number_total use "metric" (singular)
Review Comment:
What about [BigNumberPeriodOverPeriod](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/chart/types/VizType.ts#L24)?
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3752004760
CodeAnt AI is reviewing your PR.
---
### Thanks for using CodeAnt! 🎉
We're free for open-source projects. if you're enjoying it, help us grow by sharing.
[Share on X](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
[Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3752011754
CodeAnt AI finished reviewing your 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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #37142:
URL: https://github.com/apache/superset/pull/37142#discussion_r2696191891
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -161,6 +161,21 @@ async def get_chart_data( # noqa: C901
or form_data.get("row_limit")
or current_app.config["ROW_LIMIT"]
)
+
+ # Handle different chart types that have different form_data structures
+ # big_number charts use "metric" (singular), not "metrics" (plural)
+ # and don't have groupby columns
+ viz_type = chart.viz_type or ""
+ if viz_type.startswith("big_number"):
+ # big_number/big_number_total use "metric" (singular)
Review Comment:
Good catch! Added `pop_kpi` (BigNumberPeriodOverPeriod) to the single-metric chart types. The migration file `2024-03-01_10-47_be1b217cd8cd_big_number_kpi_single_metric.py` confirms it also uses singular `metric` in form_data. Fixed in commit b95b9c89d3.
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3757211212
CodeAnt AI Incremental review completed.
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3752014949
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | e4e0086536f51fd09109ba9d3d5f8fd7251a89b5 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/696819b0debe200008019ae6 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-37142--superset-docs-preview.netlify.app](https://deploy-preview-37142--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-37142--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #37142:
URL: https://github.com/apache/superset/pull/37142#discussion_r2696226301
##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -161,6 +161,24 @@ async def get_chart_data( # noqa: C901
or form_data.get("row_limit")
or current_app.config["ROW_LIMIT"]
)
+
+ # Handle different chart types that have different form_data structures
+ # Some charts use "metric" (singular), not "metrics" (plural):
+ # - big_number, big_number_total
+ # - pop_kpi (BigNumberPeriodOverPeriod)
+ # These charts also don't have groupby columns
+ viz_type = chart.viz_type or ""
+ single_metric_types = ("big_number", "pop_kpi")
+ if viz_type.startswith("big_number") or viz_type in single_metric_types:
+ # These chart types use "metric" (singular)
+ metric = form_data.get("metric")
+ metrics = [metric] if metric else []
+ groupby_columns: list[str] = [] # These charts don't group by
Review Comment:
This suggestion is not applicable to this codebase. Superset requires **Python >= 3.10** (see `pyproject.toml`: `requires-python = ">=3.10"`), so `list[str]` is valid and is the preferred modern Python syntax.
The project's `mcp_service/CLAUDE.md` explicitly states to use Python 3.10+ style type hints:
> **CRITICAL**: Always use modern Python 3.10+ union syntax for type hints.
Using `List[str]` from typing would actually violate the project's coding standards.
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #37142:
URL: https://github.com/apache/superset/pull/37142#issuecomment-3757199375
CodeAnt AI is running Incremental review
---
### Thanks for using CodeAnt! 🎉
We're free for open-source projects. if you're enjoying it, help us grow by sharing.
[Share on X](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
[Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
--
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): Handle big_number charts and make semantic warnings non-blocking [superset]
Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez merged PR #37142:
URL: https://github.com/apache/superset/pull/37142
--
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