@redpanda-data/docs-extensions-and-macros 5.37.5 → 5.38.0
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.
|
@@ -110,6 +110,10 @@
|
|
|
110
110
|
"type": "string",
|
|
111
111
|
"description": "Override the command description. Replaces only the main description; sections from rpk output are preserved."
|
|
112
112
|
},
|
|
113
|
+
"upstream_ref": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "The upstream issue or PR (against the engineering repo whose defective rpk help text this description patches, either the short form 'redpanda-data/streaming-enterprise#12345' or the full URL) that will make this description override redundant once merged and released. A description override is a stopgap, not a fix: set this so the override is born with a retirement path, and remove both the override and this field once the fix ships. Only meaningful alongside 'description' — has no effect on generation or rendering."
|
|
116
|
+
},
|
|
113
117
|
"appendToDescription": {
|
|
114
118
|
"type": "string",
|
|
115
119
|
"description": "Content to append to the auto-generated description instead of replacing it."
|
|
@@ -297,6 +301,10 @@
|
|
|
297
301
|
"type": "string",
|
|
298
302
|
"description": "Override the flag description"
|
|
299
303
|
},
|
|
304
|
+
"upstream_ref": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"description": "The upstream issue or PR (against the engineering repo whose defective rpk flag usage text this description patches) that will make this description override redundant once merged and released. Either the short form 'redpanda-data/streaming-enterprise#12345' or the full URL is accepted. A description override is a stopgap, not a fix: set this so the override is born with a retirement path, and remove both the override and this field once the fix ships. Only meaningful alongside 'description' -- has no effect on generation or rendering."
|
|
307
|
+
},
|
|
300
308
|
"type": {
|
|
301
309
|
"type": "string",
|
|
302
310
|
"description": "Override the flag type display"
|
package/package.json
CHANGED
|
@@ -1024,9 +1024,14 @@ def report_phantom_stubs():
|
|
|
1024
1024
|
f"{'entry' if len(phantom_stub_entries) == 1 else 'entries'} matched no extracted property"
|
|
1025
1025
|
)
|
|
1026
1026
|
for entry in phantom_stub_entries:
|
|
1027
|
+
scope_note = (
|
|
1028
|
+
f"config_scope '{entry['config_scope']}' inferred from the name"
|
|
1029
|
+
if entry.get("scope_inferred")
|
|
1030
|
+
else f"config_scope '{entry['config_scope']}' from the override"
|
|
1031
|
+
)
|
|
1027
1032
|
logger.warning(
|
|
1028
1033
|
f"Override key '{entry['name']}' matched no extracted property — created a stub entry "
|
|
1029
|
-
f"with
|
|
1034
|
+
f"with {scope_note}. If the property was renamed or removed, "
|
|
1030
1035
|
f"update docs-data/property-overrides.json."
|
|
1031
1036
|
)
|
|
1032
1037
|
logger.warning("=" * 70)
|
|
@@ -1182,12 +1187,13 @@ def apply_property_overrides(properties, overrides, overrides_file_path=None):
|
|
|
1182
1187
|
else:
|
|
1183
1188
|
# Create new property from override
|
|
1184
1189
|
logger.info(f"Creating new property from override: {prop}")
|
|
1185
|
-
new_property = _create_property_from_override(prop, override, overrides_file_path)
|
|
1190
|
+
new_property, scope_inferred = _create_property_from_override(prop, override, overrides_file_path)
|
|
1186
1191
|
properties[prop] = new_property
|
|
1187
1192
|
# Record the phantom stub so the run summary can flag it loudly
|
|
1188
1193
|
phantom_stub_entries.append({
|
|
1189
1194
|
"name": prop,
|
|
1190
1195
|
"config_scope": new_property.get("config_scope"),
|
|
1196
|
+
"scope_inferred": scope_inferred,
|
|
1191
1197
|
})
|
|
1192
1198
|
|
|
1193
1199
|
for property_data in properties.values():
|
|
@@ -1313,8 +1319,41 @@ def _apply_override_to_existing_property(property_dict, override, overrides_file
|
|
|
1313
1319
|
property_dict["admonitions"] = normalized
|
|
1314
1320
|
|
|
1315
1321
|
|
|
1322
|
+
def _infer_config_scope_from_name(prop_name):
|
|
1323
|
+
"""Guess a fabricated property's scope from the shape of its name.
|
|
1324
|
+
|
|
1325
|
+
Redpanda topic property names are dot-separated (`cleanup.policy`,
|
|
1326
|
+
`redpanda.remote.read`); cluster and broker names are underscore-separated
|
|
1327
|
+
(`log_retention_ms`). An override key that matched no extracted property
|
|
1328
|
+
has no `defined_in` to classify it, so the name is the only signal left.
|
|
1329
|
+
|
|
1330
|
+
This used to default to "topic" unconditionally, which put underscored
|
|
1331
|
+
names on the topic properties page. `cloud_topics_l1_indexing_interval` is
|
|
1332
|
+
the case that surfaced it: a stale override keyed on a C++ member name
|
|
1333
|
+
rather than the registered `cloud_topics_indexing_interval`, fabricated as
|
|
1334
|
+
a topic property and rendered into topic-properties.adoc.
|
|
1335
|
+
"""
|
|
1336
|
+
return "topic" if "." in prop_name else "cluster"
|
|
1337
|
+
|
|
1338
|
+
|
|
1316
1339
|
def _create_property_from_override(prop_name, override, overrides_file_path):
|
|
1317
|
-
"""Create a new property from override specification.
|
|
1340
|
+
"""Create a new property from override specification.
|
|
1341
|
+
|
|
1342
|
+
Returns ``(new_property, scope_inferred)``. The flag is True when the
|
|
1343
|
+
override named no config_scope and the scope came from the name shape, so
|
|
1344
|
+
the caller can say so in the run summary without a marker on the property
|
|
1345
|
+
that would otherwise have to be stripped before output.
|
|
1346
|
+
"""
|
|
1347
|
+
# An override that names its own scope is authoritative. Otherwise infer it
|
|
1348
|
+
# from the name, because there is no defined_in to classify a fabricated
|
|
1349
|
+
# property and a wrong guess lands it on the wrong reference page.
|
|
1350
|
+
if "config_scope" in override and override["config_scope"]:
|
|
1351
|
+
scope = override["config_scope"]
|
|
1352
|
+
scope_inferred = False
|
|
1353
|
+
else:
|
|
1354
|
+
scope = _infer_config_scope_from_name(prop_name)
|
|
1355
|
+
scope_inferred = True
|
|
1356
|
+
|
|
1318
1357
|
# Create base property structure
|
|
1319
1358
|
new_property = {
|
|
1320
1359
|
"name": prop_name,
|
|
@@ -1322,10 +1361,10 @@ def _create_property_from_override(prop_name, override, overrides_file_path):
|
|
|
1322
1361
|
"type": override.get("type", "string"),
|
|
1323
1362
|
"default": override.get("default", None),
|
|
1324
1363
|
"defined_in": "override", # Mark as override-created
|
|
1325
|
-
"config_scope":
|
|
1326
|
-
"is_topic_property":
|
|
1364
|
+
"config_scope": scope,
|
|
1365
|
+
"is_topic_property": scope == "topic",
|
|
1327
1366
|
"is_deprecated": override.get("is_deprecated", False),
|
|
1328
|
-
"visibility": override.get("visibility", "user")
|
|
1367
|
+
"visibility": override.get("visibility", "user"),
|
|
1329
1368
|
}
|
|
1330
1369
|
|
|
1331
1370
|
# Add version if specified
|
|
@@ -1382,7 +1421,7 @@ def _create_property_from_override(prop_name, override, overrides_file_path):
|
|
|
1382
1421
|
if normalized is not None:
|
|
1383
1422
|
new_property["admonitions"] = normalized
|
|
1384
1423
|
|
|
1385
|
-
return new_property
|
|
1424
|
+
return new_property, scope_inferred
|
|
1386
1425
|
|
|
1387
1426
|
|
|
1388
1427
|
def _process_example_override(override, overrides_file_path=None):
|