-
Notifications
You must be signed in to change notification settings - Fork 51
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
Added support for mod policies #45
Conversation
I have not looked through the code yet but quickly ran
|
@sykesm I can make those |
Okay, thanks. Give me a chance to review what's here before you make any changes. |
@sykesm Hello, did you have time to take a look on the code? |
I have not. It's been several months since I spent any time in this library so I'll need to become reacquainted with it before I can make any meaningful comments. I hope to get through it before the end of the week. |
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.
Overall, looks good. Style items that I've referenced as "nits" wouldn't hold up a merge by themselves but it would be good to take care of those while addressing the other comments.
The missing tests and the error contents are the larger items that need to be resolved.
After looking through this, I agree with the changes to remove the modification policy arguments from the methods. This is something I'll need to highlight in the release notes when we tag it.
Signed-off-by: Richard Felkl <richard.felkl@gmail.com>
@sykesm I've updated the PR and addressed all of the issues you mentioned. |
@@ -1268,6 +1268,7 @@ func TestOrdererConfigurationNoOrdererEndpoints(t *testing.T) { | |||
c := New(config) | |||
|
|||
ordererConf, err := c.Orderer().Configuration() | |||
// ordererConf.ModPolicy = AdminsPolicyKey |
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.
woops
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.
LGTM. Thanks for addressing the comments.
Type of change
Description
Added support for mod policies in config groups: Application, ApplicationOrg, Channel, ConsortiumOrg, Orderer, OrdererOrg. Previous implementation wasn't able to set mod policies which is beneficial when creating production grade custom channel configurations.
Additional details
The previous code was setting mod policies to
AdminModPolicyKey
by default. This behavior was retained so when the mod policy is not set manually it is automatically set toAdminModPolicyKey
.There are two incompatible changes in methods
SetPolicy
andSetPolicies
which omit first parameter calledmodPolicy
because it's not needed anymore. There is a new fieldModPolicy
inPolicy
struct instead of it.Those changes were tested in a production grade Fabric environment.