@redpanda-data/docs-extensions-and-macros 4.12.3 → 4.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/process-context-switcher.js +1 -1
- package/package.json +1 -1
- package/tools/property-extractor/Makefile +2 -1
- package/tools/property-extractor/helpers/capitalize.js +13 -0
- package/tools/property-extractor/helpers/index.js +2 -0
- package/tools/property-extractor/helpers/length.js +11 -0
- package/tools/property-extractor/templates/property.hbs +69 -26
- package/tools/property-extractor/templates/topic-property-mappings.hbs +3 -6
- package/tools/property-extractor/templates/topic-property.hbs +57 -24
- package/tools/property-extractor/topic_property_extractor.py +10 -3
- package/tools/property-extractor/transformers.py +117 -64
- package/tools/property-extractor/COMPUTED_CONSTANTS.md +0 -173
- package/tools/property-extractor/tests/test_known_values.py +0 -617
- package/tools/property-extractor/tests/transformers_test.py +0 -451
|
@@ -205,7 +205,7 @@ module.exports.register = function ({ config }) {
|
|
|
205
205
|
function injectContextSwitcherToTargetPage(targetPage, contextSwitcher, currentPageResourceId, logger) {
|
|
206
206
|
// Check if target page already has context-switcher attribute
|
|
207
207
|
if (targetPage.asciidoc.attributes['page-context-switcher']) {
|
|
208
|
-
logger.
|
|
208
|
+
logger.info(`Target page ${buildResourceId(targetPage)} already has context-switcher attribute. Skipping injection to avoid overwriting existing configuration: ${targetPage.asciidoc.attributes['page-context-switcher']}`);
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
|
package/package.json
CHANGED
|
@@ -92,7 +92,8 @@ redpanda-git:
|
|
|
92
92
|
# --- Clone Tree-sitter grammar & generate parser ---
|
|
93
93
|
treesitter:
|
|
94
94
|
@echo "🌲 Ensuring tree-sitter-cpp grammar…"
|
|
95
|
-
@if [ ! -d "$(TREESITTER_DIR)" ]; then \
|
|
95
|
+
@if [ ! -d "$(TREESITTER_DIR)/.git" ]; then \
|
|
96
|
+
rm -rf "$(TREESITTER_DIR)"; \
|
|
96
97
|
git clone https://github.com/tree-sitter/tree-sitter-cpp.git "$(TREESITTER_DIR)"; \
|
|
97
98
|
fi
|
|
98
99
|
@echo "🔄 Ensuring tree-sitter-cpp is at compatible version v0.20.5…"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Capitalizes the first letter of a string
|
|
5
|
+
* @param {string} str - The string to capitalize
|
|
6
|
+
* @returns {string} The string with first letter capitalized
|
|
7
|
+
*/
|
|
8
|
+
module.exports = function capitalize(str) {
|
|
9
|
+
if (typeof str !== 'string' || str.length === 0) {
|
|
10
|
+
return str;
|
|
11
|
+
}
|
|
12
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handlebars helper to get the length of an array
|
|
3
|
+
* @param {Array} arr - The array
|
|
4
|
+
* @returns {number} The length of the array
|
|
5
|
+
*/
|
|
6
|
+
module.exports = function length(arr) {
|
|
7
|
+
if (!arr) return 0;
|
|
8
|
+
if (Array.isArray(arr)) return arr.length;
|
|
9
|
+
if (typeof arr === 'object' && arr.length !== undefined) return arr.length;
|
|
10
|
+
return 0;
|
|
11
|
+
};
|
|
@@ -61,7 +61,7 @@ endif::[]
|
|
|
61
61
|
|
|
62
62
|
{{/if}}
|
|
63
63
|
|
|
64
|
-
[cols="
|
|
64
|
+
[cols="1s,2a"]
|
|
65
65
|
|===
|
|
66
66
|
| Property | Value
|
|
67
67
|
|
|
@@ -70,10 +70,22 @@ endif::[]
|
|
|
70
70
|
|
|
71
71
|
{{#if enum}}
|
|
72
72
|
| Accepted values
|
|
73
|
-
|
|
|
73
|
+
|
|
|
74
|
+
ifndef::env-cloud[]
|
|
75
|
+
{{#each enum}}`{{this}}`{{#if (isEnterpriseEnum this ../x-enum-metadata)}} (Enterprise){{else}}{{#if ../is_enterprise}}{{#if (includes ../enterprise_restricted_value this)}} (Enterprise){{/if}}{{/if}}{{/if}}{{#unless @last}}, {{/unless}}{{/each}}
|
|
76
|
+
endif::[]
|
|
77
|
+
ifdef::env-cloud[]
|
|
78
|
+
{{#each enum}}`{{this}}`{{#unless @last}}, {{/unless}}{{/each}}
|
|
79
|
+
endif::[]
|
|
74
80
|
{{else}}{{#if items.enum}}
|
|
75
81
|
| Accepted values
|
|
76
|
-
|
|
|
82
|
+
|
|
|
83
|
+
ifndef::env-cloud[]
|
|
84
|
+
{{#each items.enum}}`{{this}}`{{#if (isEnterpriseEnum this ../items.x-enum-metadata)}} (Enterprise){{/if}}{{#unless @last}}, {{/unless}}{{/each}}
|
|
85
|
+
endif::[]
|
|
86
|
+
ifdef::env-cloud[]
|
|
87
|
+
{{#each items.enum}}`{{this}}`{{#unless @last}}, {{/unless}}{{/each}}
|
|
88
|
+
endif::[]
|
|
77
89
|
{{/if}}{{/if}}
|
|
78
90
|
{{#if (and minimum maximum)}}
|
|
79
91
|
|
|
@@ -93,31 +105,34 @@ endif::[]
|
|
|
93
105
|
{{/if}}
|
|
94
106
|
|
|
95
107
|
| Default
|
|
96
|
-
|
|
|
108
|
+
|
|
|
109
|
+
{{#if is_enterprise}}
|
|
97
110
|
ifdef::env-cloud[]
|
|
98
|
-
Available in the Redpanda Cloud Console
|
|
111
|
+
Available in the Redpanda Cloud Console{{#if cloud_readonly}} (read-only){{else if cloud_editable}} (editable){{/if}}
|
|
99
112
|
endif::[]
|
|
100
113
|
ifndef::env-cloud[]
|
|
101
114
|
`{{formatPropertyValue default type}}`{{#if default_human_readable}} ({{default_human_readable}}){{/if}}
|
|
102
|
-
endif::[]
|
|
115
|
+
endif::[]
|
|
116
|
+
{{else}}
|
|
103
117
|
ifdef::env-cloud[]
|
|
104
|
-
Available in the Redpanda Cloud Console
|
|
118
|
+
Available in the Redpanda Cloud Console{{#if cloud_readonly}} (read-only){{else if cloud_editable}} (editable){{/if}}
|
|
105
119
|
endif::[]
|
|
106
120
|
ifndef::env-cloud[]
|
|
107
121
|
`{{formatPropertyValue default type}}`{{#if default_human_readable}} ({{default_human_readable}}){{/if}}
|
|
108
|
-
endif::[]
|
|
122
|
+
endif::[]
|
|
123
|
+
{{/if}}
|
|
109
124
|
|
|
110
125
|
| Nullable
|
|
111
126
|
| {{#if nullable}}Yes{{else}}No{{/if}}
|
|
112
127
|
{{#if units}}
|
|
113
128
|
|
|
114
129
|
| Unit
|
|
115
|
-
| {{units}}
|
|
130
|
+
| {{capitalize units}}
|
|
116
131
|
{{else}}
|
|
117
132
|
{{#if (formatUnits name)}}
|
|
118
133
|
|
|
119
134
|
| Unit
|
|
120
|
-
| {{formatUnits name}}
|
|
135
|
+
| {{capitalize (formatUnits name)}}
|
|
121
136
|
{{/if}}
|
|
122
137
|
{{/if}}
|
|
123
138
|
{{#if (ne defined_in "src/v/config/node_config.cc")}}
|
|
@@ -134,22 +149,23 @@ ifndef::env-cloud[]
|
|
|
134
149
|
endif::[]
|
|
135
150
|
{{#if visibility}}
|
|
136
151
|
|
|
137
|
-
|
|
152
|
+
ifndef::env-cloud[]
|
|
138
153
|
| Visibility
|
|
139
|
-
|
|
|
140
|
-
|
|
154
|
+
| {{capitalize visibility}}
|
|
155
|
+
endif::[]
|
|
141
156
|
{{/if}}
|
|
142
157
|
{{#if aliases}}
|
|
143
158
|
|
|
144
|
-
|
|
159
|
+
ifndef::env-cloud[]
|
|
145
160
|
| Aliases
|
|
146
|
-
| {{
|
|
147
|
-
|
|
161
|
+
| {{#each aliases}}`{{this}}`{{#unless @last}}, {{/unless}}{{/each}}
|
|
162
|
+
endif::[]
|
|
148
163
|
{{/if}}
|
|
149
164
|
{{#if example}}
|
|
150
165
|
|
|
151
166
|
| Example
|
|
152
|
-
|
|
|
167
|
+
|
|
|
168
|
+
{{{example}}}
|
|
153
169
|
{{/if}}
|
|
154
170
|
{{#if related_topics}}
|
|
155
171
|
{{#with (allTopicsConditional related_topics) as |sectionType|}}
|
|
@@ -157,48 +173,75 @@ endif::[]
|
|
|
157
173
|
{{#if (eq sectionType "cloud")}}
|
|
158
174
|
ifdef::env-cloud[]
|
|
159
175
|
| Related topics
|
|
160
|
-
|
|
|
176
|
+
|{{#if (gt (length ../related_topics) 1)}}{{#each ../related_topics}}
|
|
177
|
+
{{#with (parseRelatedTopic this)}}
|
|
178
|
+
* {{{value}}}
|
|
179
|
+
{{/with}}
|
|
180
|
+
{{/each}}
|
|
181
|
+
{{else}}
|
|
161
182
|
{{#each ../related_topics}}
|
|
162
183
|
{{#with (parseRelatedTopic this)}}
|
|
163
|
-
{{
|
|
184
|
+
{{{value}}}
|
|
164
185
|
{{/with}}
|
|
165
186
|
{{/each}}
|
|
187
|
+
{{/if}}
|
|
166
188
|
endif::[]
|
|
167
189
|
{{else if (eq sectionType "self-managed")}}
|
|
168
190
|
ifndef::env-cloud[]
|
|
169
191
|
| Related topics
|
|
170
|
-
|
|
|
192
|
+
|{{#if (gt (length ../related_topics) 1)}}{{#each ../related_topics}}
|
|
193
|
+
{{#with (parseRelatedTopic this)}}
|
|
194
|
+
* {{{value}}}
|
|
195
|
+
{{/with}}
|
|
196
|
+
{{/each}}
|
|
197
|
+
{{else}}
|
|
171
198
|
{{#each ../related_topics}}
|
|
172
199
|
{{#with (parseRelatedTopic this)}}
|
|
173
|
-
{{
|
|
200
|
+
{{{value}}}
|
|
174
201
|
{{/with}}
|
|
175
202
|
{{/each}}
|
|
203
|
+
{{/if}}
|
|
176
204
|
endif::[]
|
|
177
205
|
{{else}}
|
|
178
206
|
| Related topics
|
|
179
|
-
|
|
|
207
|
+
|{{#if (gt (length ../related_topics) 1)}}{{#each ../related_topics}}
|
|
208
|
+
{{#with (parseRelatedTopic this)}}
|
|
209
|
+
{{#if (eq type "cloud")}}
|
|
210
|
+
ifdef::env-cloud[]
|
|
211
|
+
* {{{value}}}
|
|
212
|
+
endif::[]
|
|
213
|
+
{{else if (eq type "self-managed")}}
|
|
214
|
+
ifndef::env-cloud[]
|
|
215
|
+
* {{{value}}}
|
|
216
|
+
endif::[]
|
|
217
|
+
{{else}}
|
|
218
|
+
* {{{value}}}
|
|
219
|
+
{{/if}}
|
|
220
|
+
{{/with}}
|
|
221
|
+
{{/each}}
|
|
222
|
+
{{else}}
|
|
180
223
|
{{#each ../related_topics}}
|
|
181
224
|
{{#with (parseRelatedTopic this)}}
|
|
182
225
|
{{#if (eq type "cloud")}}
|
|
183
226
|
ifdef::env-cloud[]
|
|
184
|
-
{{
|
|
227
|
+
{{{value}}}
|
|
185
228
|
endif::[]
|
|
186
229
|
{{else if (eq type "self-managed")}}
|
|
187
230
|
ifndef::env-cloud[]
|
|
188
|
-
{{
|
|
231
|
+
{{{value}}}
|
|
189
232
|
endif::[]
|
|
190
233
|
{{else}}
|
|
191
|
-
{{
|
|
234
|
+
{{{value}}}
|
|
192
235
|
{{/if}}
|
|
193
236
|
{{/with}}
|
|
194
237
|
{{/each}}
|
|
195
238
|
{{/if}}
|
|
239
|
+
{{/if}}
|
|
196
240
|
{{/with}}
|
|
197
241
|
{{/if}}
|
|
198
242
|
|
|
199
243
|
|===
|
|
200
244
|
|
|
201
|
-
---
|
|
202
245
|
{{#if is_experimental_property}}
|
|
203
246
|
// end::experimental[]
|
|
204
247
|
{{/if}}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
[cols="1a,1a"]
|
|
2
2
|
|===
|
|
3
|
-
| Topic
|
|
3
|
+
| Topic Property | Corresponding Cluster Property
|
|
4
4
|
|
|
5
5
|
{{#each topicProperties}}
|
|
6
6
|
| <<{{anchorName name}},`{{name}}`>>
|
|
7
|
-
| {{#if alternate_cluster_property
|
|
8
|
-
|
|
9
|
-
{{~else~}}
|
|
10
|
-
xref:./{{cluster_property_doc_file}}#{{corresponding_cluster_property}}[`{{corresponding_cluster_property}}`]
|
|
11
|
-
{{~/if}}
|
|
7
|
+
| {{#if alternate_cluster_property}}xref:./{{cluster_property_doc_file}}#{{corresponding_cluster_property}}[`{{corresponding_cluster_property}}`] or xref:./{{alternate_cluster_property_doc_file}}#{{alternate_cluster_property}}[`{{alternate_cluster_property}}`]{{else}}xref:./{{cluster_property_doc_file}}#{{corresponding_cluster_property}}[`{{corresponding_cluster_property}}`]{{/if}}
|
|
8
|
+
|
|
12
9
|
{{/each}}
|
|
13
10
|
|
|
14
11
|
|===
|
|
@@ -46,7 +46,7 @@ endif::[]
|
|
|
46
46
|
|
|
47
47
|
{{/if}}
|
|
48
48
|
|
|
49
|
-
[cols="
|
|
49
|
+
[cols="1s,2a"]
|
|
50
50
|
|===
|
|
51
51
|
| Property | Value
|
|
52
52
|
|
|
@@ -55,10 +55,21 @@ endif::[]
|
|
|
55
55
|
|
|
56
56
|
{{#if enum}}
|
|
57
57
|
| Accepted Values
|
|
58
|
-
|
|
|
58
|
+
|
|
|
59
|
+
ifndef::env-cloud[]
|
|
60
|
+
{{#each enum}}`{{this}}`{{#if (isEnterpriseEnum this ../x-enum-metadata)}} (Enterprise){{/if}}{{#unless @last}}, {{/unless}}{{/each}}
|
|
61
|
+
endif::[]
|
|
62
|
+
ifdef::env-cloud[]
|
|
63
|
+
{{#each enum}}`{{this}}`{{#unless @last}}, {{/unless}}{{/each}}
|
|
64
|
+
endif::[]
|
|
59
65
|
{{else}}{{#if items.enum}}
|
|
60
66
|
| Accepted Values
|
|
61
|
-
|
|
|
67
|
+
|ifndef::env-cloud[]
|
|
68
|
+
{{#each items.enum}}`{{this}}`{{#if (isEnterpriseEnum this ../items.x-enum-metadata)}} (Enterprise){{/if}}{{#unless @last}}, {{/unless}}{{/each}}
|
|
69
|
+
endif::[]
|
|
70
|
+
ifdef::env-cloud[]
|
|
71
|
+
{{#each items.enum}}`{{this}}`{{#unless @last}}, {{/unless}}{{/each}}
|
|
72
|
+
endif::[]
|
|
62
73
|
{{else}}{{#if acceptable_values}}
|
|
63
74
|
| Accepted values
|
|
64
75
|
| {{{acceptable_values}}}
|
|
@@ -87,19 +98,13 @@ endif::[]
|
|
|
87
98
|
{{#if (ne default undefined)}}
|
|
88
99
|
|
|
89
100
|
| Default
|
|
90
|
-
|
|
|
101
|
+
|
|
|
91
102
|
ifdef::env-cloud[]
|
|
92
|
-
Available in the Redpanda Cloud Console
|
|
103
|
+
Available in the Redpanda Cloud Console{{#if cloud_readonly}} (read-only){{else if cloud_editable}} (editable){{/if}}
|
|
93
104
|
endif::[]
|
|
94
105
|
ifndef::env-cloud[]
|
|
95
106
|
`{{formatPropertyValue default type}}`{{#if default_human_readable}} ({{default_human_readable}}){{/if}}
|
|
96
|
-
endif::[]{{else}}
|
|
97
|
-
ifdef::env-cloud[]
|
|
98
|
-
Available in the Redpanda Cloud Console
|
|
99
107
|
endif::[]
|
|
100
|
-
ifndef::env-cloud[]
|
|
101
|
-
`{{formatPropertyValue default type}}`{{#if default_human_readable}} ({{default_human_readable}}){{/if}}
|
|
102
|
-
endif::[]{{/if}}
|
|
103
108
|
{{/if}}
|
|
104
109
|
|
|
105
110
|
| Nullable
|
|
@@ -112,7 +117,8 @@ endif::[]
|
|
|
112
117
|
{{#if example}}
|
|
113
118
|
|
|
114
119
|
| Example
|
|
115
|
-
|
|
|
120
|
+
|
|
|
121
|
+
{{{example}}}
|
|
116
122
|
{{/if}}
|
|
117
123
|
{{#if related_topics}}
|
|
118
124
|
{{#with (allTopicsConditional related_topics) as |sectionType|}}
|
|
@@ -120,55 +126,82 @@ endif::[]
|
|
|
120
126
|
{{#if (eq sectionType "cloud")}}
|
|
121
127
|
ifdef::env-cloud[]
|
|
122
128
|
| Related topics
|
|
123
|
-
|
|
|
129
|
+
|{{#if (gt (length ../related_topics) 1)}}{{#each ../related_topics}}
|
|
130
|
+
{{#with (parseRelatedTopic this)}}
|
|
131
|
+
* {{{value}}}
|
|
132
|
+
{{/with}}
|
|
133
|
+
{{/each}}
|
|
134
|
+
{{else}}
|
|
124
135
|
{{#each ../related_topics}}
|
|
125
136
|
{{#with (parseRelatedTopic this)}}
|
|
126
|
-
{{
|
|
137
|
+
{{{value}}}
|
|
127
138
|
{{/with}}
|
|
128
139
|
{{/each}}
|
|
140
|
+
{{/if}}
|
|
129
141
|
endif::[]
|
|
130
142
|
{{else if (eq sectionType "self-managed")}}
|
|
131
143
|
ifndef::env-cloud[]
|
|
132
144
|
| Related topics
|
|
133
|
-
|
|
|
145
|
+
|{{#if (gt (length ../related_topics) 1)}}{{#each ../related_topics}}
|
|
146
|
+
{{#with (parseRelatedTopic this)}}
|
|
147
|
+
* {{{value}}}
|
|
148
|
+
{{/with}}
|
|
149
|
+
{{/each}}
|
|
150
|
+
{{else}}
|
|
134
151
|
{{#each ../related_topics}}
|
|
135
152
|
{{#with (parseRelatedTopic this)}}
|
|
136
|
-
{{
|
|
153
|
+
{{{value}}}
|
|
137
154
|
{{/with}}
|
|
138
155
|
{{/each}}
|
|
156
|
+
{{/if}}
|
|
139
157
|
endif::[]
|
|
140
158
|
{{else}}
|
|
141
159
|
| Related topics
|
|
142
|
-
|
|
|
160
|
+
|{{#if (gt (length ../related_topics) 1)}}{{#each ../related_topics}}
|
|
161
|
+
{{#with (parseRelatedTopic this)}}
|
|
162
|
+
{{#if (eq type "cloud")}}
|
|
163
|
+
ifdef::env-cloud[]
|
|
164
|
+
* {{{value}}}
|
|
165
|
+
endif::[]
|
|
166
|
+
{{else if (eq type "self-managed")}}
|
|
167
|
+
ifndef::env-cloud[]
|
|
168
|
+
* {{{value}}}
|
|
169
|
+
endif::[]
|
|
170
|
+
{{else}}
|
|
171
|
+
* {{{value}}}
|
|
172
|
+
{{/if}}
|
|
173
|
+
{{/with}}
|
|
174
|
+
{{/each}}
|
|
175
|
+
{{else}}
|
|
143
176
|
{{#each ../related_topics}}
|
|
144
177
|
{{#with (parseRelatedTopic this)}}
|
|
145
178
|
{{#if (eq type "cloud")}}
|
|
146
179
|
ifdef::env-cloud[]
|
|
147
|
-
{{
|
|
180
|
+
{{{value}}}
|
|
148
181
|
endif::[]
|
|
149
182
|
{{else if (eq type "self-managed")}}
|
|
150
183
|
ifndef::env-cloud[]
|
|
151
|
-
{{
|
|
184
|
+
{{{value}}}
|
|
152
185
|
endif::[]
|
|
153
186
|
{{else}}
|
|
154
|
-
{{
|
|
187
|
+
{{{value}}}
|
|
155
188
|
{{/if}}
|
|
156
189
|
{{/with}}
|
|
157
190
|
{{/each}}
|
|
158
191
|
{{/if}}
|
|
192
|
+
{{/if}}
|
|
159
193
|
{{/with}}
|
|
160
194
|
{{/if}}
|
|
161
195
|
{{#if aliases}}
|
|
162
196
|
|
|
163
|
-
|
|
197
|
+
ifndef::env-cloud[]
|
|
164
198
|
| Aliases
|
|
165
|
-
| {{
|
|
166
|
-
|
|
199
|
+
| {{#each aliases}}`{{this}}`{{#unless @last}}, {{/unless}}{{/each}}
|
|
200
|
+
endif::[]
|
|
167
201
|
{{/if}}
|
|
168
202
|
|
|
169
203
|
|===
|
|
170
204
|
|
|
171
|
-
---
|
|
172
205
|
{{#if is_experimental_property}}
|
|
173
206
|
// end::experimental[]
|
|
174
207
|
{{/if}}
|
|
@@ -677,7 +677,7 @@ class TopicPropertyExtractor:
|
|
|
677
677
|
prop_data["corresponding_cluster_property"] = cluster_prop
|
|
678
678
|
prop_data["cluster_property_doc_file"] = self._get_cluster_property_doc_file(cluster_prop)
|
|
679
679
|
|
|
680
|
-
# Populate default value from cluster property if available
|
|
680
|
+
# Populate default value and type from cluster property if available
|
|
681
681
|
if self.cluster_properties:
|
|
682
682
|
cluster_props = self.cluster_properties.get("properties", {})
|
|
683
683
|
if cluster_prop in cluster_props:
|
|
@@ -686,6 +686,9 @@ class TopicPropertyExtractor:
|
|
|
686
686
|
# Also copy default_human_readable if available
|
|
687
687
|
if "default_human_readable" in cluster_prop_data:
|
|
688
688
|
prop_data["default_human_readable"] = cluster_prop_data["default_human_readable"]
|
|
689
|
+
# Inherit type from cluster property (more reliable than heuristics)
|
|
690
|
+
if "type" in cluster_prop_data:
|
|
691
|
+
prop_data["type"] = cluster_prop_data["type"]
|
|
689
692
|
|
|
690
693
|
# Add alternate cluster property if this has conditional mapping
|
|
691
694
|
if prop_name in self.alternate_mappings:
|
|
@@ -706,8 +709,12 @@ class TopicPropertyExtractor:
|
|
|
706
709
|
if "compression" in prop_name:
|
|
707
710
|
if "compression" in self.enum_values:
|
|
708
711
|
values = self.enum_values["compression"]["values"]
|
|
709
|
-
# Filter out
|
|
710
|
-
filtered_values = [v for v in values if v not in ['count'
|
|
712
|
+
# Filter out internal values like 'count', but keep 'producer' (it's a valid Kafka value)
|
|
713
|
+
filtered_values = [v for v in values if v not in ['count']]
|
|
714
|
+
# Ensure 'producer' is first if present (it's the default and most common)
|
|
715
|
+
if 'producer' in filtered_values:
|
|
716
|
+
filtered_values.remove('producer')
|
|
717
|
+
filtered_values.insert(0, 'producer')
|
|
711
718
|
return f"[`{'`, `'.join(filtered_values)}`]"
|
|
712
719
|
|
|
713
720
|
elif "cleanup.policy" in prop_name:
|