-
Notifications
You must be signed in to change notification settings - Fork 98
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
peng, billy/696 monorepo spike #722
Conversation
a09fea5
to
1756d6f
Compare
I'm using the cool Workflows feature in CircleCI to run continuous integration for our multiple projects in parallel. The more $$$ we put into CircleCI, the more parallel builds. |
67c417b
to
ca65385
Compare
Codecov Report
@@ Coverage Diff @@
## develop #722 +/- ##
========================================
Coverage 86.95% 86.95%
========================================
Files 94 94
Lines 1571 1571
Branches 71 71
========================================
Hits 1366 1366
Misses 193 193
Partials 12 12 |
This spike is ready for review. I did not add the There are nearly 120,000 lines of code being added in this PR. I understand this is a huge amount of maintenance and responsibility that will be added to the UI team. However, this is a good thing, because before today, I was the only one maintaining all of it. It's too much for one person. There's a lot of low-hanging fruit we can pick by merging components and updating Vue (I expect we can easily cut down the LOC by 30%). To save you guys time during review, only two files changes have affected Voyager. If we want to use this, this is high priority merge. Because otherwise it'll be a huge headache keeping this PR update to date with edits to our website repos. |
Exciting! |
also worked on the mono repo spike, but should have coordinated better w peng. might have some redundant work here. i used a repo called tomono to combine the git history of all the repos. they're all located in a packages dir. switching branches will only show the relevant packages (and those who share a branch name like develop). the top level has a private package.json for yarn to enable workspaces. workspaces is meant to hoist shared modules to the top level in order to allow packages to share them. package specific modules are installed inside the package's node_modules dir. anyway this is my takeaway: mono pros
mono cons
|
Yeah we should have communicated this better. Luckily there's not much duplicated work. We both tacked different parts of the problem. I worked on resolving CircleCI tests with multiple subprojects and demonstrated that webpack can handle hoisted components (vue, js, otherwise) outside of root project directories. |
@greg-szabo We'd like your input on this Cosmos UI monorepo proposal. Putting all the websites and apps into one repository will help us significantly with integration efforts. Will there be any deployment issues if, e.g. the Any concerns on why we shouldn't go through with this? Thanks. |
There's a massive amount of change here which is risky. I'd like to see us pursue an incremental approach, i.e., merging only two repositories at a time. This is the approach taken by
Regarding Nice find!
We don't need this and it adds complexity. I want the monorepo migration to Stop the World and to be complete at the end.
That's an optional integration step that can be spiked later. Let's take it out of this spike. |
I know we didn't finish discussing this in the team meeting earlier, but I think we did nearly reach consensus. I'd like to get this PR in sooner than later, because all website work is blocking on this (this PR is stopping the world). I feel like waiting an entire week to discuss it again is artificially slowing down our progress. Can we reach agreement asynchronously in this PR? Addressing Voyager concerns: Voyager is fully working in this PR. Development, testing, building, and releasing Voyager still works. The git history for Voyager is retained. The only change we have to make is to start coding one directory deeper into the project folder. Any other PRs we merge into develop before this one is gracefully handled by CircleCI is working for all of the included projects. All of the included projects can be developed on and build correctly. None of the projects have any effect on each other, they're each siloed into their own folder. We are not sharing node modules, so there are no dependency issues to disentangle. I made a proof of concept wherein I moved one cosmos.network component into the root There are tons of juicy integration opportunities to be made, but none of them have been started in order to keep this spike small in scope. |
Huh, seems a huge amount of work that went into this already. I'd rather not comment on something that's so much out of my scope, I would just regurgitate industry standards and opinions. Regarding the website deployments, this is the opposite of the Jenkins CI methodology, where 1 repo ~ 1 project (or in this case one website). So we'll have to work around some of the opinions of Jenkins to support website deployments from this monorepo.
Permisssion / separation-of-duties-wise this might bite is in the back in the long term, but this is not my call to make. I trust you talked questions like "What if I have a contractor to update a website but I don't want to give him access to Voyager?" through. |
This may be a result of confusion around the purpose of a spike. A spike is an experiment and the output is learning, i.e., "What did we learn from this spike?" It should not block development and we should start a new PR for the actual monorepo if we decide to make one after evaluating the results of this experiment. |
@greg-szabo thanks for your detailed comments.
Contractors would have to go through the same |
@NodeGuy Good point, we should make a final PR after the discussion. |
Regarding the last point ("site-to-foldername translations"), it's a bit more complicated. Assume the following workflow:
The logic you're describing is that
The above seems like a business logic that the team should be able to manage. The script doing the deployments should be able to parse the rules and create deployments based on that. This could a toml file, csv, json, whatever that describes how we do deployments and along what requirements. This is important because if the team wants to introduce a new folder that is required for deployment, we shouldn't need to overhaul the build process because of that. A simple addition into this business logic file should be able to manage any extra requests. It also keeps dependencies clear. |
Closing this discussion until after launch. Let's go with a shared component repository for now. Close #696 |
* adjust emoney default gas estimate * make emoney fees safer * changelog
Issue
Closes #696
yarn build
for now)