-
Notifications
You must be signed in to change notification settings - Fork 594
feat(snapshots): added support for per-directory splitter overrides #3887
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3887 +/- ##
==========================================
+ Coverage 75.86% 77.18% +1.32%
==========================================
Files 470 481 +11
Lines 37301 28795 -8506
==========================================
- Hits 28299 22226 -6073
+ Misses 7071 4668 -2403
+ Partials 1931 1901 -30 ☔ View full report in Codecov by Sentry. |
julio-lopez
left a comment
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.
LGTM ✅
🥇Thanks for splitting the PR in easily reviewable commits. It made it so much easier. Thanks again!
| var splitFactory splitter.Factory | ||
|
|
||
| if opt.Splitter != "" { | ||
| splitFactory = splitter.GetFactory(opt.Splitter) |
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.
nit: if the specified splitter is not found, then this silently falls back to the default. This may be confusing since there's no error or warning. Is this logged anywhere?
| //nolint:unparam | ||
| func (c *policySplitterFlags) setSplitterPolicyFromFlags(ctx context.Context, p *policy.SplitterPolicy, changeCount *int) error { | ||
| if v := c.policySetSplitterAlgorithmOverride; v != "" { | ||
| if v == inheritPolicyString { |
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.
Q: IIUC, inheritPolicyString is used in order for resetting a policy setting when it was already set in a child, is that the case? Otherwise, what's the difference between "inheriting" and an unset value?
| lines = compressSpaces(lines) | ||
| require.Contains(t, lines, " Algorithm override: FIXED-4M (defined for this target)") | ||
|
|
||
| e.RunAndExpectSuccess(t, "policy", "set", td, "--splitter=inherit") |
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.
I guess this answers my previous (above) question
This is useful when backing up directories that have giant files aligned at MiB boundary, such as VM disk backups, etc.