We got a new boss who demanded everything be merged into a monorepo, it's been the absolute highest priority and every decision and plan is made in light of the prime directive of getting everything in the monorepo.
Then in a one-on-one I was giving this boss my progress on moving my projects into the monorepo and they asked me, "okay great, now, what will be the benefits of moving these into the monorepo? Why are we doing it?" and I had to stop myself from answering "because you told me to".
Had something similar where my boss wanted me to setup performance metrics for our work in one of our system. To his defense, it was more work than anticipated because it involved another team which wasn't very cooperative. But in the end we were in a similar situation where he did not consider actually using the metrics would also take time, and there was more important work for me to do, and he of course did not want to do the work himself. We literally never used the metrics in the end... This was about a year ago by now.
Even if he asked it, you should understand why he asked it.
If you're working on tasks without understanding why it's required, you're just executing and it leads to similar problem than when AI agents doesn't have enough context: the result is bad.
Maybe your manager have bad reasons to move to a monorepo, but you should have a conversation about it.
Even if it's a bad reason (from your point of view), it can have some benefits that it's hard to see if you don't have the big picture
I know you mean well, but the answer to "why he asked it" is genuinely, and I mean this sincerely, because he doesn't know what he is doing, is spinning his wheels, and desperately trying to figure out how to impress the private equity company that bought us, fired his predecessor, and hired him from a 6-month tenure at a startup crypto exchange that if you search for it will bring up reddit threads with titles and comments like "have I been scammed?!" or "is this company legit?".
He's made a number of decisions in his managerial role, reversed course, then reversed course again, that all seem to be dictated based on what's currently popular rather than any real consideration about what is most useful for our product.
Honestly I just gave him some canned "it'll improve efficiency and be more cost effective and enable us to more easily work on the product" non-answer that he seemed satisfied with because he then started talking excitedly about how fast the migration is going now even though the initial "slowness" was the planning and prep-work which was frequently described to him in stand-ups.
Yeah, I've been using it a lot for my merge conflicts and have yet to see it mess up. It surely can, but it's honestly got a better track record than me, as I've messed up merge resolution plenty of times.
Until half a year ago, Claude at least regularly messed up. Dangerous stuff sometimes. By now with the skill I've written I'm doing the rebasing blind. Hasn't failed me for a long time.
How do you trust it to that? Seems like a minefield with no real gain. Either the rebase is messy and you need to make sure it's done properly or it's easy and you don't need any help.
Yes complete trust. So far I have a 100% success rate across 1000s of rebases for a year now.
It can track of features across branches and worktrees better than I can.
The gain is that instead of spending 1-2hr on a rebase, I spend 5-10 minutes and save the sanity.
Only time its NOT done properly is always from human error of me giving the AI the wrong instructions on which features to include. And even then, since a rebase is only at most 10 or so minutes, its easy to just revert and try again.
Basically I can try again 10 times and still be faster than doing so manually and while the AI is working I can grab a coffee and work on something that requires real thoughts.
Title is misleading. You've got 4 problems that I can see and monorepo is only related to one of them and is the direct cause of none of them.
Main problem is your reviewers are too slow. Aside from exceptional circumstances (e.g. only two guys have the necessary context to review this and one is sick while the other is on vacation) changes should not spend days waiting on review. They should generally be reviewed within a business day. This has nothing to do with monorepos.
Second problem is your reviewers are too quick to short circuit their reviews. "Please rebase" should not be the only feedback you get. Unless the reviewer is specifically aware of something upstream that invalidates your change (which shouldn't be common) they should still be able to review it merge conflict or no. So they should either have additional things they want you to fix in addition to rebasing or they should be able to tell you that it looks good aside from the conflict. This also is unrelated to monorepos.
Third problem is you're not being proactive enough with the changes you have out for review. You own your changes and should be regularly checking for merge conflicts while they're out for review not just waiting for the reviewer to tell you that there's a merge conflict. This too has nothing to do with monorepos.
Final problem is that you might have too many people working in the same file at the same time. This is not caused by monorepos but does have the potential to be exacerbated by monorepos if you don't have clear owners of folders within the monorepos or if the code owners don't notice the problem and take steps to mitigate it.
Standardised branch structure and names, all branches are associated with a particular team, and each team branch has a branch owner who’s in charge of RI/FI operations. So the branches that engineers are PRing directly into don’t have a lot of traffic, and those get RI-d in batches and changes from other branches then get FI-d back into the team engineering branch. And because branches loosely follow the org structure, conflicts are generally dealt with at the PR level, not the RI/FI level.
I work in a large org with hundreds of engineers across the world and this is a major issue for us.
It has only been made worse by the fact that everyone's velocity has increased at least ten-fold since the rise of AI and changes are constant, resulting in conflicts occuring way more quickly, management expecting features to be developed more quickly, and engineers being too overworked as a result.
The PR owner's responsibility doesn't end when the PR is up for review, you own it until it's merged. You need to chase review, don't just yeet it up and tag someone or yes, you will find yourself stuck in this cycle. Chase the person (nicely), or re-assign it if they have a legit higher priority.
I'm pretty sure I'd just check in assuming the merge isn't horrible. A review process that has you constantly re-reviewing minor revisions sounds ineffective and unsustainable.
OP's complaint isn't a mono repo one. You only get merged conflicts if people changed the exact same files as you. That will happen regardless of repo type. All you can do is avoid having multiple devs working in the same area at the same time.
I work in a mono repo and it's amazing. Alternatives like git subrepos suck and are confusing. While you do have more instability because of changes in dependencies, it also means you're catching those issues earlier, which is easiest. It's easier to prevent those incompatibilities in a mono repo due to the ease of running tests at the current main version. Also easier to fix other team's issues and extend tooling and such because you don't need to figure out their repo and as much of their workflow, etc.
For me it’s having everything in a review in one place. So much better, and contrary to OPs experience, has made getting a review markedly easier. I just have to chase one person instead of putting together a strike team every time. Though that may be more because it came together with dissolving hard lines between projects on our small team (Conways law in full effect)
Merge conflicts often happen when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file.
Multi repo structures have the exact same problem; instead it's distributed between 10 repos & prs AND you're almost guaranteed to hit conflicts on the files specifying out the versions between repos (since literally everyone is forced to touch those files).
Multi repos are effectively just monorepos but with 10x the work handling merges and versioning between them.
As someone who will happily rant about the superiority of the tab, I still have to admit that repository structure matters a good deal more. Sure, you can do anything if you invest in tooling, but you can do it ten times faster if you just choose the model that fits existing tools.
The aforementioned merge queues vs syncing changes between repos
Access control woes
Having to do a sparse/shallow checkout due to size vs having to checkout three repos to work on one service
Seeing PRs, alerts, etc. you can't do anything about vs having to check for them in multiple places
People thinking that backwards compatibility doesn't matter for a service if you update the client in the same PR (users won't get the new client immediately...)
Just because you can doesn't mean you should. As I said, tools exist that support particular models of work already, e.g. most GitHub features are organized around repositories. There are probably ten or so companies in the world that can justify building their own source control platform, but the rest should design their work around one of the existing ones.
I'm sure however theyve set it up they could keep the monorepo and quash the persistent merge conflict problem somehow.
Yeah this is the confusing thing to me
Being a monorepo doesn't inherently mean PRs will have persistent conflicts. It just sounds like a bad setup of some sort, or projects not getting properly scoped
Like right now another team is working on an area of the codebase that my team also wants to be updating for a project. So we shuffled projects around and they're going first, sticking us on all the PRs. We've taken a different project on instead, and we'll touch the shared code in the new year 🤷♂️
monorepo done well doesn't expose this kind of problems, you'd have them as well in a polyrepo setup on the specific app/component affected by the conflict
I'm surprised. I've loved working in a mono repo more than when I did a bunch of git sub repos. And AI definitely does better with a mono repos because it makes it easier to find and update the code.
That's not been my experience but I've only seen monorepo done well. Maybe that happens when monorepo is done poorly but it's certainly not unavailable.
I was thinking apart from git blame, like when you’re searching on commit messages relating to changes for which you don’t know which files are involved.
You can give git log a folder as input, then it will only show commits that touched that folder.
If you depend on a bunch of other folders then yes, its the equivalent of having thousands of dependabot commits where deps get updated and change APIs subtly
Mono repos need mono repo tooling, processes and release structure. The only people who can say what those tools, processes and release structures look like are the dorks who decided to build a monorail... I mean mono repo
It is simple: Someone says "need review". First Person who See this takes a Look. Finishing is always before continue as finished Stories will not block Organisation/re-prio. Thats how it works. Review > Bug > continue Task/Story > new Task/story
Which is why it is a rebase-cult, because there are other tools to fix the merge conflict, and they specifically choose to only use rebase. Why is this hard to understand?
Rebase is usually the right approach. It's generally cleanest for both review and history. It sounds more like the problem is the reviewing approach OP is using, such that a rebase invalidates the review.
You can rebase to do it, or you can merge to do it, but you still have to accept which current/incoming changes to keep/discard, and should still have code review on the result before pushing/merging to your stable branch if you work in a team setting.
The problem the meme describes is the exact same, regardless of which command you prefer. Why is this hard to understand?
36
u/Soggy_Porpoise 21d ago
Sounds like a coworker problem.
21
u/Melodic-Ebb-7781 20d ago
You forgot that someone pushed tests that randomly fails in the pipeline
531
u/theucm 21d ago
We got a new boss who demanded everything be merged into a monorepo, it's been the absolute highest priority and every decision and plan is made in light of the prime directive of getting everything in the monorepo.
Then in a one-on-one I was giving this boss my progress on moving my projects into the monorepo and they asked me, "okay great, now, what will be the benefits of moving these into the monorepo? Why are we doing it?" and I had to stop myself from answering "because you told me to".
257
u/lyuhdev 21d ago
115
u/StarHammer_01 21d ago
Rebasing is one task Im glad is getting replaced by AI
75
u/pqpm 21d ago
This hit me, to close to home.
The joys of large teams where everyone expects everyone else to review, so nobody reviews.
15
u/clericc-- 21d ago
Trying to get upstream fixes into Crossplane for close to two years now - this describes it exactly. Except its weeks or months on top
11
u/caleblbaker 20d ago
Title is misleading. You've got 4 problems that I can see and monorepo is only related to one of them and is the direct cause of none of them.
Main problem is your reviewers are too slow. Aside from exceptional circumstances (e.g. only two guys have the necessary context to review this and one is sick while the other is on vacation) changes should not spend days waiting on review. They should generally be reviewed within a business day. This has nothing to do with monorepos.
Second problem is your reviewers are too quick to short circuit their reviews. "Please rebase" should not be the only feedback you get. Unless the reviewer is specifically aware of something upstream that invalidates your change (which shouldn't be common) they should still be able to review it merge conflict or no. So they should either have additional things they want you to fix in addition to rebasing or they should be able to tell you that it looks good aside from the conflict. This also is unrelated to monorepos.
Third problem is you're not being proactive enough with the changes you have out for review. You own your changes and should be regularly checking for merge conflicts while they're out for review not just waiting for the reviewer to tell you that there's a merge conflict. This too has nothing to do with monorepos.
Final problem is that you might have too many people working in the same file at the same time. This is not caused by monorepos but does have the potential to be exacerbated by monorepos if you don't have clear owners of folders within the monorepos or if the code owners don't notice the problem and take steps to mitigate it.
9
u/awesome-alpaca-ace 21d ago
I work in a large org with employees across the world and this is not an issue for us.
31
u/vanit 21d ago
The PR owner's responsibility doesn't end when the PR is up for review, you own it until it's merged. You need to chase review, don't just yeet it up and tag someone or yes, you will find yourself stuck in this cycle. Chase the person (nicely), or re-assign it if they have a legit higher priority.
8
u/7heWafer 20d ago
Responsible code reviewers check the size of the conflict and often review the code anyways if it's small enough.
7
u/JackNotOLantern 21d ago
Yeah, we started rotating the "must-review guy" in our team, so reviews don't wait longer than a day
6
u/xwolpertinger 21d ago
Gotta race to be the first to merge
I call it PVP programming
6
u/za72 21d ago
so why use monorepo??
2
u/EarlMarshal 21d ago
Just use work trees and do it every morning and put more time on the tickets than it took you and push your PM and your chef to force faster reviews.
2
u/wint3ria 21d ago
Forgot to mention: boss complains you're too slow, doesnt care or understand he is responsible for this organisation
1
u/Major_Fudgemuffin 21d ago
My last job decided that everything from the last 15 years should be combined into a monorepo so that AI can maintain it more efficiently.
Turns out it was not more efficient. Shocking.
1
u/instilledbee 21d ago
Monorepo in a slow-moving enterprise be like
1
u/Ok_Tea_7319 21d ago
Bad monorepo.
1
u/knabbels 21d ago
You review your changes? Like by a human?
1
u/El_RoviSoft 21d ago
That’s why we have sticky ship at the company
1
u/Chromanoid 21d ago edited 21d ago
Just merge and let the review happen afterwards
https://itnext.io/optimizing-the-software-development-process-for-continuous-integration-and-flow-of-work-56cf614b3f59
1
u/Stunning_Ride_220 21d ago
LoL...just slapping everything in one repo is not monorepo tho
1
u/Chuck_Loads 21d ago
I think this is my new discord avatar
1
u/FedUpKoala 21d ago
Doesn’t using a monorepo make it difficult to view the history and find information on past versions due to the shear amount of code?
1
u/footsie 20d ago
Mono repos need mono repo tooling, processes and release structure. The only people who can say what those tools, processes and release structures look like are the dorks who decided to build a monorail... I mean mono repo
1
u/jdgrazia 20d ago
If this happened to one of my engineers more than twice I'd fire them. You let a pr fall into conflict and then let that derail your review?
1
u/maochins 20d ago
Just joined a new company. This is literally my life now.
1
u/jobehi 20d ago
Skills issue
1
u/quisido 20d ago
GitHub has a new feature where Copilot can watch your PR and fix merge conflicts for you whenever they arise.
As of a few days ago, you could only enable this feature through the pull request UI. I hope they add it as a default setting soon.
1
u/fleck57 19d ago
Even worse when you fix the merge conflicts about 5 mins after the reviewer comments “please rebase” but still takes days to re-review
1
u/Flaky-Low-2262 19d ago
It is simple:
Someone says "need review". First Person who See this takes a Look. Finishing is always before continue as finished Stories will not block Organisation/re-prio.
Thats how it works.
Review > Bug > continue Task/Story > new Task/story
1
u/rysama 18d ago
Monorepos are great….
If your company has the capital to pay for an entire org to make it not a nightmare.
-3
u/BoBoBearDev 21d ago
You don't need to rebase to fix the problem. It signals you are part of the rebase-cult.
0
u/AWzdShouldKnowBetta 21d ago
Lol ur org sucks.
185
u/[deleted] 21d ago
[removed] — view removed comment