Code Freeze Patterns
• John Vandivier
In development you can institute a couple different kinds of code freeze. This article describes them and gives pros and cons.
- Hard Freeze
- A hard freeze is handled at the source control management or deployment level.
- Turning off deployments is a hard freeze. Jenkins or Puppet might control such a freeze. Developers can continue to check in code to any branch, but changes will not be deployed.
- Instead of barring deployments, a hard freeze can be a lock on code checked in, but it must be administered at the source control management level. For example, removing check in permissions for users on a certain repository.
- Soft Freeze
- A soft freeze is handled by developer agreement. Developers will still have permission to check in from a technical perspective, but they agree not to as a matter of process.
- Soft freezes will usually include a process for creating exceptions which allow for some code to be checked in. For example, a project manager may declare that bug fixes for a particular feature are still allowed to be checked in, perhaps with additional peer review or other safety checks.
- Code Frost
- Another version of a soft freeze is called a code frost. Under a code frost changes are expected, but fewer changes occur compared to normal development. Sometimes this process is used to substitute for a code freeze and other times it is a preparatory period or a winding down before an official code freeze.
- A code frost works like a blanket soft freeze exception: A project manager or other team leadership member will declare that only certain kinds of changes are acceptable and it is left to the developers to self-enforce the merging of allowed changes during peer review.
As a matter of preference I am a fan of early code freezes. I like to have two week sprints and start code freeze at the end of the first week.