I’ve heard it thrown around in professional circles and how everybody’s doing it wrong, so… who actually does use it?

For smaller teams

“scaled” trunk based development

  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    Here there’s main. You branch off. Do your work. Make a PR to main. Build passes and someone approves, merge to main. Production release is done by tagging main.

    The branches are short lived because the units of work we select are small. You have like one pr for an endpoint. You don’t wait until the entire feature with 20 endpoints is ready to merge.

    Seems to work fine. I think this is different than trunk based development but honestly I’m not sure I understand trunk.

  • wewbull@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 months ago

    Second diagram, yes absolutely.

    Short lived (1-2 day) branches, and a strong CI systems to catch regressions.

    Be warned, the strength in the CI lies in its capacity to detect when some functionality that previously worked doesn’t work anymore. So, the flow must be green always, and it must evolve as the features evolve. Without good CI you’re destined for failure.

  • BatmanAoD@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    I haven’t worked on any teams where all members committed “every 24 hours”, and there have always been some branches that live longer than we’d like (usually just unfinished work that got deprioritized but still kept as an eventual “todo”), but most teams I’ve worked on have indeed followed the basic pattern of only one long-lived branch, reviews and CI required prior to merge, and all feature-branches being short-lived.

    • ____@infosec.pub
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      A hard timeline on commit strikes me as less than ideal.

      People are people. They have issues, they screw up, but they still write good code.

      Seems like a brutal metric that encourages minimal commits without real change.

  • Ismay@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    I do, on a 900+ developer mono repo. Works like a charm.

    We just have a CD that allows to deliver each project each micro service individually.

      • boblin@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        6 months ago

        Most likely CD is intended to mean continuous delivery, which commonly means automation in processes that deliver your software to it’s target audience.

    • onlinepersona@programming.devOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      Out of curiosity, how long are CI and CD runs? And are there any particularities in the way of working for example every PR/MR is created by pair programmers, or the use of josh to cut down on time to clone, stuff like that.

      Anti Commercial-AI license

      • AggressivelyPassive@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        6 months ago

        If cloning a repo is an issue, you’re using CI wrong. --shallow has it’s purpose.

        Anyway, in my project a complete CI run including local integration tests takes about an hour. We could cut that down by running things in parallel, but we never bothered to add more runners.

        I would say, if your tests hold you back, you might want to reconsider testing. Staged testing is an option, or just reevaluate whether you really need all those test cases. Many integration tests are not really testing that much, because 95% of them overlap.

  • Consti@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    We do, for two 2-3 person projects, where no code reviews are done. This is mostly because (a) it’s “just” a rewrite and (b) most new functionality is small and well-defined. For bigger features a local branch is checked out and then merged back later. Commits are always up-to-date, which makes it much easier to test integration of new featues.