[CURATOR-362] Use provided ACL when creating parent directories#223
[CURATOR-362] Use provided ACL when creating parent directories#223asfgit merged 1 commit intoapache:masterfrom
Conversation
|
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. |
|
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? |
|
We can add a new method to |
|
I agree that introducing a new behavior is better through a new method. If everyone likes this solution, I'll implement it. |
|
Sounds good to me, thanks @szekizoli |
c2873af to
e9b3ce8
Compare
cammckenzie
left a comment
There was a problem hiding this comment.
Looks good to me, I just wonder if we need to provide the ACL functionality for the exists builder also given it contains creating parent containers functionality?
| if ( createParentContainersIfNeeded || createParentsIfNeeded ) | ||
| { | ||
| CreateBuilderImpl.backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData(), backgrounding, createParentContainersIfNeeded); | ||
| CreateBuilderImpl.backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData(), backgrounding, client.getAclProvider(), createParentContainersIfNeeded); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
What's the status of this PR? I'd like to get a release out. |
|
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. |
|
Yes, please. If you do it today it can be in the next release. |
|
I've updated the PR. I've decided to add the withACL(List, boolean) method to a new interface called |
CURATOR-362 - Cover case when no ACL list is provided to CreateBuilder CURATOR-362 - Use provided ACL for creating parents in background operation CURATOR-362 - Use provided ACL for creating parents in background operation
No description provided.