Skip to content

Conversation

@umustafi
Copy link
Contributor

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):

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Gobblin safeSetPathPermission does not throw an exception when setting permissions fail on a path. We want to change this behavior especially for use cases like manifest distcp where hundreds of thousands of files are involved in a distcp job and permission settings are important to replicate correctly as they cannot be updated or verified by hand. 
    This PR adds a new configuration to fail writing or publishing tasks when the job is configured to report success when permissions are not replicated properly. The default behavior remains the same as before to allow the job to succeed without this for backwards compatibility. 

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"

public static final String GOBBLIN_COPY_TASK_OVERWRITE_ON_COMMIT = "gobblin.copy.task.overwrite.on.commit";
public static final boolean DEFAULT_GOBBLIN_COPY_TASK_OVERWRITE_ON_COMMIT = false;
public static final String GOBBLIN_COPY_REQUIRE_PERMISSION_SET_FOR_SUCCESS = "gobblin.copy.requirePermissionSetForSuccess";
public static final boolean DEFAULT_COPY_REQUIRE_PERMISSION_SET_FOR_SUCCESS = false;
Copy link
Contributor

@phet phet Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when wouldn't one want failure? I'd be more aggressive in choosing the default. while it does require a config change, one can always easily revert to the legacy semantics.

so while not b/w-compat, quite easily opted-into, as desired

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I was also debating making the default true instead. I'll change.

Copy link
Contributor

@phet phet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great improvement!

protected final boolean preserveDirModTime;
protected final boolean resyncDirOwnerAndPermission;
protected final boolean requirePermissionSetForSuccess;
protected final boolean shouldFailWhenPermissionFail;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: when permissions fail (preferred!) or when permission fails

@Will-Lo Will-Lo merged commit 62f645c into apache:master Apr 19, 2024
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.

3 participants