Skip to content

GET /operations: what runs on the box's apps - #8

Merged
inkly merged 4 commits into
mainfrom
feat/operations-route
Sep 24, 2026
Merged

inkly merged 4 commits into
mainfrom
feat/operations-route

Conversation

@inkly

@inkly inkly commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Lists the operations in progress (backups, restores, installs, updates, git app operations, settings changes), so the core's automatic updates never stop the services in the middle of one. Spec: ReCasaOS/CasaOS docs/superpowers/specs/2026-09-24-auto-update-design.md.

RunningOperations reads the registry every operation already goes
through (Begin): each held app once, sorted by name, with the kind of
operation holding it, and an empty list when nothing runs. The core
reads it before it updates the box by itself.
GET /v2/app_management/operations answers {"operations": [{"app",
"kind"}]} from RunningOperations: an empty list when nothing runs. It
sits behind the JWT like every route; the core calls it with the
per-boot secret, which the skipper already accepts. The kind is a plain
string, not an enum, so the generated enum constants stay at 34.
RunningOperations read only what Begin holds, and several backups take no
hold: an app copied running (hold_still off, or an app that answers DNS),
the box's own backup and restore, which hold services, and the retention
that purges old runs once the backup has let go of its app. While any of
them ran the core read an empty list and could start install.sh, which
stops app-management in the middle of the copy.

markInProgress is a mark beside Begin that never refuses: RunBackup,
RestoreBackup, RunSystemBackup, RestoreSystemBackup and ApplyRetention
set it for as long as they run. RunningOperations merges it with the
holds, one entry per app, the hold's kind first. ApplyRetention carries
the mark itself, so the purge after an on-demand backup is covered as
well as the scheduled one.
The description said the route read the registry every operation goes
through, which a hot backup, the box's own backup and restore and the
retention purge never did. It now names what is listed: what holds an
app, and every backup and restore in progress whether or not it holds
one, the box's under casaos-system. Descriptions only: the generated
enum constants stay at 34.
@inkly
inkly merged commit 5efbfc0 into main Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant