The purpose of this document is to outline a process that standardizes a mechanism for the DAO to release code to production frequently and with checks in place to ensure the quality of those releases. We expect this process to change as we learn more and grow in our proficiencies as a DAO in releasing software. Our ultimate vision is to move towards full CI/CD with more automated testing and less manual validation.
- Release Manager (a code owner from the Engineering Workstream)
- Responsible for the end-to-end release process overall. See process below.
- Product Lead (someone from the Product workstream)
- Responsible for testing of any new features or feature flags that have been enabled for this release. Will work closely with the release manager to determine if the release candidate will move to production.
- Operations Lead (someone from the Operations Workstream)
- Responsible for testing and confirming that expected fixes are as intended. The Operations Lead is more focused on testing defects that have been mitigated rather than new features, but will work with Product Lead as needed on new features. Assists with general regression testing.
Twice weekly, Tuesday and Thursdays @ 7PM UTC
-
24-36 hours before the scheduled release review each of the following repositories for changes since the last release.
- Web or its dependencies (lib, etc)
- Foxfarm
- Unchained
-
For each repository with changes create a release branch from the current develop branch. This branch should be named in the following format with XX.YY representing the major and minor versions
releases/vXX.YY.ZZ
. -
Build the ephemeral environment for testing:
- For the web codebase, this can be executed with this command:
web/scripts/release.sh release vXX.YY.ZZ
For other codebases, run manually with these commands: - go to repo directory
git fetch
git checkout develop
git reset --hard origin/develop
git checkout -b releases/vXX.YY.ZZ
git push origin releases/vXX.YY.ZZ
- For the web codebase, this can be executed with this command:
-
Get the URL of the ephemeral environment created (can be found in GitHub or on CloudFlare)
-
Create a thread in the
#operations-publicchat
Discord channel with the following format.YYYY-MM-DD repo-name releases/vXX.YY.ZZ
. For example2022-01-18 web releases/v1.55.21
-
In the thread create a summary of the release including new customer facing functionality or bug fixes that can help product and operations to verify functionality, ping the following workstreams by mentioning them in the discord thread and identify each of the people filling the above Roles by discord handle. Also include the URL of the ephemeral environment found in the step above. Please also alert any engineer with code shipping to production in the channel.
- Operations
- Engineering
- Product
-
If blocking issues are discovered in the release branch, it should be reported in the thread created above.
-
The person who has found the issue should add it to GitHub and comment on the Pull Request with a link to the issue. This will serve as the release checklist to inform the go / no-go decision on the final merge to production.
-
The Release Manager will be responsible for coordinating any fixes. If they are able to resolve the issue themselves they may, or if not they will pull in the needed engineering resources to do so. Ultimately, they may also decide to push back the release until the next window if the issues are too severe or risky given the time frame.
-
Blocking issue fixes should be merged directly into the
releases/vXX.YY.ZZ
branch. -
Once all blocking issues have been resolved and merged into the release branch, and Operations Lead and Product Lead have signed off, the Release Manager will merge the branch to main, without doing a squash merge.
-
This needs to be done at the command line (directions to run via script also provided):
For the web codebase, you can use this script: web/scripts/release.sh main vXX.YY.ZZ For other codebases, these are the commands:
git checkout main
git reset --hard origin/main
git merge --no-ff releases/vXX.YY.ZZ
git tag -a -m "vXX.YY.ZZ" vXX.YY.ZZ
git push origin main --tags
For web codebase, this is also executed with the above command (the After testing command) For other codebases, these are the commands:
git branch -d releases/vXX.YY.ZZ
git push origin --delete releases/vXX.YY.ZZ
- (script will soon be added to do these steps)
-
Release Manager will monitor the deployment. Once the deployment has been completed they will notify the release Discord thread for final confirmation from Product and Operations once in production.
-
Operations Lead monitors customer channels and any applicable performance metrics / smoke tests over the next 24 hours and alerts the Release manager if any issues arise that are suspected to be from the release.
-
Our default response is to roll back if the release is expected to have broken any critical functionality. To rollback, you can find the previous release on the main branch in CloudFlare pages, click the
view build
link on the right. Then, in the upper right, you'll see aManage Deployment
dropdown. Choose theRollback
option. The deployment occurs almost immediately.
- Hotfixes can be made out of band from our scheduled releases as dictated by the severity of the issue being mitigated.
- We still recommend following steps 3 - 9 above in these cases. With a hotfix branch being cut from main and then merged back into main and develop once completed.
Shapeshift DAO will have four distinct environments that are a part of the testing and release flow: 1) development 2) release branch 3) alpha and 4) production. LaunchDarkly, pending a security review, will be used to control feature flags in all sub-production environments.
- Development - This deployment will track the develop branch of the web repository. Feature flags can be controlled via LaunchDarkly.
- Release - This deployment will track the latest release branch that has been created by the Release Manager. Feature flags can be controlled via LaunchDarkly for Alpha testing but once moved to production, LaunchDarkly will no longer be able to be used.
- Alpha - The environment served at
alpha.shapeshift.com
. This build will be identical to the production build and deployed alongside with production. The only difference between the two will be the ability to use LaunchDarkly for feature flagging. - Production - The environment served at
app.shapeshift.com
. Identical to the Alpha build, but with no ability to control feature flags via LaunchDarkly.