Skip to content

Add schedule-level timeout/retry controls for backup and cloud backup#238

Draft
Copilot wants to merge 2 commits into
developfrom
copilot/add-retries-for-backup-cloud-backup
Draft

Add schedule-level timeout/retry controls for backup and cloud backup#238
Copilot wants to merge 2 commits into
developfrom
copilot/add-retries-for-backup-cloud-backup

Conversation

Copy link
Copy Markdown

Copilot AI commented May 22, 2026

Scheduled backups could hang indefinitely, and cloud sync had no per-schedule retry policy. This PR adds schedule-configurable timeout/retry controls for both backup and cloud backup, and applies them at task execution time so timed-out attempts are retried before final failure.

  • Schema + persistence

    • Added backup_timeout_seconds, backup_retry_count, cloud_sync_timeout_seconds, cloud_sync_retry_count to schedules.
    • Added Alembic migration to persist new fields with retry defaults (0).
  • API/model wiring

    • Extended schedule create/update/read schemas and schedule creation validation to accept/normalize the new fields.
    • Passed these fields through schedule API/service layers into scheduled BackupRequest.
  • Task definition propagation

    • Extended TaskDefinitionBuilder to attach backup/cloud-sync timeout + retry values to task definitions.
    • Plumbed those values through JobService and scheduler-triggered job creation.
  • Execution behavior (backup + cloud sync)

    • Implemented timeout + retry loops in BackupTaskExecutor and CloudSyncTaskExecutor.
    • Each task now:
      • enforces per-task timeout (when configured),
      • retries up to configured count,
      • reports timeout/retry attempts in task output,
      • fails only after all attempts are exhausted.
  • UI updates (Schedules)

    • Added create/edit form inputs for backup/cloud timeout and retry counts.
    • Added schedule list summary line showing configured retry/timeout policy.
# Scheduled run now carries per-schedule execution policy
backup_request = BackupRequest(
    repository_id=repository.id,
    source_path=schedule.source_path,
    cloud_sync_config_id=schedule.cloud_sync_config_id,
    backup_timeout_seconds=schedule.backup_timeout_seconds,
    backup_retry_count=schedule.backup_retry_count,
    cloud_sync_timeout_seconds=schedule.cloud_sync_timeout_seconds,
    cloud_sync_retry_count=schedule.cloud_sync_retry_count,
)

Schedules UI with timeout/retry controls

Copilot AI changed the title [WIP] Add retries and timeout for backup and cloud backup Add schedule-level timeout/retry controls for backup and cloud backup May 22, 2026
Copilot AI requested a review from mlapaglia May 22, 2026 03:13
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.

[Feature request]: Adding retries for Backup and Cloud Backup

2 participants