T-BDRY-platform-server-backup-schedule-flag
State: closed/done · Impact: medium · Complexity: small
Let the headless server run scheduled backups, so the backup e2e suite can test the schedule on the web build.
| Location | Role today |
|---|---|
solutions/determined/crates/determined-platform/src/backup_schedule.rs | BackupScheduleService with pub async fn run(self: Arc<Self>, state: Arc<AppState>) |
solutions/determined/crates/determined-platform/src/lib.rs | AppState holds the service. The desktop shell spawns run |
solutions/determined/crates/determined-platform/src/bin/platform-server.rs | Parses --port, --dist, --state-dir, --vault. Never spawns the schedule |
Proposed
Section titled “Proposed”platform-server --backup-schedule spawns BackupScheduleService::run on the server’s runtime
after state is built. Without the flag, behaviour is unchanged.
Approach
Section titled “Approach”- Parse the switch with the existing
flag()helper. - When set, spawn
state.backup_schedule().clone().run(state.clone())on tokio. - Document the flag in the binary’s header comment.
| Area | Note |
|---|---|
solutions/determined/crates/determined-platform/src/bin/platform-server.rs | The flag |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: With
--backup-scheduleand a 1-minute schedule configured, a snapshot appears within two minutes on a scratch vault. - AC-2: Without the flag, no scheduled backup runs.
Out of scope
Section titled “Out of scope”- Changing schedule semantics or the minimum interval.
Dependencies
Section titled “Dependencies”- none.
Discovery context
Section titled “Discovery context”- The backup checklist includes the schedule. The web build had no way to run it.