Live data from Hacker News

Trunk-Based Development

trunkbaseddevelopment.com

91–100 of 210 posts

Re: Trunk-Based Development

#91
post #81
post #75

Earlier quoted context omitted.

> Quite false. How do you expect developers to take you seriously when you essentially say "you can't properly do CI/CD with your current approach"? I sure am enjoying CI/CD right now. Quite true actually! : https://en.wikipedia.org/wiki/Continuous_integration#Everyon...

If you learn how to break features down into small chunks, you can commit to master near-daily while still doing git flow.

> If you learn how to break features down into small chunks

If that's possible. What if there are some features for which it isn't?

Re: Trunk-Based Development

#92

Earlier quoted context omitted.

How does code review fit in to such a workflow? That's also a manual step, but one I and many others consider good and necessary.

According to the article, and my personal experience, you don't commit directly to trunk. Trunk based means that you don't "collaborate" on a branch. So you write your code based off of trunk, once it's ready you commit in a branch, simply for purpose of code review. It gets reviewed, and probably runs an automated build. Once both pass, you merge and it goes through your deployment pipeline. Yes the merge/code revie…

So, like squashed feature branches?

Re: Trunk-Based Development

#93
post #68

This workflow, like all others, is just a formalization of some reality. The reality is that many organizations and teams run on nothing but trunk - and it more-or-less works on them. Some teams work by building blocks separately and then joining them together; other prefer to hammer away on a problem all together. Both approaches work. What worries me are emotional claims that the other approach is fundamentally fla…

I would hesitate to proscribe a "one true way" as well but the longer I develop the more convinced I am that a having branch lives longer than a few days indicates a serious underlying problem (usually a lack of test coverage or faith in said tests).

How do you support a 3 year LTS branch for enterprise customers without long lived branches?

Re: Trunk-Based Development

#94
"The core requirement of Continuous Integration that all team members commit to trunk at least once every 24 hours."

Continuous integration is a means to an end, not an end in itself.

Re: Trunk-Based Development

#95
post #68

This workflow, like all others, is just a formalization of some reality. The reality is that many organizations and teams run on nothing but trunk - and it more-or-less works on them. Some teams work by building blocks separately and then joining them together; other prefer to hammer away on a problem all together. Both approaches work. What worries me are emotional claims that the other approach is fundamentally fla…

I would hesitate to proscribe a "one true way" as well but the longer I develop the more convinced I am that a having branch lives longer than a few days indicates a serious underlying problem (usually a lack of test coverage or faith in said tests).

Branch rot is a known problem, and it hints at a larger issue lurking somewhere in the organization - usually either inability to ship or inability to keep things in order.

Re: Trunk-Based Development

#96
post #78
post #64

Earlier quoted context omitted.

Small teams like Google's 25000 devs and QA automators? :)

I think it can work well with maybe 10-20 people. Depends on how well you software is modularised.

So I'm saying given Google do Trunk Based Development (https://trunkbaseddevelopment.com/game-changers/#google-shar...) with that many committers, any size team can do it.

Re: Trunk-Based Development

#97
post #80

Earlier quoted context omitted.

All you have to do is enter an email address. It doesn't even have to be a real email.

It's pretty rude to ask every visitor to a free report to hand over contact details. What are you planning to do with all those contact details? I can only think of plans that range from annoying to malicious. None that are good. Don't normalize rude behavior. Conditionally free is not free.

It's their right as a producer to require email to view their content.

It's your right as a consumer to not want to make that trade.

Not rude. Rude is posting the raw file link to subvert the agreement or complain about it on hacker news.

Re: Trunk-Based Development

#98
post #78
post #64

Earlier quoted context omitted.

Small teams like Google's 25000 devs and QA automators? :)

I think it can work well with maybe 10-20 people. Depends on how well you software is modularised.

I assure you it works well with 25000 people, I've worked in such an environment.

It seems to me that in the various threads I read here that there seems to be a bit of misunderstanding. If you work on short lived feature branches and merge them to trunk/master and other people branch new feature branches from trunk/master and so on you might be just doing TBD without calling it that way.

Many things are just common sense consequences of that, e.g. if other people are spawning their feature branches from trunk/master; then you don't want to merge something that breaks trunk/master, otherwise you'd be making the life for your colleagues harder, since now they cannot know whether the code they added breaks some tests or they are broken because somebody else broke them.

The feature-flag thing comes into play only when you want to break down a larger feature into smaller branches, each landing in trunk/master before continuing the next step. This get more important the more people can actually make changes on the same part of the codebase that you big feature is going to touch.

If it's only you that touches a section of your code base (and you can do it because it's well modularized), you won't feel much pain of making your feature branch last longer.

However, TBD shows its strengths precisely when the team grows; when you no longer can make the assumption that only you will work on a given piece of code.

Re: Trunk-Based Development

#99
post #91
post #81

Earlier quoted context omitted.

If you learn how to break features down into small chunks, you can commit to master near-daily while still doing git flow.

> If you learn how to break features down into small chunks If that's possible. What if there are some features for which it isn't?

You try by testing. Take big software like Firefox as an example. There are hundreds of commits landing on a good day and to merged into moz central you need to submit the patch for review and testing. Once the code is merged there are more testing and if something broke along the way the release team will figure out ans backout the bad commits or get someone add a fix asap. It is important to not be afraid to merge but also be responsible for your code. Take major refactoring as an example - don't create a patch which is partially implemented with breakage. You can ask for review but don't request a merge knowing it will break - actually your tests should tell you that. Finally, it is important to communicate changes regularly. Developers shouldn't be suprised to see their changes broken because someone else decised to refactor all the sudden.

Re: Trunk-Based Development

#100

Earlier quoted context omitted.

I would hesitate to proscribe a "one true way" as well but the longer I develop the more convinced I am that a having branch lives longer than a few days indicates a serious underlying problem (usually a lack of test coverage or faith in said tests).

How do you support a 3 year LTS branch for enterprise customers without long lived branches?

IIUC your use case this is not the kind of branch that gets merged back, it's more of "another trunk" whose version is largely frozen and that may get backports and fixes.
Post reply on HN