fix: support configurable backup file prefix#83
Conversation
📝 WalkthroughWalkthroughChangesStorage prefix propagation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/tests/utils/file_tests.rs (1)
33-42: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the normalization edge cases.
Add cases for surrounding whitespace, empty/only-slash prefixes falling back to
backups, and nested prefixes. The current test proves only the default and one configured happy path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/tests/utils/file_tests.rs` around lines 33 - 42, Extend full_file_path_uses_default_or_configured_prefix to cover prefixes with surrounding whitespace, empty or slash-only values falling back to the backups prefix, and nested configured prefixes. Keep the existing default and configured-path assertions, and verify each resulting path still ends with the file name.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/tests/utils/file_tests.rs`:
- Around line 33-42: Extend full_file_path_uses_default_or_configured_prefix to
cover prefixes with surrounding whitespace, empty or slash-only values falling
back to the backups prefix, and nested configured prefixes. Keep the existing
default and configured-path assertions, and verify each resulting path still
ends with the file name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 44527110-f44f-4f2e-b2a5-f785b409a058
📒 Files selected for processing (8)
src/services/api/models/agent/status.rssrc/services/storage/providers/azure_blob/mod.rssrc/services/storage/providers/google_cloud_storage/mod.rssrc/services/storage/providers/google_drive/mod.rssrc/services/storage/providers/local.rssrc/services/storage/providers/s3/mod.rssrc/tests/utils/file_tests.rssrc/utils/file.rs
* fix: support configurable backup file prefix (#83) * fix: backup folder name * fix: ghcr publish agent image --------- Co-authored-by: Antonin Jousson <18756890+Antoninj@users.noreply.github.com> Co-authored-by: charles-gauthereau <charles.gauthereau@soluce-technologies.com>
Summary
Consumes the optional
prefixincluded with each storage channel in the dashboard-to-agent status payload.backupsas the default when the field is absent, for compatibility with existing dashboards.Coordinated changes
Deploy this PR together with the dashboard change before setting a custom prefix.
Validation
Not run locally:
cargois unavailable in the development environment.Summary by CodeRabbit
New Features
backupspath when no prefix is configured.Tests