Live data from Hacker News

Monorepo or Multirepo? Role-Based Repositories

blog.7mind.io

61–70 of 120 posts

Re: Monorepo or Multirepo? Role-Based Repositories

#61
post #22

Earlier quoted context omitted.

At large enough scale, it causes a lot of problems and breaks like every other dev tool requiring a lot of work to get it back together. That said, there are some open source pieces to help. Facebook open sourced their mercurial stuffs so you can get version control at scale (and before then you just use perforce). Google open sourced bazel. Google open sourced some parts of the underlying infra behind code search, b…

It is just that Googles tooling around code works really well together. Code search to view code and directory based history so you aren't swamped by others commits, tap to run all unit tests all the time but with sectioned projects so you don't run all tests on every presubmit, sponge to gather every test log ever (even for the tests you run locally) so you can link full test logs to coworkers when you have problems…

> directory based commits This whole thread is interesting because subversion is exactly this, and works with large code bases. We used to have these told and we moved away from them.

Re: Monorepo or Multirepo? Role-Based Repositories

#62

Earlier quoted context omitted.

Google uses no versioned libraries?

I think they do, but there is only ever one single version in use - the version in the repo.

If so, they would have a massive problem upgrading libraries like numpy because there are too many and too big breaking changes between releases.

Re: Monorepo or Multirepo? Role-Based Repositories

#63

Earlier quoted context omitted.

> Monorepo shortcomings 1 and 2 seem like bullshit to me. It's a blogpost and the author didn't try to build a total and exhaustive formal system. These shortcomings are not absolute truth but actually they are true. I've seen this multiple times: a small projects evolves over years into a monster. Engineers add new components and reuse any other components they may need creating horizontal links. At some point they…

Monorepo/multirepo and monolith/microservice are orthogonal concepts. When organizations don't understand that then they may end up building a distributed monolith in across multiple repos. (The "Distributed Big Ball of Mud" anti-pattern.) Monorepo advocates are typically advocating for microservices, but within a single code base. The way you provide access control is through code review and build system visibility.…

> Monorepo/multirepo and monolith/microservice are orthogonal concepts.

Yes and no. In both the cases it's a story about components and their isolation.

> they may end up building a distributed monolith

Yup, seen that many times.

> Monorepo advocates are typically advocating for microservices, but within a single code base.

I'm avocating roles. Everywhere.

> If you're using a tool like bazel

If only Bazel supports Scala well enough...

Re: Monorepo or Multirepo? Role-Based Repositories

#64

Earlier quoted context omitted.

But... we do better things than microservices: https://github.com/7mind/slides/blob/master/02-roles/target/...

Read this, not worthwhile and OT.

> not worthwhile

Why so?

> and OT

Not at all. In both cases it's about roles.

Re: Monorepo or Multirepo? Role-Based Repositories

#65
post #49
post #43

Earlier quoted context omitted.

In short, the binaries are already built. Usually its faster to link to a prebuilt binary than to build from scratch.

So where do these binaries get built and how does the system know which binaries to rebuild for a given change? If developers are building binaries and committing them directly, doesn’t that open up security or even correctness issues? How does this approach satisfy compliance concerns (how can the CTO or a manager sign off on the changes that went into the binary if it’s just something a random developer committed?)…

>So where do these binaries get built and how does the system know which binaries to rebuild for a given change?

For simple things, if the code in a directory changes then the CI system does a rebuild of that directory. You can have the CI system either validate that the binary matches or commit the binary itself. More complicated things you'll have a build system such as Bazel which figures out what changed.

Re: Monorepo or Multirepo? Role-Based Repositories

#66

Amazon does multi-repo. I don't see what the problem or debate over this is. We seem to be handling it pretty fine despite a massive-scale SOA architecture.

When I was there, they were migrating away from perforce because they could no longer scale perforce fast enough to meet demand. I've not seen this talked about much outside of Amazon.

It was also a huge day-to-day quality of life improvement for the users (the developers.) There are UX problems with git, but they pale in comparison to the UX problems with perforce which is truly unpleasant software.

Re: Monorepo or Multirepo? Role-Based Repositories

#67

Earlier quoted context omitted.

I think they do, but there is only ever one single version in use - the version in the repo.

If so, they would have a massive problem upgrading libraries like numpy because there are too many and too big breaking changes between releases.

[deleted]

Re: Monorepo or Multirepo? Role-Based Repositories

#68

Earlier quoted context omitted.

I think they do, but there is only ever one single version in use - the version in the repo.

If so, they would have a massive problem upgrading libraries like numpy because there are too many and too big breaking changes between releases.

Inside Google's main repo there are different build targets for libraries with incompatible API changes that are too difficult to fix all at once, e.g. there might be numpy_1_8 and numpy_1_10 separately.

Python at Google muddled along for years without numpy at all so it's not like anyone would be seriously harmed by having an old release in the repo.

Re: Monorepo or Multirepo? Role-Based Repositories

#69
post #50

Earlier quoted context omitted.

> whether you're willing to dump money into updating everyting at once I think the majority of projects in this world only update everything at once. They haven't investing in testing, sensible api's and testing to allow updating small pieces of their solution. From my experience, I also think the majority of people who think they have a library and need multi repos to deal with that, don't have a library. To further…

Project != company. Project != consultancy. Monorepo just didn't work for me. I have ~10 web projects for different customers + my personal projects that use various versions of some common code. It doesn't make any financial sense to evolve my common code by updating all the customer's code for free when they're not even asking for it. So on this level it doesn't work. Even within a single company with just two devs…

Yep, I agree and that all makes sense.

Don't you find those projects within the company wanting multi-repos also?

Re: Monorepo or Multirepo? Role-Based Repositories

#70
So, in a monorepo world, isn't it often that you have to deploy components together, rather than "it's easy to"? How are services deployed only when there has been a change affecting said service? Presumably monorepo orgs aren't redeploying their entire infrastructure each time there's a commit? Are we taking writing scripts which trigger further pipelines if they detect change in a path or its dependencies? How about versioning - does monorepo work with semver? Does it break git tags given you have to tag everything?

So many questions, but they're all about identifying change and only deploying change...

Post reply on HN