Financial-Times / endpoint-manager

UI for managing endpoints in CMDB
1 stars 2 forks source link

The default branch is possibly incorrect #48

Open rowanmanning opened 6 years ago

rowanmanning commented 6 years ago

Hey, the default branch for this repo is currently set to test, which is 12 commits behind master. @AlanTurner wasn't sure if this was intentional either. Does it need changing back?

Limess commented 6 years ago

@GeoffThorpeFT one for you to work out I think as you know the historic reasons.

master / test seem to have diverged rather than just test being behind.

GeoffThorpeFT commented 6 years ago

I will realign the branches, but yes, test is intended to be the default to encourage pull requests and approval before pushes to master (which triggers deploy to prod).

rowanmanning commented 6 years ago

OK, I guess the only issue with this approach is that it would be easy for test and master to diverge again unless you document the approach somewhere.

Have you considered preventing direct pushes to master by using protected branches? This would allow you to enforce the use of PRs and approval.

In Origami we also use Heroku pipelines so that nothing is directly deployed to production, our process looks like this:

  1. We commit to a new branch and open a Pull Request into master, this can only be merged after a review, which we enforce through GitHub
  2. Once merged into master, the new code is automatically deployed to our qa Heroku application where we can manually test that things are working if we need to
  3. Once we're happy we manually promote the QA instance to production (just one button press), the benefit of this approach is that exactly the same QA deployment is just switched over to production. This means that you have little-to-no risk of a broken build making it that far

Obviously what works for us won't necessarily work for you, but it would definitely allow you to just work from master and reduce any risk in doing so. Happy to chat through in person if you have any questions :)

AlanTurner commented 6 years ago

Cheers - this app will be decomm'ed soon 👍