frappe / frappe/press

Add bench-level bulk install / uninstall of an app across all sites

Open
#4,372 0 comments 1 reaction 0 assignees View on GitHub
enhancement ui
Dominant language
Python
Stars
562
Forks
410
Avg merge
22h 15m
Merged PRs (30d)
197

Description

## Title

Add bench-level bulk install / uninstall of an app across all sites

---

## Description

We need a feature to **install a specific app on all sites under a bench**, and similarly **remove/uninstall an app from all sites under a bench**.

This is useful when we need to **update or roll out apps in bulk** for all sites hosted under the same bench, without having to trigger site-level actions one by one.

---

## Problem Statement

Currently, app installation/removal is typically done **per-site**. When a bench hosts many sites, rolling out an app (or removing it) becomes repetitive, slow, and error-prone.

We need a bench-level operation so that administrators can apply app changes consistently across all sites in a bench.

---

## Proposed Feature

Introduce two bench-level actions:

1. **Install App on All Sites**

* Input: `app_name` (or app identifier)
* Applies to: all sites under the bench (optionally filterable)
* Behaviour:

* Skip sites where the app is already installed
* Track progress and failures per site
* Run required migrations/build steps as per standard install workflow

2. **Remove/Uninstall App from All Sites**

* Input: `app_name`
* Behaviour:

* Skip sites where the app is not installed
* Track progress and failures per site
* Use appropriate uninstall workflow (e.g., uninstall + migrate/cleanup if relevant)

---

## Suggested UX / API (examples)

### UI

In Bench → Actions:

* “Install App on all Sites”
* “Uninstall App from all Sites”

### API / Backend

A new endpoint or command such as:

* `POST /api/bench/{bench}/bulk_install_app`
* `POST /api/bench/{bench}/bulk_uninstall_app`

Payload:

```json
{
"app": "my_app",
"sites": "all"
}
```

Optional enhancements:

* Allow filtering by:

* Site status (active/suspended)
* Tag / group
* Tenant / team

---

## Acceptance Criteria

* ✅ Ability to select an app and trigger **install** across all sites in a bench.
* ✅ Ability to select an app and trigger **uninstall** across all sites in a bench.
* ✅ Safe and idempotent behavior:

* Skip if already installed (install)
* Skip if not installed (uninstall)
* ✅ Job execution is **asynchronous**, with:

* Per-site success/failure logging
* Overall job status visible
* ✅ Failures on one site do not block other sites (continue execution).
* ✅ Works for benches with a large number of sites (scales safely).

---

## Notes / Considerations

* Consider whether the operation should run sequentially or in parallel with rate limiting.
* Should allow retry on failed sites.
* Ensure appropriate permissions (admin/bench owner).
* Might reuse the existing site-level app install/uninstall pipeline internally.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the existing site-level app install/uninstall pipeline and the proposed bench endpoints, bulk_install_app and bulk_uninstall_app. Define how asynchronous execution, per-site logging, retries, permissions, and large-bench handling fit together; done means idempotent install and uninstall across selected sites without one failure blocking the rest.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.