Repository navigation
Conversation
…ping Scheduled system backups and system-managed volume backups share one admission and both default to 03:00. The one that started second was skipped, and the Activity Center reported the skip as a success. Scheduled runs now wait for the admission, up to six hours, and fail visibly if it never frees. Manual runs still return a conflict right away. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ention Scheduled runs now take the admission before reading their policy, so a policy edited or disabled during the wait is respected. Retention and runs resumed after a restart wait for the admission too. Before this, retention failed and marked a successful backup as failed whenever the other scheduled job grabbed the admission first, and a resumed backup could lose the admission to a redelivered waiting job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
🔍 Code ReviewPR #4876 · 1 · Retention fails after a scheduled backup when the other job waits
2 · Resume after restart can lose the admission to a waiting run
Low and informational (1)
🤖 Claude Opus 5.5 (High) · T3 Code (Claude Code) · Round 1 of 3 |
…starts A manual system-managed volume backup started while another backup runs returns not-found or validation errors again instead of the conflict. Scheduled runs already hold the admission before calling prepare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
🔍 Code ReviewPR #4876 · Low and informational (1)
🤖 Claude Opus 5.5 (High) · T3 Code (Claude Code) · Round 2 of 3 |
Manual system and volume backup workflows run one task at a time, and a new manual start parks the admission for its queued task. A resumed manual run that waited for the admission would block on that task until the six-hour timeout, so manual resumes fail fast again. Scheduled policy workflows never park the admission, so their resumes still wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
kmendell
approved these changes
Nov 18, 2026
neurekadev
added a commit
to neurekadev/arcane
that referenced
this pull request
Nov 18, 2026
getarcaneapp#4876 merged as 40e65a7. Resolved the conflict by keeping upstream's removal of the admissionWait comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
PR 1 of 2. Merge in order: #4876 → #4879.
Checklist
mainbranchm.*()) (no new strings)What This PR Implements
Fixes: #4874
The scheduled system backup and the system-managed volume backups share the system backup admission and both default to
0 3 * * *. Whichever started second only tried the admission, returnedRunStatusSkipped, and was never retried.jobActivityshowsSkippedas a success, so a backup that never ran looked fine.Scheduled runs now wait for the admission, so overlapping schedules run one after the other. If the admission doesn't free within six hours, the run fails with a timeout error, which shows as a failed activity instead of a skip. Manual runs still return the 409 conflict immediately, which the user sees.
Changes Made
internal/backup: newEngine.AwaitRun. It tries the admission, logs when it has to wait, then blocks onAdmission.Acquire(the same wait GitOps syncs use) up toadmissionWait(6h), and returnsErrTimeoutwhen that runs out.system/children/backup:runScheduledBackuptakes the admission first, then reads and checks the policy under it, so a policy edited or disabled during the wait is respected.CreateBackup(its only caller) is folded in.applyRetentionwaits for the admission instead of a single try. Otherwise it failed, and marked the successful backup as failed, whenever the other scheduled job grabbed the admission first.reconcileBackuptakes its acquire step from the caller. A scheduled resume after a restart waits, and a manual resume still fails fast.system/children/backup/children/volumes:runScheduledSystemVolumeBackuptakes the admission first and passes it toprepareSystemVolumeBackups.Startkeeps the immediatealreadyRunningconflict, and validation and not-found errors still come first.backUpSelectionstill takes a parked manual claim. Without one, a resumed scheduled run waits and a manual run fails fast.Why waiting is deadlock-free: the two policy workflows have separate
Concurrency: 1slots, a waiting step holds no lease, and nothing that runs under the admission tries to take it again.Testing Done
just format go,just lint backend(0 issues),go build -tags exclude_frontend ./....go test ./internal/backup/... ./internal/system/... ./internal/scheduler/runs/...passes.TestAwaitRunWaitsForConflictingRun. A held admission blocks the waiter, which is admitted once the holder releases, and a canceled wait returns the context error. The test passes with-count=3.AI Tool Used (if applicable)
Claude Code (Claude Opus 5.5) investigated this, wrote the code and test, and drafted this description, at my direction.
Additional Context
volume/children/backup/children/policies) still skip when a backup of the same volume is running. That's tracked separately.🤖 Generated with Claude Code
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.

Confidence Score: 5/5
The PR appears safe to merge based on this follow-up review.Summary
Scheduled system and system-managed volume backups now wait their turn instead of skipping when another backup is running. Manual requests still fail fast when busy.
Reviews (7) · Last reviewed commit: "Apply suggestion from @kmendell" · Reviewed by Greptile