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
Restore inconsistent timestamps permissions #2906
Restore inconsistent timestamps permissions #2906
Conversation
36f6b20
to
498d802
Compare
I have push a proper solution that doesn't have side effect of trying to restore unwanted directory. This broke a test case, causing leaveDir call more that one time, but I'm not sure to understand this test...
|
05229ae
to
bdfe7eb
Compare
bdfe7eb
to
b85ef1f
Compare
Continuous integration fail on windows, I have try to fix it without success. Would love little help, I don't understand why this fail on windows. |
@kitone My guess would be that |
b85ef1f
to
b42df1e
Compare
@MichaelEischer thank you! You right, ToSlash fix the select filter on windows. I will try to add a simple test case for windows. |
integration for unix and windows are green. I guess we could merge both new case into Let me know if you think it's better to do that or let this separate for more specific test for the future. |
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.
The fix itself looks good to me. The debug logging could be a bit less verbose (see comment) and the test implementation has to be unified between Unix and Windows. And this PR also needs a changelog entry.
40ec971
to
8a2711f
Compare
8ba1f3d
to
cbedef3
Compare
cbedef3
to
995bbad
Compare
…ions. Keep track of restored child status so parent and root directory not selected by filter will also restore metadata when traversing tree.
995bbad
to
d16ea38
Compare
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 quickly fixing all our comments :-) .
I've rebased the branch to the current master and renamed the changelog file to issue-1212
.
d16ea38
to
0525640
Compare
What does this PR change? What problem does it solve?
Fix inconsistent timestamps/permissions during restore in some case
Was the change discussed in an issue or in the forum before?
#1212
Checklist
I have added documentation for the changes (in the manual)changelog/unreleased/
that describes the changes for our users (template here)gofmt
on the code in all commitsInformation
The current implementation of restore code using two pass does not restore the metadata of all elements.
I will use a simplified reproductible script to reduce the log/debug
you can find the complet reproductible script (thanks to @deviantintegral) there #1212 (comment)
About the change :
but introduce a bad behaviour, trying to restore metadata on a file/dir not selected for restore.
ignoring error for /test/bar: UtimesNano: no such file or directory
The simplified script, show that metadata on the root directory isn't restored
The logs show that leaveDir is never executed, this is why the metadata of the root directory and in some case isn't restored.
I guess, also because we use MkdirAll, so when we pass on
"/test/dir1"
but restoring with---include 'file1'
childMayBeSelected
is equal to true, but the leaveDir is only executed onselectedForRestore
The solution is to keep track of restored child status so parent and root directory not selected by filter will also restore metadata when traversing the tree.