You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by Zoltan-Szekeres <gi...@git.apache.org> on 2017/05/16 23:02:27 UTC

[GitHub] curator pull request #223: [CURATOR-362] Use provided ACL when creating pare...

GitHub user Zoltan-Szekeres opened a pull request:

    https://github.com/apache/curator/pull/223

    [CURATOR-362] Use provided ACL when creating parent directories

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/szekizoli/curator CURATOR-362

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/223.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #223
    
----
commit f33142f3727cf1b8cd76fa13f6493bb603019cc0
Author: szekizoli <sz...@gmail.com>
Date:   2017-05-16T22:27:56Z

    [CURATOR-362] Use provided ACL when creating parent directories

commit f6450fd9f0c87e00d6fc0223b027b15e2e36fe44
Author: szekizoli <sz...@gmail.com>
Date:   2017-05-16T23:01:15Z

    [Curator-362] Cover case when no ACL list is provided to CreateBuilder

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the issue:

    https://github.com/apache/curator/pull/223
  
    What's the status of this PR? I'd like to get a release out.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the issue:

    https://github.com/apache/curator/pull/223
  
    Sounds good to me, thanks @szekizoli 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the issue:

    https://github.com/apache/curator/pull/223
  
    I'm not certain this is the correct behavior. The API contract implies only that the ACL is set for the node being created. The ACL provider's job is to manage any other nodes. This might be a breaking change for existing clients. I'm -1 on this. I'm curious what other committers think.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request #223: [CURATOR-362] Use provided ACL when creating pare...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on a diff in the pull request:

    https://github.com/apache/curator/pull/223#discussion_r123912201
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/imps/ExistsBuilderImpl.java ---
    @@ -185,7 +185,7 @@ public Stat forPath(String path) throws Exception
                 OperationAndData<String> operationAndData = new OperationAndData<String>(this, path, backgrounding.getCallback(), null, backgrounding.getContext(), watching);
                 if ( createParentContainersIfNeeded || createParentsIfNeeded )
                 {
    -                CreateBuilderImpl.backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData(), backgrounding, createParentContainersIfNeeded);
    +                CreateBuilderImpl.backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData(), backgrounding, client.getAclProvider(), createParentContainersIfNeeded);
    --- End diff --
    
    Should the ExistsBuilder have the ability to set the ACL provider for the parent containers as well, given that the we provide the option of creating parent containers?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the issue:

    https://github.com/apache/curator/pull/223
  
    We can add a new method to `ACLable`:
    
    ```
    public interface ACLable<T>
    {
        public T withACL(List<ACL> aclList);
    
        public T withACL(List<ACL> aclList, boolean applyToParents);
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the issue:

    https://github.com/apache/curator/pull/223
  
    I agree that this is now a 'feature' that the parents don't have the ACL set. Perhaps we need to introduce another option to set the ACL on the parents?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by szekizoli <gi...@git.apache.org>.
Github user szekizoli commented on the issue:

    https://github.com/apache/curator/pull/223
  
    I can prepare an update with the ability to add an ACL provider on the ExistsBuilder if createParentNodesIfNeeded() is called, if you think that's required for this change. It seems more consistent to me with having the option to set the ACL.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request #223: [CURATOR-362] Use provided ACL when creating pare...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/curator/pull/223


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by szekizoli <gi...@git.apache.org>.
Github user szekizoli commented on the issue:

    https://github.com/apache/curator/pull/223
  
    I agree that introducing a new behavior is better through a new method. If everyone likes this solution, I'll implement it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the issue:

    https://github.com/apache/curator/pull/223
  
    Yes, please. If you do it today it can be in the next release.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request #223: [CURATOR-362] Use provided ACL when creating pare...

Posted by szekizoli <gi...@git.apache.org>.
Github user szekizoli commented on a diff in the pull request:

    https://github.com/apache/curator/pull/223#discussion_r124414693
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/imps/ExistsBuilderImpl.java ---
    @@ -185,7 +185,7 @@ public Stat forPath(String path) throws Exception
                 OperationAndData<String> operationAndData = new OperationAndData<String>(this, path, backgrounding.getCallback(), null, backgrounding.getContext(), watching);
                 if ( createParentContainersIfNeeded || createParentsIfNeeded )
                 {
    -                CreateBuilderImpl.backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData(), backgrounding, createParentContainersIfNeeded);
    +                CreateBuilderImpl.backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData(), backgrounding, client.getAclProvider(), createParentContainersIfNeeded);
    --- End diff --
    
    I think yes, it'd better if one can set the ACL as well with the option of creating parents, because the ability to set the ACL when creating a node is the expected behaviour.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #223: [CURATOR-362] Use provided ACL when creating parent dire...

Posted by szekizoli <gi...@git.apache.org>.
Github user szekizoli commented on the issue:

    https://github.com/apache/curator/pull/223
  
    I've updated the PR. I've decided to add the withACL(List<ACL>, boolean) method to a new interface called `ParentACLable`, because it seemed to me that the applyToParents doesn't make sense in all case. For example, in the case of an ExistsBuilder, where only the parent nodes are created. But I have a version with the interface not split as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---