VCST-5088: Backup and Restore Improvements#883
Open
OlegoO wants to merge 6 commits into
Open
Conversation
feat: Backup and Restore Improvements
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2ac9b3e. Configure here.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
feat: Backup and Restore Improvements
References
QA-test:
Jira-link:
https://virtocommerce.atlassian.net/browse/VCST-5088
Artifact URL:
https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Catalog_3.1023.0-pr-883-950a.zip
Note
Medium Risk
Changes core import/upsert behavior for products, variations, configurations, and property values to avoid EF tracking races; regressions could affect backup/restore and batch saves if response-group loading or de-dupe logic is incorrect.
Overview
Improves backup/restore robustness by enforcing save-graph boundaries during import: products are saved without inline
Variations, variations are saved in separate batches afterward, and associations are stashed and written in a second pass.Adds a reusable
ImportStagehelper to run batch saves with stage-tagged progress/errors and per-item fallback (SkipItem), and updates all import stages (catalogs/categories/properties/property groups/dictionary items/measures/configurations) to use it and only upload binaries for successfully persisted entities.Hardens configuration and item upserts: introduces
ProductConfigurationResponseGroupand updates configuration loading to useInclude/ThenInclude(optionally loading referenced products only for read paths), narrowsLoadExistingEntitiesfor bothItemService(excludesVariations) andProductConfigurationService(excludes referenced products), fixesProductConfigurationOptionEntity.Patchto copySectionId/ProductId, and deletes cross-ownerPropertyValuerows before insert to preserve upsert semantics.API/repository surface tweaks include a
responseGroupquery parameter onGET /api/catalog/products/configurations/{id}and addingCancellationTokensupport toICatalogRepository.GetItemByIdsAsync(with test/sample updates). Developer docs add a new catalog domain model/save-graph reference and link it fromdocs/index.md.Reviewed by Cursor Bugbot for commit 950a2c7. Bugbot is set up for automated code reviews on this repo. Configure here.