allow for empty categories with items (#21745)
* port the map and update the readme file * remove map * schema validation and proper map * review fixes * review fixes * Update docs/.map/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * review changes * lint * Update docs/.map/validate_map_schema.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * review changes * map edit * yaml map * yaml map * reshaped map, restore csv, schema and more * format * review * review fixes * comments on map * revert map * flatten map categories and relax structural edit_url rule --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fotis Voutsas committed
Feb 12, 2026 at 15:52 UTC
e4a2b7361168493e265b28c1d7e0061ed8a79447
2 files changed
+25
-19
docs/.map/map.yaml
+16
-13
@@ -445,6 +445,8 @@ sidebar:
445
label: Enable an exporting connector
446
edit_url: https://github.com/netdata/netdata/edit/master/docs/exporting-metrics/enable-an-exporting-connector.md
447
description: Learn how to enable and configure any connector using examples to start exporting metrics to external time-series databases in minutes.
448
+ - type: integration_placeholder
449
+ integration_kind: exporters
450
- meta:
451
label: Prometheus
452
edit_url: https://github.com/netdata/netdata/edit/master/src/exporting/prometheus/README.md
@@ -452,18 +454,17 @@ sidebar:
454
- meta:
455
label: Shell Scripts
456
edit_url: https://github.com/netdata/netdata/edit/master/src/web/api/exporters/shell/README.md
455
- - type: integration_placeholder
456
- integration_kind: exporters
457
# Logs
458
- meta:
459
label: Logs
460
items:
461
- meta:
462
- label: Systemd Journal Plugin Reference
463
- edit_url: https://github.com/netdata/netdata/edit/master/src/collectors/systemd-journal.plugin/README.md
464
- description: View and analyze logs available in systemd journal
465
- path: Systemd Journal Logs
462
+ label: Systemd Journal Logs
463
items:
464
+ - meta:
465
+ label: Systemd Journal Plugin Reference
466
+ edit_url: https://github.com/netdata/netdata/edit/master/src/collectors/systemd-journal.plugin/README.md
467
+ description: View and analyze logs available in systemd journal
468
- meta:
469
label: Forward Secure Sealing (FSS) in Systemd-Journal
470
edit_url: https://github.com/netdata/netdata/edit/master/src/collectors/systemd-journal.plugin/forward_secure_sealing.md
@@ -520,18 +521,20 @@ sidebar:
521
description: Send Netdata alerts from a centralized place with Netdata Cloud, or configure nodes individually, to enable incident response and faster resolution.
522
items:
523
- meta:
523
- label: Agent Notifications Reference
524
- edit_url: https://github.com/netdata/netdata/edit/master/src/health/notifications/README.md
525
- path: Agent Dispatched Notifications
524
+ label: Agent Dispatched Notifications
525
items:
526
+ - meta:
527
+ label: Agent Notifications Reference
528
+ edit_url: https://github.com/netdata/netdata/edit/master/src/health/notifications/README.md
529
- type: integration_placeholder
530
integration_kind: agent_notifications
531
- meta:
530
- label: Centralized Cloud Notifications Reference
531
- edit_url: https://github.com/netdata/netdata/edit/master/docs/alerts-and-notifications/notifications/centralized-cloud-notifications/centralized-cloud-notifications-reference.md
532
- description: Configure Netdata Cloud to send notifications to your team whenever any node on your infrastructure triggers an alert threshold.
533
- path: Centralized Cloud Notifications
532
+ label: Centralized Cloud Notifications
533
items:
534
+ - meta:
535
+ label: Centralized Cloud Notifications Reference
536
+ edit_url: https://github.com/netdata/netdata/edit/master/docs/alerts-and-notifications/notifications/centralized-cloud-notifications/centralized-cloud-notifications-reference.md
537
+ description: Configure Netdata Cloud to send notifications to your team whenever any node on your infrastructure triggers an alert threshold.
538
- meta:
539
label: Manage notification methods
540
edit_url: https://github.com/netdata/netdata/edit/master/docs/alerts-and-notifications/notifications/centralized-cloud-notifications/manage-notification-methods.md
docs/.map/validate_map_schema.py
+9
-6
@@ -143,10 +143,11 @@ def check_integration_placeholder_rule(
143
node: Any, path: str, errors: List[MapValidationError]
144
) -> None:
145
"""
146
- Check that nodes without edit_url have integration_placeholder children.
146
+ Check that leaf nodes have edit_url.
147
148
- Custom rule: A node can only omit edit_url if it has at least one
149
- integration_placeholder child.
148
+ Custom rule:
149
+ - Structural nodes (with children) may omit edit_url.
150
+ - Leaf nodes (without children) must provide edit_url.
151
"""
152
if not isinstance(node, dict):
153
return
@@ -164,13 +165,15 @@ def check_integration_placeholder_rule(
165
edit_url = meta.get("edit_url")
166
items = node.get("items", [])
167
167
- # If edit_url is missing, check if there's an integration placeholder
168
+ has_items = isinstance(items, list) and len(items) > 0
169
+
170
+ # If edit_url is missing, only structural category nodes are allowed.
171
if edit_url is None:
169
- if not check_has_integration_placeholder(items):
172
+ if not has_items:
173
errors.append(
174
MapValidationError(
175
node_path,
173
- "Missing 'edit_url' field (only allowed for nodes with integration_placeholder children)",
176
+ "Missing 'edit_url' field (only allowed for structural nodes with children)",
177
)
178
)
179