KAFKA-9027, KAFKA-9028: Convert create/delete acls requests/response to use generated protocol#7725
Conversation
30101cc to
4a14ddd
Compare
8490c73 to
0657ddb
Compare
There was a problem hiding this comment.
Hmm. This part isn't quite right. We should be iterating over aclCreations, since that is what we actually sent out on the wire. Entries in acls may or may not have been sent out on the wire (if they were invalid, they weren't.)
I think we should remove the TODO comment about "duplicates"... since duplicates never get sent on the wire, they don't need to be handled here (if we iterate over the right collection)
There was a problem hiding this comment.
I think you assumed this was complete, it's WIP as the commit message says: 755a6f2
The TODO is also a hint of the same. :)
There was a problem hiding this comment.
This is another case that needs to be fixed. The simplest way would be just creating a list which contains all the AclBindingFilter objects that were sent on the wire (it seems that the incorrect decision to use filters in this PR was caused by the change in type in filterList from AclBindingFilter to DeleteAclsRequestData.DeleteAclsFilter)
There was a problem hiding this comment.
Again, this was not complete and hence why there was a FIXME in it. ;)
There was a problem hiding this comment.
I was surprised by this when I read it, and had to think back to why we did this :) It would be good to add a comment about why we're doing this, I think. The explanation would be something like this: on older brokers, no pattern types existed except LITERAL (effectively...). So even though ANY is not directly supported on those brokers, we can get the same effect as ANY by setting LITERAL on those particular brokers.
There was a problem hiding this comment.
Also, it's really ugly for "validate" to mutate the request. Can we have another function for this... 🙏
There was a problem hiding this comment.
@cmccabe Older brokers supported LITERAL and *, right?
There was a problem hiding this comment.
"*" is considered "LITERAL" for compatibility reasons
0657ddb to
c6c81e9
Compare
…ated protocol Also add support for flexible versions to both protocol types.
c6c81e9 to
b0f13b0
Compare
Also use assertThrows instead of expected attribute in Test annotation.
With DeleteAclsRequest and respective tests
e70688f to
44bf6d1
Compare
|
This should be ready to review once the tests complete. |
|
1 failure in one job and 4 in the other. All unrelated to this PR. |
|
retest this please |
1 similar comment
|
retest this please |
|
2 flaky failures in one job and 1 in another. |
|
retest this please |
rajinisivaram
left a comment
There was a problem hiding this comment.
@ijuma Thanks for the PR, LGTM
|
More unrelated flaky failures: JDK 11:
JDK 8:
|
|
I cherry-picked this to 2.5 so that describe/create/delete ACLs are all bumped at the same time. |
…to use generated protocol (#7725) Also add support for flexible versions to both protocol types. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Colin Patrick McCabe <cmccabe@apache.org> Co-authored-by: Rajini Sivaram <rajinisivaram@googlemail.com> Co-authored-by: Jason Gustafson <jason@confluent.io>
Conflicts related to version bump in AK, replaced 2.6 with 6.0: * gradle.properties * __init__.py * version.py * apache-github/trunk: KAFKA-9490: Fix generics for Grouped (apache#8028) Bump trunk to 2.6.0-SNAPSHOT (apache#8026) KAFKA-9027, KAFKA-9028: Convert create/delete acls requests/response to use generated protocol (apache#7725) MINOR: Refactor CheckpointFile to improve testability (apache#7391) MINOR: updated documentation where RocksDBStore was being used as the sample class for byte[] versus Bytes examples (apache#5884)
…to use generated protocol (apache#7725) Also add support for flexible versions to both protocol types. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Colin Patrick McCabe <cmccabe@apache.org> Co-authored-by: Rajini Sivaram <rajinisivaram@googlemail.com> Co-authored-by: Jason Gustafson <jason@confluent.io>
Also add support for flexible versions to both protocol types.
Co-authored-by: Rajini Sivaram rajinisivaram@googlemail.com
Co-authored-by: Jason Gustafson jason@confluent.io
Committer Checklist (excluded from commit message)