[ 
https://issues.apache.org/jira/browse/KAFKA-7010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510335#comment-16510335
 ] 

ASF GitHub Bot commented on KAFKA-7010:
---------------------------------------

big-andy-coates opened a new pull request #5205: KAFKA-7010: Rename 
ResourceNameType to PatternType
URL: https://github.com/apache/kafka/pull/5205
 
 
   Fix for [KAFKA-7010](https://issues.apache.org/jira/browse/KAFKA-7010).
   
   The initial PR for KIP-290 #5117 added a new `ResourceNameType`, which was 
initially a field on `Resource` and `ResourceFilter`. However, follow on PRs 
have now moved the name type fields to new `ResourcePattern` and 
`ResourcePatternFilter` classes. This means the old name is no longer valid and 
may be confusing. The PR looks to rename the class to a more intuitive 
`resource.PatternType`.
   
   @cmccabe also requested that the current `ANY` value for this class be 
renamed to avoid confusion. `PatternType.ANY` currently causes 
`ResourcePatternFilter` to bring back all ACLs that would affect the supplied 
resource, i.e. it brings back literal, wildcard ACLs, and also does pattern 
matching to work out which prefix acls would affect the resource.  This is very 
different from the behaviour of `ResourceType.ANY`, which just means the filter 
ignores the type of resources. 
   
    `ANY` is to be renamed to `MATCH` to disambiguate it from other `ANY` 
filter types. A new `ANY` will be added that works in the same way as others, 
i.e. it will cause the filter to ignore the pattern type, (but won't do any 
pattern matching).
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Rename ResourceNameType.ANY to MATCH
> ------------------------------------
>
>                 Key: KAFKA-7010
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7010
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core, security
>            Reporter: Andy Coates
>            Assignee: Andy Coates
>            Priority: Major
>             Fix For: 2.0.0
>
>
> Following on from the PR 
> [#5117|[https://github.com/apache/kafka/pull/5117]...] and discussions with 
> Colin McCabe...
> The current ResourceNameType.ANY may be misleading as it performs pattern 
> matching for wildcard and prefixed bindings. Where as ResourceName.ANY just 
> brings back any resource name.
> Renaming to ResourceNameType.MATCH and adding more Java doc should clear this 
> up.
> Finally, ResourceNameType is no longer appropriate as the type is used in 
> ResourcePattern and ResourcePatternFilter. Hence rename to PatternType.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to