fix: cancel stalled backups with ACL + auto-timeout failsafe #197

Merged
jmiller merged 6 commits from fix/cancel-stalled-backup into main 2026-06-30 18:53:16 +00:00
Owner

Summary

  • Backups stuck in "running" status permanently block future backups for the same profile via preflight check — previously required manual DB update to fix
  • Adds Cancel Stalled toolbar button on Backup Records view (checkbox multi-select) with new ACL permission mokosuitebackup.backup.cancel
  • Adds ajax.cancelBackup AJAX endpoint for programmatic/API use
  • Auto-timeout failsafe: PreflightCheck now auto-cancels "running" records older than 30 minutes, cleaning up partial archives and surfacing warnings — stalled backups can never permanently block scheduled/CLI runs
  • Updated preflight error message to guide users to the Cancel Stalled action

Test plan

  • Select a backup with "running" status, click Cancel Stalled — should change to "fail" and delete partial archive
  • Selecting non-running records shows "none in running status" warning
  • Verify ACL: users without mokosuitebackup.backup.cancel don't see the button
  • Verify auto-timeout: create a running record older than 30 min, trigger a new backup — stale record auto-cancels with warning
  • Verify a legitimately running backup (<30 min) still blocks new backups

https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG

## Summary - Backups stuck in "running" status permanently block future backups for the same profile via preflight check — previously required manual DB update to fix - Adds **Cancel Stalled** toolbar button on Backup Records view (checkbox multi-select) with new ACL permission `mokosuitebackup.backup.cancel` - Adds `ajax.cancelBackup` AJAX endpoint for programmatic/API use - **Auto-timeout failsafe**: PreflightCheck now auto-cancels "running" records older than 30 minutes, cleaning up partial archives and surfacing warnings — stalled backups can never permanently block scheduled/CLI runs - Updated preflight error message to guide users to the Cancel Stalled action ## Test plan - [ ] Select a backup with "running" status, click Cancel Stalled — should change to "fail" and delete partial archive - [ ] Selecting non-running records shows "none in running status" warning - [ ] Verify ACL: users without `mokosuitebackup.backup.cancel` don't see the button - [ ] Verify auto-timeout: create a running record older than 30 min, trigger a new backup — stale record auto-cancels with warning - [ ] Verify a legitimately running backup (<30 min) still blocks new backups https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
jmiller added 3 commits 2026-06-30 18:50:35 +00:00
fix: add cancel stalled backup action with ACL permission
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
1eb1c18bdf
Backups stuck in "running" status block all future backups for the same
profile via the preflight check. Previously the only fix was a manual
DB update.

Adds a toolbar button and AJAX endpoint to cancel stalled backups:
- New ACL permission: mokosuitebackup.backup.cancel
- BackupsController::cancelStalled() for toolbar (multi-select)
- AjaxController::cancelBackup() for AJAX/API use
- Sets status to "fail", cleans up partial archive files
- Updated preflight error message to mention the cancel action
- Language keys for en-GB and en-US

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
fix: auto-cancel stalled backups after 30 min timeout
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Universal: PR Check / Secret Scan (pull_request) Successful in 6s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 29s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Failing after 14s
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 13s
Generic: Project CI / Lint & Validate (pull_request) Successful in 43s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 47s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
b26a21820b
PreflightCheck now auto-cancels "running" backup records that have
exceeded 30 minutes, treating them as stalled. Partial archive files
are cleaned up. The auto-cancelled records are surfaced as warnings
so the user knows what happened.

Records younger than 30 minutes are assumed to be legitimately running
and still block new backups for the same profile.

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
jmiller added 1 commit 2026-06-30 18:50:42 +00:00
jmiller added 1 commit 2026-06-30 18:52:48 +00:00
docs: update changelog with cancel stalled and pre-update modal
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 4s
Generic: Project CI / Lint & Validate (pull_request) Successful in 11s
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 3s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 11s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 29s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 34s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
4560ffb84b
Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
jmiller added 1 commit 2026-06-30 18:53:08 +00:00
chore(version): pre-release bump to 02.52.22-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 22s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 11m45s
8dac5a7448
jmiller merged commit 1db4015003 into main 2026-06-30 18:53:16 +00:00
jmiller deleted branch fix/cancel-stalled-backup 2026-06-30 18:53:17 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteBackup#197