-
Notifications
You must be signed in to change notification settings - Fork 54
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
Keep previous behavior for persistent binded paths #1984
Keep previous behavior for persistent binded paths #1984
Conversation
Signed-off-by: David Cassany <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1984 +/- ##
==========================================
+ Coverage 73.04% 73.05% +0.01%
==========================================
Files 74 74
Lines 8713 8719 +6
==========================================
+ Hits 6364 6370 +6
Misses 1831 1831
Partials 518 518 ☔ View full report in Codecov by Sentry. |
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.
Wondering if could be worth to add a unit test in utils_test.go to cover MirrorData... but maybe not after all, as is just the old SyncData (and the same as the actual SyncData but with the --delete 🤷🏼 ).
LGTM!
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.
Let's go to merge and test!
Yes I also wondered about it, then I realized that all lines of this method are actually covered by unit tests (kudos to codecov report), the only four lines that are not covered, are the error exits for mount command and they are already not covered... |
And I also think that in case of issue the Elemental CI should trap it quickly. |
With this patch the current (stable release) behavior of binded persistent paths is kept.
This commit adds a new rsync wrapper method (
MirrorData
) which includes the--delete
flag. Named mirror because it actually causes the target and source to have the same exact data causing the deletion of any file already present in target that is not present in source. This is the behavior we want when dumping the image root-tree to a new snapshot.Current behavior updates at early boot all files in a given path from the image to the persisted path. This includes a couple of non obvious behaviors:
Fixes #1982