-
Notifications
You must be signed in to change notification settings - Fork 14k
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
[SIP-58] Proposal to move superset-ui to this repo #13013
Comments
Adding some historical context to make sure we made a conscious decision after considering all pros and cons:
Note in the original proposal to move superset-ui to npm packages, we did consider keeping packages under one monorepo, but the decision at the time was that pros outweighs cons with separate repos. A question to be answered in this SIP: What has changed? The biggest argument I can see is that after migrating to separate repos, and starting to use TypeScript, we realized a couple of new facts:
Ultimately, moving to either direction (monorepo vs separate rpos) is a big tradeoff. By moving to monorepo, we will immediately lose these current benefits (unless more work is done on making sure relevant tools are properly configured ):
|
When we moved to the separated repos, the goal was also to raise code quality bar, increase development velocity, and produce components that can be natively embedded in other applications (therefore the History-1: The quality of the code in Current: 🟢 Main repo has more TypeScript + lints and overall code quality has improved. History-2: CI jobs in Current: 🟢 CI and History-3: Better tooling and flexibility. We experimented and adopted bots, conventional commits, PR previews (Netlify then later Zeit/Vercel), semi-automatic Current: 🔴 We still don't have admin rights on History-4: There were needs to embed charts in other apps. Plugins system and publishing the packages on History-5: Some legacy chart plugins were added by community and caused maintenance problems for committers over time. The plugins system and publishing the packages on Current: 🟡 Can still have boilerplate of standalone plugin repo for 3rd party who wants to create plugin, but it will still have issues: keep build config in sync and Or we could change the process for creating custom plugins to (1) fork Overall, it seems things have changed in favorable direction. I agree with the observations (@ktmud 's 1-4 above) that the workflow has caused new issues with more contributors joining the project. The key questions to be addressed before merging back are also good and I want to add a bit more on top of that.
To sum up, thank you for writing the SIP and thinking more about this problem. I think this could work and would welcome overall improvement to developer experience. Just want to make sure important issues are brought to attention and some thoughts are put into them before voting and executing. |
A few additional points building on all the helpful background/issues from @ktmud and @kristw:
|
I think it would be nice if the |
Thanks everyone for all the helpful inputs!
@villebro I do agree that it can be nice, but I'm not sure it is really helpful. This means that whenever you want to release a patch to a plugin you'll also bump all the packages and the superset-ui core module, sounds redundant to me but I'm not familiar with the whole release mechanism so I might be missing some stuff. @kristw thanks for the helpful inputs!
I believe the issue we have now is the opposite one..
That's an important one, the question is, is that a blocker?
I think we should still maintain that approach, having developers create PR's on the main repo might be a serious bottleneck. Regrading the open issues:
Thanks everyone for the valuable inputs! I'm starting to work on this one but I think we should setup some milestones we want to see. I'll try to update the PR and SIP with specific milestones. |
This is not true. |
That's my bad, sorry. I was looking at this inside the jest configs. |
Thanks so much for the comprehensive post and keeping this SIP alive!
One consequence of moving |
Shall we put this up for a VOTE @MatanBobi ? |
Just updating here as I'll probably start working on it this week. |
Hi all, after carefully considering all points brought up in this discussion, we have done some prerequisite work required by the monorepo effort to more closely align the
Based on initial testing, both repos should now be in a state that should make the monorepo transition possible. In the following doc we summarize some of the key motivations for migrating the A vote for the SIP will be initiated shortly. |
Out of interest @villebro what are the plans for the other repos in the https://github.com/apache-superset organization? |
@john-bodley that's a good question, and TBH I haven't thought that far ahead yet. IMO |
With the majority of this work done, this SIP can now be considered done, hence closing. |
[SIP] Proposal to move superset-ui to this repo
Motivation
At the moment, working with
superset-ui
in order to develop plugins or packages to superset comes with a very bad developer experience.In case you want to edit or add a plugin, you need to manually link it using
npm link
, this causes a higher barrier for new developers to the project. Working on multiple packages insuperset-ui
will need a developer to manually link all the packages.It's important to note that not all packages and plugins will move back to this repo so we'll still need to use
npm link
from time to time.Using
lerna
in our new monorepo will also ensure that asuperset-frontend
version will also have the latest versions of all the plugins and packages.This will also let us align the tech stack between
superset-frontend
and the packages and plugins used in it.Proposed Change
The whole
superset-ui
repo will be transferred tosuperset-frontend
andsuperset-ui
's repo will be archived.The stack will be the same as the one used in
superset-ui
, usinglerna
andyarn workspaces
to manage the monorepo.The release flow will also be from this repo using github actions as
superset-ui
works.superest-frontend
will become a package within the new monorepo with"private": true
flag, this means that no package will be deployed to npm for that package and the docker image build process will remain as is.The whole monorepo will have one storybook, it will include all the plugins.
Testing the plugins and packages will remain as it is in
superset-ui
, using jest. Support for RTL will be added (since it's used insuperset-frontend
and not insuperset-ui
.Regarding storybook, we can take two approaches:
superset-ui-demo
package where we define all the stories.We should rethink later on if we want to rename the scope from
@superset-ui
to@superset
or keep it that way.New folders structure (WIP):
New or Changed Public Interfaces
None. We will use the same package names.
New dependencies
lerna
- To manage the monorepo.This is already being used in
superset-ui
so I believe licensing isn't an issue here.Migration Plan and Compatibility
No database migrations.
Rejected Alternatives
The current solution where these packages that are tightly related sit under different repositories create a bad developer experience.
Open issues
At the moment,
superset-ui
's lerna configuration sets the same version for all packages, this means that thesuperset-frontend
version will be aligned with the plugins and packages versions.There's also the option to set the versioning as independent but we need to define what's the behavior we'd like to see here :)
Todo List:
CC: @amitmiran137 @ktmud @rusackas
The text was updated successfully, but these errors were encountered: