Skip to content

Conversation

@abhishekmjain
Copy link
Contributor

@abhishekmjain abhishekmjain commented Oct 30, 2025

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

  • Here are some details about my PR, including screenshots (if applicable):
    ACLs are not removed if a source directory already exists in destination. As part of this PR, we are fixing the issue.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Added multiple unit tests

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@Blazer-007 Blazer-007 requested a review from Copilot October 30, 2025 07:26
Copy link

Copilot AI left a 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 setPathPermission method with a removeExistingAcls parameter
  • Updated CopyDataPublisher to use the new parameter with removeExistingAcls=true to 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.

@abhishekmjain abhishekmjain merged commit 858f706 into apache:master Nov 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants