-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cache if a backup file is missing #5596
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request introduces enhanced error handling and cache management for backup operations across multiple files in the supervisor's backup system. The changes focus on improving the system's response when backup files are missing, implementing a mechanism to reload backup locations dynamically. This involves modifications to the backup manager, API, and associated test cases to ensure robust handling of scenarios where backup files might be deleted or become unavailable. Changes
Sequence DiagramsequenceDiagram
participant User
participant APIBackups
participant BackupManager
participant BackupSystem
User->>APIBackups: Request backup download
alt Backup file exists
APIBackups->>BackupSystem: Download backup file
BackupSystem-->>User: Provide backup file
else Backup file missing
APIBackups->>BackupManager: Reload backup locations
BackupManager->>BackupSystem: Refresh backup state
APIBackups-->>User: Return 404 Not Found
end
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
tests/backups/test_manager.py
(4 hunks)tests/misc/test_tasks.py
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/backups/test_manager.py
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build armv7 supervisor
- GitHub Check: Build armhf supervisor
- GitHub Check: Build aarch64 supervisor
- GitHub Check: Run tests Python 3.13.1
Proposed change
If while processing a backup call we find an expected file is missing, trigger a cache reload of that location as it has likely been modified by the client.
Type of change
Additional information
Checklist
ruff format supervisor tests
)If API endpoints or add-on configuration are added/changed:
Summary by CodeRabbit
New Features
Bug Fixes
Tests