Branches and Releases
Git Branching and Release Strategy
Branch | Purpose | Branch from | Naming |
---|---|---|---|
master | The master branch should always reflect what is on Mainnet. | master | |
develop | The develop branch serves as an integration branch for features, epics, and bugs. Before a release branch is cut, develop should have commits from master merged to capture any hotfixes to previous releases. | master | develop |
release | Release branches are stable branches that are currently being released, or have been previously released to Testnet or Mainnet. The release branch is cut after code freeze to prepare for devnet and Testnet testing. The tip of this branch should be always in the production-ready state for that particular release. I.e., you should always be able to hotfix to a release branch. Release branches are created for every major and minor release. | develop | release/v1.1.x |
feature/epic | A feature (or epic) branch is the main unit of work. Features are developed in separate branches, promoted to develop for testing, and then promoted to release and master branches in a continuous cycle. | develop | feature/devname(optional)-epic#-fip#-epicname (e.g., "feature/eric-BD-1580-fip6-lock-tokens") |
bug | Bug branches | develop, feature | bug/bug#-description (e.g., bug/BD-1841-wallet-requests ) |
hotfix | Hotfix branches are for critical issues that need to get into Mainnet immediately. The are branched off of the latest release branch for initial testing and the Testnet release. | release | hotfix/bug#-description (e.g., "hotfix/BD-1888-set-fee-ratio") |
Feature development
- Developer creates feature branch off of develop or other target branch (e.g., feature/fip6-lock-tokens)
- Developer frequently merge into the feature branch with the latest from develop. This will grab the latest code and reattach the feature branch to the new root of develop.
- Developer uses Development Milestone Checklist to guide design, development, and unit testing of feature
- Developer creates draft PR and requests code review from all core devs, security, release management, and QA
- Developer hands off the feature to QA
- QA creates system tests tests and open bugs
- Developer fixes bugs and updates PR
- Developer
- Merge into feature branch from target branch (e.g., develop) and builds locally
- Re-runs javascript tests on local build
- Moves PR out of draft to ready for review
- Release manager merges to target branch (e.g., develop) and runs system tests
- Feature branch into target branch
- Merge SDK updates (if applicable)
- Merge fio.test updates
- Release manager installs latest on DEV server and sends to UAT
Feature releases (major/minor releases)
- The develop branch is the release candidate branch and and is used for release testing
- Merge all features and bugs into develop
- Merge changes from master into develop
- Create release branch from develop
- Install release branch on DEV server
- Run fio.test system tests
- Create pre-release RC tag off of the head commit from release branch
- Tag: v1.1.0-rc1
- Title: Release Candidate - FIO v1.1.0-rc1
- Send release to Testnet
- If issues are found, fix bugs off of release branch as necessary and repeat steps with rc2, rc3, etc.
- Complete Testnet testing
- Create PR for release > master and require code review
- Merge release into master
- Create release from master
- Tag: v1.1.0
- Title: Release - FIO v1.1.0
- Run fio.test system tests against release
- Send release to Mainnet
Hotfix/patch releases
- Hotfixes branches are used to patch Mainnet.
- Compare latest release branch (e.g., release/v1.1.x) with master. If there are differences, we have done something wrong.
- Create hotfix branch off of release branch
- Complete development and javascript tests for hotfix
- Create PR and merge into release branch
- Install release branch on DEV server and through QA/UAT cycle. Update release branch as necessary.
- Create pre-release RC tag off of the head commit from release branch
- Tag: v1.1.1-rc1
- Title: Release Candidate - FIO v1.1.1-rc1
- Send release to Testnet
- If issues are found, fix bugs off of release branch as necessary and repeat steps with rc2, rc3, etc.
- Complete Testnet testing
- Merge release branch into master
- Create release from master:
- Tag: v1.1.1
- Title: Release - FIO v1.1.1
- Send release to Mainnet.
Archiving branches
When you want to keep the commit history of a branch that is old or that has been de-prioritized, archive the branch as a tag and then remove the branch. Git tags aren't too different from branches. They are a point-in-time backup of a repository at a specific commit level or in the case of this workflow a specific branch.
Updated over 1 year ago