-
Notifications
You must be signed in to change notification settings - Fork 11.9k
[ISSUE #3281]fix fail to delete topic perm list and global white address(#3128) #3280
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3280 +/- ##
=============================================
+ Coverage 48.02% 48.08% +0.05%
- Complexity 4564 4575 +11
=============================================
Files 552 552
Lines 36536 36589 +53
Branches 4822 4826 +4
=============================================
+ Hits 17546 17592 +46
- Misses 16768 16773 +5
- Partials 2222 2224 +2
Continue to review full report at Codecov.
|
Can you resolve the codes' conflicts in your local enviroments. @yuz10 |
resolved. @zongtanghu |
I see the travis ci test failed. Please check the reason of travis ci failed. @yuz10 |
The tests are fixed |
@yuz10 Generally speaking, one pr solves the one issue. I am confused by your topic. could you clarify why you involve a big pr to solve so many problems, although I see we really have many problems in the ACL module? |
@vongosling UtilAll.string2List is invoked by both topicPerms and globalWhiteAddrs,and modify the function can solve two issue s. The other issue, "updateAclConfig in all brokers" can be seperated, If you request |
I hope to see changes to UtilAll class, and you'll have a new idea right away. That's we could gradually strip out some of the cohesive functions to form new proprietary tool classes :-) We don't need such a God class, string2list is also confused :-( |
@vongosling I have removed some confusing functions from the UtilAll class. |
private static String join(List<String> list, String splitter) { | ||
if (list == null) { | ||
return null; | ||
} | ||
StringBuilder str = new StringBuilder(); | ||
for (int i = 0; i < list.size(); i++) { | ||
str.append(list.get(i)); | ||
if (i == list.size() - 1) { | ||
break; | ||
} | ||
str.append(splitter); | ||
} | ||
return str.toString(); | ||
} |
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.
Maybe, you put this function into UtilAll or AclUtils class is better!
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.
Thanks for your advice, I have moved this two functions to UtilAll
private static List<String> split(String str, String splitter) { | ||
if (str == null) { | ||
return null; | ||
} | ||
|
||
String[] addrArray = str.split(splitter); | ||
return Arrays.asList(addrArray); | ||
} |
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.
The code-review advice is the same as anthor one.
And you need to notice the coverage decrease issues!Maybe, add some more unit test case codes. |
…al white address(apache#3128) (apache#3280) * fix fail to remove topic/group permissions and global white address of acl config * update acl config for all brokers * refactor rename UtilAll.string2List and list2String * fix fail to remove whiteRemoteAddress of acl config
…al white address(apache#3128) (apache#3280) * fix fail to remove topic/group permissions and global white address of acl config * update acl config for all brokers * refactor rename UtilAll.string2List and list2String * fix fail to remove whiteRemoteAddress of acl config
Make sure set the target branch to
develop
What is the purpose of the change
#3281 fix fail to delete topic perm list
#3128 still cant delete global white address
- the pr #3132 missed the client side, and its still sending null, resulting in global white address not updated
#3177 updateAclConfig in all brokers
- the pr #3184 only chages updateAclConfig, missed deleteAccessConfig and updateGlobalWhiteAddr
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.