Skip to main content

App Patch

The App Patch feature lets you temporarily apply changes to an app on your Bench without creating a new deployment. It is designed for quick fixes, testing, or debugging and can be applied to a single deploy or all active deploys within the Bench Group.

Note

App Patch is an experimental feature. Patches are temporary and will be removed after the next deployment or if the server/container restarts.

Before You Begin

Keep the following limitations in mind before using App Patch:

  • App patches are intended only for temporary fixes and testing.
  • Changes made using App Patch do not persist across deployments or server restarts.
  • If you need the change permanently, commit it to your application’s repository and create a new deploy.
  • After a new deployment, you’ll need to apply the patch again if required.
Best Practice

For permanent fixes to Frappe or third-party apps such as ERPNext, fork the repository, commit your changes, and deploy the updated app instead of relying on App Patch.

Apply an App Patch

You can apply a patch in either of the following ways:

  1. Open your Bench Group.
  2. Either:
    • Go to the Apps tab and select Apply Patch from an app’s menu, or
    • Open the Patches tab and click Apply Patch.
  3. Configure the patch details:
    • Select App (if required).
    • Provide a Patch URL or upload a patch file.
    • Select the target deploy or choose Apply patch to all active deploys.
    • Enable Build assets after applying patch if the patch modifies JavaScript or frontend assets.
  4. Click Apply Patch.
  5. A background job will be created. You can monitor its progress from the Jobs tab.

Revert a Patch

  1. Open the Patches tab in your Bench Group.
  2. Select the required patch.
  3. Click Revert Patch.
  4. A new background job will be created to remove the applied patch.

Delete a Patch

A patch can only be deleted when its status is Not Applied.

Troubleshooting Patch Failures

If applying a patch fails, it usually means one of the following:

  • The patch has already been applied or reverted.
  • The patch does not match the currently deployed version of the app.
Tip

If an Apply Patch operation fails because the patch is already applied, first use Revert Patch and then apply it again. Likewise, if a revert fails, try applying the patch before attempting another revert.

Rating: 0 / 5 (0 votes)