-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix: check overlapping paths separately for directories and contents #343
fix: check overlapping paths separately for directories and contents #343
Conversation
Signed-off-by: German Lashevich <[email protected]>
Signed-off-by: German Lashevich <[email protected]>
@Zebradil I think you are trying to do the same thing what @fritzduchardt has done in this PR #325 I have added a solution as well there if that fulfil your requirements. Else we will have more discussion on this in next community meeting to have a final decision wether we want this change or not. |
Hi @kumaritanushree, thank you for looking into this. I saw #325 before creating this PR, but my proposal differs. The PR from @fritzduchardt proposes to allow the same paths to be managed by different I've been using vendir for more than three years and I always was sure that one path could be managed only by one |
Let us talk about this in tomorrow's community meeting @fritzduchardt @Zebradil if yll can attend |
Signed-off-by: German Lashevich <[email protected]>
Signed-off-by: German Lashevich <[email protected]>
Signed-off-by: German Lashevich <[email protected]>
@joaopapereira as we agreed in the community meeting, I went ahead and:
I'm unsure about the last point, but I don't see much value in having an example of incorrect configuration (I bet, code copilots learn from it 😄). |
Changes looks good to me. Tested, error message also looks good. |
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
This PR fixes the logic of the overlapping paths check. In the original versions, paths of directories were joined with paths of their contents before the check. This allowed the following configuration to be accepted:
The result of
vendir sync
would be:One of the contents is overwritten by the other.
With this PR, having the same paths for two directories will result in an error.