- An incident is occurring and no mitigation had any effect on the issue
- The incident is preventing the audience to use the system (the definition of usage should be assessed based on what functionality is considered most important)
- A defect in the code that causes the issue is found
- An assessment of the risk of releasing a HOTFIX live has been made and it is favourable.
- The severity of the issue is greater than the risk of releasing live
- The HOTFIX has been considered as the last resort
Make sure you are on the main branch of your code repository and it is up to date
git checkout main
git pull
Take note of the revision hash currently deployed to live and check that out
git checkout <REVISION_HASH>
You are now in a 'detached HEAD' state. Create a new branch from it
git checkout -b <HOTFIX_BRANCH>
Push the newly created branch to the remote repository on GitHub
git push -u origin <HOTFIX_BRANCH>
Apply the patch as usual and push the code to the branch. Remember, NEVER PULL THE MAIN BRANCH IN THE HOTFIX ONE IF MAIN IS AHEAD OF WHAT IT'S IN PRODUCTION
Follow the usual CI/CD automated process to test and release.