-
Notifications
You must be signed in to change notification settings - Fork 8
08. Fixing urgent problems on production (hotfixes)
Occasionally, there may be a need to deploy hotfixes to production in between releases (usually to fix annoying user-facing bugs that must be fixed immediately).
To do so, follow these steps:
-
Create a hotfix branch based on the vt_6_x_prod_deploy branch (because the last commit holds the latest production version), e.g., hotfix_password_reset_bug Anyone may create such a branch: this need not be the product manager.
-
Without waiting for code review, merge the hotfix branch directly into the vt_5_x_prod_deploy branch:
git checkout vt_6_x_prod_deploy
git merge --no-ff hotfix_password_reset_bug
Then ask the system administrator to deploy from vt_6_x_prod_deploy as usual. After the fix has been applied and tested on production, the hotfix should be incorporated into the main development branch at vt_6_x_dev with the cherry-pick command:
git checkout hotfix_password_reset_bug
(development branch)
git log
(list the commits on that branch)
Write down or copy the commit number(s) you are interested in, e.g., ab12cd
git checkout vt_6_x_dev_deploy
git cherry-pick ab12cd
This will bring only the commit ab12cd from the hotfix branch into the main development branch. Development can then proceed as usual.
NOTE that the files dspace/config/dspace.cfg and /foo.properties (in root) are managed by a separate process from the rest of the codebase. Any changes to those files should be committed to the Ansible project on GitLab or else an issue created there.