• redcalcium@lemmy.institute
        link
        fedilink
        arrow-up
        36
        ·
        1 year ago

        Employees who push first win and get to leave early. The rest would be the suckers who would merge whatever mess left behind by the early employees.

        • Pacmanlives@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          1 year ago

          Hey there were like 3 of us lol! No joke that’s what I have done at a few of the smaller shops as an SRE/System Engineer

      • dan@upvote.au
        link
        fedilink
        arrow-up
        9
        ·
        edit-2
        1 year ago

        Our changes land in main at my workplace, once they’ve received a code review and all CI checks pass (which includes tests, E2E tests, etc). We use feature flags rather than feature branches, so all diffs / pull requests are against main. We use continuous deployment which means changes are automatically deployed once landed. Changes roll out just to employees, then to servers used by a small percentage of users (2% I think), then everywhere. All risky changes are gated by feature flags so they can be enabled or disabled without a code push.

      • MR_GABARISE@lemmy.world
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        1 year ago

        What kind of wild west operation allows pushing directly to main?

        That’s kinda the whole point of trunk-based development.

      • AA5B@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        No kidding. Never push to main, and you most likely can’t. While I get the joke of the meme, I’d send the person packing if they don’t understand branching, and branch flow, rebasing or reverting. Even if you look up the command or do it all through your IDE, understanding the workflow of using git is important

      • SpaceCowboy@lemmy.ca
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        They laid off everyone else so there’s no one to the code reviews now. So fuck it, we’ll do it live!

        • AA5B@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          1 year ago

          We just had a customer escalation caused by exactly this. One group relied too heavily on tribal knowledge for code reviews and didn’t want any other process. Once the tribal elders were gone, no one knew all the things to look for, and there was no other way to catch issues

          As a Continuous Integration and Test guy, I was standing in the corner yelling “I thought you were DevOps. Where’s the automation?” Fine, Puppet/YAML doesn’t work with a traditional build and test, but you could have done syntax validation and schema validation that would have caught before the code review could have happened (and I showed them how a year ago, even offered to do it for them) and set up some monitoring to discover when you break stuff, before customers discover it.

      • 1984@lemmy.today
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I never worked anywhere where they had this set up. I would push to branches and make pull requests, but always work in the production environment.

        I was mainly working as a data engineer though so that’s probably why. It’s hard to have test environments since you can’t replicate all the enormous amounts of data between environments without huge costs.

        • expr@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          There are many strategies for maintaining test environments for that kind of thing. Read-only replicas, sampling datasets for smaller replicas, etc. Plenty of organizations do it, so it’s not really an excuse, imo.

          • 1984@lemmy.today
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            1 year ago

            No I know. But it was “good enough” for the company and we never had any serious issues working that way either. If someone pushed a faulty commit, we just reverted it and reloaded the data from the source system.

            A lot of companies have kind of bad solutions for this sort of stuff, but it’s not talked about and nobody is proud of it. But it keeps the environments simple to work with.

      • korok@possumpat.io
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Do you not use a fork as your origin, separate from the production upstream repo? I’ll push to my fork’s main branch for small or urgent changes that will definitely be merged before anything else I’m working on.

        • Solemn@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          If it’s a private repo I don’t worry too much about forking. Ideally branches should be getting cleaned up as they get merged anyway. I don’t see a great advantage in every developer having a fork rather than just having feature/bug branches that PR for merging to main, and honestly it makes it a bit painful to cherry-pick patches from other dev branches.

    • RustyNova@lemmy.world
      link
      fedilink
      arrow-up
      21
      arrow-down
      16
      ·
      1 year ago

      Fuck those that use main. If you’re working on a library fork that has main and a project that has master you’re bound to invert the two.

      “What do you mean I can’t checkout main? Oh right, here it’s master…”

      For once that we had a standard, it had to be ruined.

      • BatmanAoD@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        git checkout ma<tab>

        If you don’t have autocomplete set up for your shell, get it working. If someone has a different branch named ma..., ask if you can delete it, and get your team to adopt a decent branch naming convention.

        • Nalivai@discuss.tchncs.de
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago
          git checkout ma<tab>
          
          
          mai_new_chenges 
          march_deploy_second_final_final_fixed      
          main_fixes       
          mast_not_farget_to_delete_it
          
          • BatmanAoD@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            …yeah, I already said that if there is another branch starting with those letters it should be deleted. You need a naming convention.

            • Nalivai@discuss.tchncs.de
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              I really wish to work in a team where people have naming conventions for branches that are concerned about stuff like that. Must’ve been a nice place to work at.

      • 1984@lemmy.today
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 year ago

        I think the reasons was ridiculous. The fact that people didn’t like the word master anymore. But I’m used to it now, so fine, let’s use main. It makes sensitive people feel better.