Repository navigation
11460 remove cloud project from db when overwritten as local - #11648
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change separates cloud-record cleanup from local saving so overwriting a local copy of a cloud project can complete without the reported save error. No merge-blocking risk is currently identified. Sequence Diagram(s)sequenceDiagram
participant ProjectActionsController
participant CloudProjectsProvider
participant AudioComService
participant Project
ProjectActionsController->>CloudProjectsProvider: Check destination path
CloudProjectsProvider-->>ProjectActionsController: Return cloud-project record
ProjectActionsController->>AudioComService: Delete cloud-project record
ProjectActionsController->>Project: Save project locally
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Warning Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped 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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: e9617302-622e-4fd7-8a9c-fb97d8ce2616
📥 Commits
Reviewing files that changed from the base of the PR and between 36b8647 and 2978455403a4f005f554df250b46082dcec59a76.
📒 Files selected for processing (2)
src/project/internal/projectactionscontroller.cppsrc/project/internal/projectactionscontroller.h
| const Ret deleteRet = audioComService()->deleteCloudProject(filePath); | ||
| if (!deleteRet) { | ||
| LOGW() << deleteRet.toString(); | ||
| } | ||
| } | ||
|
|
||
| return doSaveProjectLocally(filePath, saveMode); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Make cloud cleanup failure-safe.
deleteCloudProject(filePath) can fail, but this branch only logs the failure and still calls doSaveProjectLocally. If the local save succeeds, saveProjectLocally returns true while the destination still has a cloud-project record. Return failure and skip the local save when deletion fails.
The current order has the opposite failure mode. If doSaveProjectLocally fails after deletion succeeds, the cloud record is already gone and no local replacement exists. Preserve the record until the local save succeeds, or add rollback or transaction handling.
Minimum failure-path fix
if (!deleteRet) {
LOGW() << deleteRet.toString();
+ return false;
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const Ret deleteRet = audioComService()->deleteCloudProject(filePath); | |
| if (!deleteRet) { | |
| LOGW() << deleteRet.toString(); | |
| } | |
| } | |
| return doSaveProjectLocally(filePath, saveMode); | |
| const Ret deleteRet = audioComService()->deleteCloudProject(filePath); | |
| if (!deleteRet) { | |
| LOGW() << deleteRet.toString(); | |
| return false; | |
| } | |
| } | |
| return doSaveProjectLocally(filePath, saveMode); |
If we try to overwrite a cloud project using save as local now we remove the project from the database and save it as a local project.
2978455 to
9e199e5
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
11460 remove cloud project from db when overwritten as local (#11648)
Resolves: #11460
If we try to overwrite a cloud project using save as local now we remove the project from the cloud database and save it as a local project instead.
Recommended:
QA: