-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add patch rollback page #282
Merged
Merged
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
title: Roll back a Patch | ||
description: Learn how to roll back a patch in Shorebird. | ||
sidebar: | ||
label: Rollback | ||
order: 5 | ||
--- | ||
|
||
If you discover that a live patch has a bug, Shorebird supports patch roll back. | ||
When a patch is rolled back, it is remotely uninstalled from end users' devices | ||
and replaced by either the previous patch or the base release if no previous | ||
patch is available. | ||
|
||
## How to roll back a patch | ||
|
||
In the [Shorebird Console](https://console.shorebird.dev/), navigate to the | ||
release that contains the patch you want to roll back. On the right side of the | ||
patch row, click the "more" icon (three vertical dots) and select "Rollback": | ||
|
||
![The Shorebird Console showing a "roll back patch" button](https://github.com/user-attachments/assets/941fdc46-d0f3-463f-835f-5c8eb8a02e83) | ||
|
||
## What happens when a patch is rolled back? | ||
|
||
Imagine we have a release with three patches: | ||
|
||
![The Shorebird Console showing three patches, with patch 3 as the active patch](https://github.com/user-attachments/assets/ee5d4e2b-eca3-4318-99e9-038c0134bfff) | ||
|
||
When a user downloads this release from the store, Shorebird will see that patch | ||
3 is the latest available patch and download it. | ||
|
||
If we discover that there is a problem with patch 3, we can roll it back. The | ||
Console will look like this after a rollback: | ||
|
||
![The Shorebird Console showing three patches, with patch 3 rolled back and patch 2 as the active patch](https://github.com/user-attachments/assets/7ba4ff2c-5823-4c9f-a260-68ca6ce1e10a) | ||
|
||
Users who download the app from the store will now get patch 2 instead of patch 3. Users who already had patch 3 installed will be downgraded to patch 2. | ||
|
||
### Under the hood | ||
|
||
When a Shorebird app checks for new patches, the server includes in its response | ||
a list of rolled back patches. If the device has any rolled back patches | ||
installed, it deletes them and reverts to the last "good" patch, which will be | ||
visible the next time the app starts. | ||
|
||
:::note | ||
If you app needs to download an older patch as part of a rollback, | ||
installing that patch will count against your monthly patch installs. | ||
::: |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you've hit your limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed.