Dynamic plugin not showing up in VizTypeControl
See original GitHub issueI am trying to load a plugin via url.
Expected results
Expect plugin to appear in the list of viz types.
Actual results
Plugin is not showing up in viz type list. I can see that a request is made to https://mysupersethost/dynamic-plugins/api/read
and response contains:
{
"count": 1,
"label_columns": {
"bundle_url": "Bundle URL",
"changed_by": "Changed By",
"changed_by_fk": "Changed By Fk",
"changed_on": "Changed On",
"created_by": "Created By",
"created_by_fk": "Created By Fk",
"created_on": "Created On",
"id": "Id",
"key": "Key",
"name": "Name"
},
"list_columns": [
"name",
"key",
"bundle_url",
"id"
],
"modelview_name": "DynamicPluginsView",
"order_columns": [
"name",
"key",
"bundle_url",
"id"
],
"page": null,
"page_size": null,
"pks": [
15
],
"result": [
{
"bundle_url": "url_from_which_plugin_is_served",
"id": 15,
"key": "superset-indicator-chart",
"name": "Indicator Chart"
}
]
}
However, the plugin chart does not appear in the modal. I believe this could be a recent regression because I remember being able to use this feature.
How to reproduce the bug
- Write your own plugin using https://github.com/apache-superset/dynamic-import-demo-plugin as template
- Run
npm install
andnpm run build
, thennpm run serve
to servedist
dir - Expose port via HTTP server
- Enable feature flag on Superset host, run
superset init
- Go to ‘Settings -> Plugins’ and create a plugin entry containing plugin url
- Go to ‘Chart -> Create New’ and verify that your plugin does not appear in the list of viz types
Environment
(please complete the following information):
- superset version: latest master as of now, latest commit 57035c1b93331b925e9bf91f757f365807ca70ab
- python version: 3.8.7
- node.js version: v14.16.0
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
I have verified that the plugin is working when imported directly in source and linked as here: https://superset.apache.org/docs/installation/building-custom-viz-plugins.
I also debugged and stepped over the piece of code importing the plugin (https://github.com/apache/superset/blob/9773aba522e957ed9423045ca153219638a85d2f/superset-frontend/src/components/DynamicPlugins/index.tsx#L150) and made sure there is no error upon importing.
I have also made sure that the name of the plugin in the package.json is the same as the one in Superset.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (7 by maintainers)
Top GitHub Comments
@suddjian hello, any updates on this issue?
Thank you so much for your debugging efforts @krsnik93! I think I understand the problem before even needing to repro 😁 I am actively working on this file so I should be able to address the problem quite soon.