-
Notifications
You must be signed in to change notification settings - Fork 749
[GOBBLIN-2234] Fix removal of existing ACLs issue for path existing in destination #4149
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
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.
Pull Request Overview
This PR adds support for removing existing ACLs before setting new ones to ensure exact ACL matching between source and destination during file copy operations. The key change is the introduction of a removeExistingAcls parameter to prevent ACL accumulation when copying files.
- Added a new overloaded
setPathPermissionmethod with aremoveExistingAclsparameter - Updated
CopyDataPublisherto use the new parameter withremoveExistingAcls=trueto ensure exact ACL matching - Enhanced the test infrastructure with comprehensive test coverage for ACL removal scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| FileAwareInputStreamDataWriter.java | Added overloaded setPathPermission method with removeExistingAcls parameter and logic to call removeAcl when needed |
| CopyDataPublisher.java | Updated to pass removeExistingAcls=true when preserving file attributes to ensure exact ACL matching |
| FileAwareInputStreamDataWriterTest.java | Added 9 new test cases for ACL removal scenarios and enhanced TestLocalFileSystem to track removeAcl calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterTest.java
Outdated
Show resolved
Hide resolved
9eb40ba to
da5dbbd
Compare
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
ACLs are not removed if a source directory already exists in destination. As part of this PR, we are fixing the issue.
Tests
Added multiple unit tests
Commits