Hotfix Process
Overview
This document outlines the process for implementing hotfixes - urgent fixes for critical issues in
the production environment. Our primary approach is to handle hotfixes through our regular release
process, leveraging frequent releases from the main branch. However, we also provide guidance for
exceptional cases where this standard approach may not be feasible.
Standard Hotfix Process
Frequent Release Approach
Our only method for handling hotfixes is to implement them as regular features and deploy them through our standard release process. This approach is effective when:
- We maintain a frequent release cadence (e.g., daily or several times a week).
- The
mainbranch is always in a releasable state.
Process Steps
-
Create a new branch from
mainfor the hotfix:git fetch && git checkout main -b hotfix/[issue-description] -
Implement the fix, keeping changes minimal and focused.
-
Create a pull request targeting
main. -
Conduct code review and testing as per our standard process.
-
Once approved, merge the hotfix into
main. -
Trigger our standard release process to deploy the hotfix to production.
Benefits
- Maintains a single, streamlined process for all changes.
- Reduces the risk of divergence between hotfix and
mainbranch. - Leverages existing CI/CD pipelines and processes.
Exceptional Cases: Hotfix When Main is Unreleasable
In rare cases where the main branch contains unreleasable changes, we may need to implement a
separate hotfix process. This should be considered an exception rather than the norm.
We currently DO NOT support this exceptional hotfix process.
Updates Needed
To fully support this exceptional hotfix process, we need to implement:
- A dedicated hotfix CI/CD workflow that can be manually triggered.
- A separate hotfix staging environment.
- Updates to the production release workflow to handle hotfix tags.
Best Practices
- Keep the
mainbranch in a releasable state to enable the standard hotfix process. - Keep all hotfixes as small and focused as possible.
- Ensure thorough testing despite the urgency.
- Maintain clear communication throughout the hotfix process.
- Do a post-mortem analysis after the hotfix is deployed to production.
References
- Release Process for the standard release procedure.
- Development Workflow for overall development practices.