why does amazon work on mainline instead of creating branches?

Amazon
greenTeak๐ŸŒด

Go to company page Amazon

greenTeak๐ŸŒด
Aug 17, 2020 15 Comments

how do people working on multiple features work on their items parallely?

why is amazon promoting such technical path?
why not branching and merging??

comments

Want to comment? LOG IN or SIGN UP
TOP 15 Comments
  • Amazon
    mxxw64

    Go to company page Amazon

    mxxw64
    You should work on a branch and merge to mainline. The only reason not to create a branch is if you own the service.

    The reason why you see people work directly on mainline is because they are either rushed on time or suck at git.
    Aug 17, 2020 5
    • Amazon
      mxxw64

      Go to company page Amazon

      mxxw64
      What do you mean by โ€œamazon auto backup your local code.โ€

      You can have a testing environment that is not local that consumes from the remote branch. The reason that the environment is not local is because it runs integration test with other services and you cannot crest locally for various reason.
      Or you have a pipeline that runs load test, and pipelines consume remote branch.
      Aug 17, 2020
    • Amazon
      aa7184

      Go to company page Amazon

      aa7184
      There is a script which will back up your local repo on the cloud ( I don't remember all the details at the top of my head).

      The only branch which is allowed to be consumed by your real env stages is mainline. You might have a special feature that requires load testing etc and there it makes sense to have a separate remote branch. But that is a special case imo. Most features do not and should not require this. Btw you can call other services from your local env as well (as long as both are in the same fabric).
      Aug 17, 2020
  • Amazon
    aa7184

    Go to company page Amazon

    aa7184
    You are expected to have multiple branches locally for different features(some prefer different workspaces) but when you submit that code, it is your responsibility to merge that with mainline. This is different from git flow where someone else merges your code into a release. IMO this promotes ownership.
    Aug 17, 2020 5
    • Rakuten / Eng
      aleetaday

      Go to company page Rakuten Eng

      aleetaday
      Review purposes, and - as you said - owneship

      I might make some assumptions: is mainline == master?

      I am joining Amz very soon so any guidance is appreciated
      Aug 17, 2020
    • Amazon
      aa7184

      Go to company page Amazon

      aa7184
      Yes master == mainline.
      Review is done before you push to mainline. Not sure about ownership here. Care to elaborate please ?
      Aug 17, 2020
  • Amazon / Eng
    RmOi55

    Go to company page Amazon Eng

    PRE
    Microsoft
    RmOi55
    Of course we work on separate branches for different features. Not sure why you'd think otherwise. Amazon is certainly not promoting usage of only mainline.

    The CD pipeline is set to a specific branch, usually mainline, and we merge to that branch in order to deploy.
    Aug 17, 2020 0
  • What do you mean by working on mainline? Someone can merge changes to main branch without pull request ?
    Aug 17, 2020 1