How to Rollback to a Previous Deployment in a Robopatch Flow
Introduction
In the unfortunate event where an issue arises with the latest version of an application package, and we must rollback to the previous version, there are two options available in Robopack: the Supersede deployment feature, or if unavailable, the Import specific version feature.
Step-by-Step Guides
Using the "Supersede deployment" feature
This feature is available when the Robopatch Flow option Keep last X superseded versions is enabled, which is the default.
- Navigate to the Robopatch Flow that we need to rollback.
- Click on the problematic deployment (or the version number).
A deployment must be in the Active state to be superseded by another version.
- On the right-hand side, click on Supersede deployment.
- In the dropdown menu, choose the version to supersede this deployment with. In other words, choose the version that will replace this problematic version.
- Click on Supersede.
Using the "Import specific version" feature
If the Robopatch Flow option for supersedence was changed from the default and disabled (the option was set to Remove versions immediately, disable supersedence), you may need to use the second option, Import specific version, because there are no superseded versions to use in the Robopatch Flow.
- Navigate to the Robopatch Flow that we need to rollback.
- Click on Import specific version.
- In the dropdown menu, choose the version to replace this problematic deployment with.
- Click Import version.
- Wait for the deployment to start.
You may need to click on the deployment (or version number) and manually click Start deployment depending on what stage your Waves are currently at.
Bonus: Prevent the Robopatch Flow from automatically starting a new deployment when a new version comes out
Optionally, you can also change the Flow options to Start manually so that if a new version of the application comes out, it does not automatically supersede our known good working version. For that, here are the steps to follow:
- Navigate to the Robopatch Flow.
- Click Edit flow.
- Under Flow options, change Start automatically to Start manually.
- Click Save flow.
As new versions of this application come out, they will still continue to be added to your Robopatch Flow, but the deployments will not be started, they will remain in the Pending state. Once a version comes out that corrects the issue you were experiencing, you can start the deployment manually by clicking on that specific deployment (version number), and clicking on Start Deployment. Once you are ready to trust that future versions work, you can change the Flow option back to Start automatically, and future deployments will be added and started automatically.