Skip to content
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

RFC: Frontend Extensions #3207

Open
arikfr opened this issue Dec 19, 2018 · 3 comments
Open

RFC: Frontend Extensions #3207

arikfr opened this issue Dec 19, 2018 · 3 comments

Comments

@arikfr
Copy link
Member

arikfr commented Dec 19, 2018

(previous discussion: #2565)

There is an undocumented support for extensions in Redash, both for the backend (#2354, #2740) and frontend (#2799). For both of them we use Python packages Entry Point functionality to discover the extensions.

This works very well for backend extensions, but for frontend extensions it introduces several challenges:

  • The extension can't have its own dependencies.
  • The development workflow is a bit involved, because the extension code needs to be copied into the Redash code folder you need Python where you run the bundling process. Also in development, this means this part of the process needs to run in the container, while the webpack build process runs on the host (just explaining it is hard 😓).

We would like to define a new method for loading frontend extensions that will solve the above challenges.

Several directions and questions to address:

  • Frontend extensions to be installed and managed using frontend tools (i.e. npm instead of Python entry points).
  • How extensions will be used? Need to consider the fact that by default, we run npm run build when we build the image. How additional frontend code can be loaded into a container which "inherits" from our default one?
  • Developer workflow: ideally you should be able to work on your extension enjoying the same ergonomics (i.e. refresh on changes) you would when developing the main code.

Any comments, ideas and feedback are welcome.

@arikfr
Copy link
Member Author

arikfr commented Dec 23, 2018

Relevant work: Grafana's plugin model.

@arikfr
Copy link
Member Author

arikfr commented Feb 5, 2019

@jdbranham
Copy link

jdbranham commented Feb 14, 2021

Any work being done on this?
It would be great to add visualizations as a plugin - but I'm not sure where to start.

I have a current project that Redash can almost support, so I've ended up writing a separate reporting app to support the visualizations and query transformations I need.

I've worked on Grafana plugins and the plugin loading mechanism.
Also, 'borrowed' some of the code and adapted it for my own platform, after removing all Angular code [using all React (TS) now]
https://github.com/savantly-net/sprout-platform

Essentially the UI get's a list of plugins from the API, then loads the plugins' bundles at runtime.
This solves some of the build problems @arikfr mentions, and allows plugins to have their own dependencies.
Not sure if this is helpful for Redash, but maybe there's something useful there.

Note - I started with Grafana's CLI Toolkit but have started phasing it out for preference of RushJS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants