-2

So we use the Gitflow process for a safe and sound CID (https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)

But something's wrong.

Let's say we have 10 critical bugs on prod - they must be fixed asap. So 10 bugs are assigned to 10 devs. Dev 1 creates a hotfix 0.0.1, commits the fix to it, fix gets uploaded to staging env and handed to QA for verifying. In that time dev 2 wants to create hotfix 0.0.2 for his bug, but he can't as Gitflow forbids creating new hotfix if one exists already. So he either have to wait for closing hotfix/0.0.1 or commit to the same hotfix. Of course the normal choice is to commit to that hotfix/0.0.1, because his bug is critical and cant wait fix for bug 1.

So does every other 10 devs with their 10 critical bugs.

QA verifies bug 1 and confirm for deployment. But hotfix can't be closed and deployed, because the other 9 bugs are not tested or just not working

So to be closed, every bug in that hotfix must be working and confirmed. In our case this takes time, a lot of time - 1,2 weeks, luckily - as more and more things needs to be fixed asap on production. So devs commit to that branch more and more, getting the first bugs to be put on hold even more.

So eventually, after all those bugs are fixed and confirmed it is time to finally close the hotfix and deploy those critical bugs on prod...with quite of a big time delay. But there is also another big problem - THE MERGE with dev branch, where other devs do their work (like minor bugfixings for next release). A horrible, several-hours lasting merge.

So we obviously are doing something wrong - what could be a solution for this? For our hotfixes to be on time and to not have terrible merges to dev.

One solution we were thinking, is to put a limit in the hotfix for the number of bugs which it should contain - for example 5 bugs max, other bugs must wait until those are fixed. This, though, means that only lead-dev should commit to hotfix, as he must ensure the limit (it is hard to control otherwise). But this way bugs are still put on hold and fast-deployment is not achieved.

What would be the normal procedure? Please share your ideas.

halfer
  • 19,824
  • 17
  • 99
  • 186
Hristo93
  • 197
  • 12

1 Answers1

-1

If you are spending several hours on a merge, then you are probably doing it wrong. One approach is to get a version control expert in for a day to train your team. That is a relatively small cost compared to salaries. I should think you could find a very good person for £500 ($600 US) per day, and you might only need them for a day or two.

I wonder also whether your testing (with a QA team) is too manual. Can bugfixes be accompanied by unit tests to prove they are an improvement? If so, the developer should be able to merge master into their bugfix branch, spin up a new instance for some simple QA checking, get QA to check the system, get a team lead to PR the fix and unit tests, then merge straight into master and redeploy on its own.

Also, make sure your deployment to live is fully automated. Doing several live (small) releases per day is a good target to have.

Updates

The advice above still stands, but since you have now said this is an old project:

  • Get some automated tests in place. Try to set up functional/browser tests for the bulk of the project, so you can have confidence in changes.
  • Don't reject unit tests out of hand. Perhaps they could be just for new code or new changes, at least to start with? Yes, the project is old, but don't let yourself off the hook easily. Unit tests will pay dividends in the long run. If you don't have dependency injection in the project, get that added, even if it is not used for all instantiation immediately.
  • Repeated from above: make your releases smaller.
halfer
  • 19,824
  • 17
  • 99
  • 186
  • Merge is so long, because we have many changes on same places - we need to communicate with responsible dev to decide which change stands and which no. QAs are manual, yes. Unfortunately we dont have unit tests, project is big, old and with bad structure. It will be almost impossible now to introduce unit tests for every part of the project So still looking for a procedure, which will allow us to deploy rapidly code of high quality – Hristo93 Apr 17 '19 at 19:48
  • I've made some updates - broadly I think if you after high quality releases, you'll need to change your mind on what is possible `:-)`. – halfer Apr 17 '19 at 20:23