Skip to content

Instantly share code, notes, and snippets.

@simonespa
Created April 26, 2023 10:26
Show Gist options
  • Select an option

  • Save simonespa/54eb5a27f44c9453bcb170d74181a6c0 to your computer and use it in GitHub Desktop.

Select an option

Save simonespa/54eb5a27f44c9453bcb170d74181a6c0 to your computer and use it in GitHub Desktop.
When to resort to a live HotFix
  1. An incident is occurring and no mitigation had any effect on the issue
  2. 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)
  3. A defect in the code that causes the issue is found
  4. An assessment of the risk of releasing a HOTFIX live has been made and it is favourable.
  5. The severity of the issue is greater than the risk of releasing live
  6. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment