- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.2k
[KIP-482]: Update Describe Configs to v4 #5200
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -7855,6 +7855,48 @@ rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry); | |
| RD_EXPORT int | ||
| rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry); | ||
|  | ||
| /** | ||
| * @enum rd_kafka_ConfigType_t | ||
| * @brief Apache Kafka config types. | ||
| */ | ||
| typedef enum rd_kafka_ConfigType_t { | ||
| RD_KAFKA_CONFIG_UNKNOWN = 0, | ||
| RD_KAFKA_CONFIG_BOOLEAN = 1, | ||
| RD_KAFKA_CONFIG_STRING = 2, | ||
| RD_KAFKA_CONFIG_INT = 3, | ||
| RD_KAFKA_CONFIG_SHORT = 4, | ||
| RD_KAFKA_CONFIG_LONG = 5, | ||
| RD_KAFKA_CONFIG_DOUBLE = 6, | ||
| RD_KAFKA_CONFIG_LIST = 7, | ||
| RD_KAFKA_CONFIG_CLASS = 8, | ||
| RD_KAFKA_CONFIG_PASSWORD = 9, | ||
| RD_KAFKA_CONFIG__CNT, | ||
| } rd_kafka_ConfigType_t; | ||
|  | ||
| /** | ||
| * @returns the config type. | ||
| * | ||
| * @param entry Entry to get type for. | ||
| * | ||
| * @remark The lifetime of the returned entry is the same as \p conf . | ||
| * @remark Shall only be used on a DescribeConfigs result, | ||
| * otherwise returns RD_KAFKA_CONFIG_UNKNOWN. | ||
| */ | ||
| RD_EXPORT const rd_kafka_ConfigType_t | ||
| rd_kafka_ConfigEntry_type(const rd_kafka_ConfigEntry_t *entry); | ||
|  | ||
| /** | ||
| * @returns the config documentation. | ||
| * | ||
| * @param entry Entry to get documentation for. | ||
| * | ||
| * @remark The lifetime of the returned entry is the same as \p conf . | ||
| 
     | ||
| * @remark Shall only be used on a DescribeConfigs result, | ||
| * otherwise returns NULL. | ||
| */ | ||
| RD_EXPORT const char * | ||
| rd_kafka_ConfigEntry_documentation(const rd_kafka_ConfigEntry_t *entry); | ||
|  | ||
|  | ||
| /** | ||
| * @returns the synonym config entry array. | ||
|  | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|  | @@ -2853,6 +2853,16 @@ rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, | |||||||||
| return (const rd_kafka_ConfigEntry_t **)entry->synonyms.rl_elems; | ||||||||||
| } | ||||||||||
|  | ||||||||||
| const rd_kafka_ConfigType_t | ||||||||||
| rd_kafka_ConfigEntry_type(const rd_kafka_ConfigEntry_t *entry) { | ||||||||||
| return entry->type; | ||||||||||
| } | ||||||||||
|  | ||||||||||
| const char * | ||||||||||
| rd_kafka_ConfigEntry_documentation(const rd_kafka_ConfigEntry_t *entry) { | ||||||||||
| return entry->documentation; | ||||||||||
| } | ||||||||||
|  | ||||||||||
|  | ||||||||||
| /**@}*/ | ||||||||||
|  | ||||||||||
|  | @@ -3662,12 +3672,15 @@ rd_kafka_DescribeConfigsResponse_parse(rd_kafka_op_t *rko_req, | |||||||||
| int32_t Throttle_Time; | ||||||||||
| rd_kafka_ConfigResource_t *config = NULL; | ||||||||||
| rd_kafka_ConfigEntry_t *entry = NULL; | ||||||||||
| int16_t api_version; | ||||||||||
|  | ||||||||||
| api_version = rd_kafka_buf_ApiVersion(reply); | ||||||||||
|  | ||||||||||
| 
      Comment on lines
    
      +3675
     to 
      3678
    
   
     | ||||||||||
| int16_t api_version; | |
| api_version = rd_kafka_buf_ApiVersion(reply); | |
| int16_t api_version = rd_kafka_buf_ApiVersion(reply); | 
    
      
    
      Copilot
AI
    
    
    
      Sep 22, 2025 
    
  
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 assignment to entry->type should cast config_type to rd_kafka_ConfigType_t for type safety, since config_type is declared as int8_t but the field expects rd_kafka_ConfigType_t.
| rd_kafka_buf_read_i8(reply, &config_type); | |
| entry->type = (rd_kafka_ConfigType_t)config_type; | 
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 parameter reference
\\p confis incorrect. It should reference\\p entrysince that's the actual parameter name for this function.