-
Notifications
You must be signed in to change notification settings - Fork 17.9k
feat(mcp): chart type plugin registry for extensible generate_chart #39922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d2bf221
feat(mcp): introduce chart type plugin registry for extensible chart …
aminghadersohi 45d5532
feat(mcp): add display_name and native_viz_types to chart type plugins
aminghadersohi bb96501
refactor(mcp): eliminate dead code and complete plugin registry dispatch
aminghadersohi 73928a8
refactor(mcp): complete plugin protocol — registry bootstrap, mypy fi…
aminghadersohi b2c70f7
fix(mcp): address reviewer comments — local import rationale, x-optio…
aminghadersohi 1521a67
refactor(mcp): move all local imports to top level in chart type plugins
aminghadersohi 5410a28
fix(mcp): resolve ruff E501 and formatting issues to pass pre-commit
aminghadersohi 64dfe81
fix(mcp): resolve E402 and E501 in dataset_validator.py
aminghadersohi a08d586
fix(mcp): add threading lock to registry plugin loader
aminghadersohi 29b15e9
fix(mcp): add full column validation to update_chart
aminghadersohi 7f17d96
refactor(mcp): address Codex review — fix registry bug, DRY schema hi…
aminghadersohi 8e8ec33
fix(mcp): fix E501 in update_chart.py and update_chart test mocks for…
aminghadersohi 0248e09
feat(mcp): add runtime chart plugin enable/disable via _PluginFilterC…
aminghadersohi 05934d8
fix(mcp): fix saved-metric name normalization across all chart plugins
aminghadersohi cd75287
fix(mcp): use (saved_metric, label) dedup key in XYChartConfig
aminghadersohi 68fe635
fix(mcp): address Bito review — log bare exception in schemas, remove…
aminghadersohi 94ab227
style: ruff-format auto-format fix
aminghadersohi f7817e8
perf(mcp): remove redundant DatasetValidator call in update_chart
aminghadersohi 2097b2e
fix(mcp): lock register() writes and add circuit breaker to _ensure_p…
aminghadersohi b34640c
style: fix E501 in test_registry docstring (93 > 88 chars)
aminghadersohi f60d2b0
fix(mcp): address fitzee review — sanitize temporal_column, narrow BL…
aminghadersohi 9af833b
fix(mcp): harden chart registry review fixes
aminghadersohi b663f90
fix(mcp): address bito review — pre_validate empty-list and chart_typ…
aminghadersohi 4f67e21
fix(mcp): address copilot + bito review comments
aminghadersohi 43fb904
fix(mcp): fix CI failures — sql_expression handling, cardinality guar…
aminghadersohi a756370
fix(mcp): extend pre_validate empty-list guard to xy, mixed_timeserie…
aminghadersohi 650a6af
fix(mcp): fix import sort order in app.py (ruff I001)
aminghadersohi 1ad3bef
fix(mcp): address self-review findings — comments, dedup, modern types
aminghadersohi 7f51b9e
fix(mcp): restore master's API-key auth factory lost in rebase conflict
aminghadersohi 742f09a
feat(mcp): warn on native_viz_types collision at plugin registration
aminghadersohi 4c03bb1
chore(mcp): restore out-of-scope files to master state
aminghadersohi 869291e
chore(mcp): drop spurious executable bits on three Python files
aminghadersohi 96a9e43
fix(mcp): keep fastmcp optional — configure chart registry only in mc…
aminghadersohi 975361b
fix(mcp): fix pre_validate aliases and sql_expression normalization
aminghadersohi 8620204
fix(mcp): guard sql_expression in table/handlebars normalization; use…
aminghadersohi cc132ec
fix(mcp): guard pie dimension saved_metric; recompute display name on…
aminghadersohi f43ed34
refactor(mcp): consolidate DatasetContext builder; expose resolver me…
aminghadersohi b4e1f5d
fix(mcp): fix test_get_chart_info module import shadowed by __init__.…
aminghadersohi eec4967
fix(mcp): correct method count in ChartTypePlugin docstring (eight → …
aminghadersohi 9e55ba0
fix(mcp): address reviewer action items from approval
aminghadersohi 2984a3a
test(mcp): add required label to sql_expression metric in normalizati…
aminghadersohi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: This unconditional top-level import makes MCP startup hard-fail if any chart plugin import raises, which bypasses the registry's built-in lazy-load/error-containment path and can take down unrelated MCP tools. Defer plugin bootstrap through the registry loader (or guard this import with controlled fallback) so a plugin import issue does not crash app initialization. [logic error]
Severity Level: Critical 🚨
Steps of Reproduction ✅
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This eager import is intentional — it runs the plugin-registration side effects that populate the chart type registry at startup, following the same pattern as every other tool module imported unconditionally in
app.py. The registry itself uses a circuit-breaker sentinel (_plugins_load_failed) to handle per-plugin import failures gracefully. If this import raises, it means the chart plugin package itself is broken, which is a real startup error that should surface rather than be swallowed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Customized review instruction saved!
Instruction:
Applied to:
superset/mcp_service/**💡 To manage or update this instruction, visit: CodeAnt AI Settings