In Place Updates
In place updates is an experimental feature that allows you to update your bench without having to wait for a regular update to take place.
The targeted use case for in place updates are:
Shipping small changes (that will not break a site) quickly to production.
Shipping changes to few number of targets (few sites and a single bench).
ℹ️ Info
A regular update does the following:
Build new image with updated apps
Create new Bench from the newly built image
Move site from old Bench to the new Bench
An in place update instead updates the old Bench without building an image which is a time consuming step.
Enabling in place updates
To enable In Place Updates you have to navigate to the Team Settings dialog:
Click on Settings in the sidebar.
Select the Team tab.
Click on the Settings button under the tab bar.
Check the Enable In Place Updates checkbox.
In place updates will now be enabled for all Bench Groups that are owned by your Team.
ℹ️ Info
This does not mean all updates will be run in place. Certain conditions need to be met for an update to occur in place.
Required conditions for an in place update
After you have enabled in place updates, a few conditions need to be met:
All Sites under a bench have to be updated.
Only sites under a single site group can be updated.
Apps cannot be removed from a bench.
To understand points 1. and 2. please see the image below:
Here 7 sites under 3 site groups under the FrappeDesk Bench Group have been highlighted by red squares. When running an in place update only sites under one of these groups can be updated.
For instance sites demosite.frappe.cloud and test-company123.frappedesk.com cannot be updated with an in place update. For this a regular update will have to be used.
Caveats of an in place update
There are a few reasons for why you would not want to use a regular update:
In place update is less safe than a regular update because if the update fails, your site can go down. This does not happen in a regular update because we create a separate container for each update.
Failing patches are skipped by default. This is to prevent failing patches from interrupting the migration procedure.
Backups are not taken before an in place update.
⚠️ Warning
Due to the mentioned caveats, it would behoove you to ensure that there are no breaking changes before running an in place update.
Using an in place update
To use an in place update for deployment, follow this document until step 2. If all the above mentioned conditions have been met, the dialog box you see will be a bit different:
The action button will not say Update site in place instead of Deploy and update site.
You can still choose to use a regular update by checking the Use regular update checkbox.
Once you click the Update site in place button, you will be redirected to the update job:
ℹ️ Info
If the Update Bench In Place job fails, Frappe Cloud will try to recover your bench by running the Recover Update In Place job:
If this occurs, ensure that you use a regular update when you retry deploying your changes.