Skip to content

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:

  1. We maintain a frequent release cadence (e.g., daily or several times a week).
  2. The main branch is always in a releasable state.

Process Steps

  1. Create a new branch from main for the hotfix: git fetch && git checkout main -b hotfix/[issue-description]

  2. Implement the fix, keeping changes minimal and focused.

  3. Create a pull request targeting main.

  4. Conduct code review and testing as per our standard process.

  5. Once approved, merge the hotfix into main.

  6. 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 main branch.
  • 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:

  1. A dedicated hotfix CI/CD workflow that can be manually triggered.
  2. A separate hotfix staging environment.
  3. Updates to the production release workflow to handle hotfix tags.

Best Practices

  • Keep the main branch 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