Skip to content

Multi-key applies-item drops badges for keys without a value #5007

Closed

Description

@leemthompo

Summary

An applies-item tagged with several keys drops the badge for every key that has no value and is followed directly by a comma. Only the keys that survive render in the tab label, so readers can't see that a tab covers, for example, self-managed.

Source

query-logs.md has this tab inside an applies-switch:

:::::{applies-item} { self:, ece: ga 4.2 }

Expected

The tab label shows an ECE 4.2+ badge and a Self-managed badge.

Actual

Only the ECE 4.2+ badge renders on the PR preview and the live site. The Self-managed badge is missing from the generated HTML. A docs-builder 1.58.0 build of the same source renders both badges, so this looks like a regression after 1.58.0.

Live examples

Page Source Badges on the live site
Query logging { self:, ece: ga 4.2 } ECE only
High CPU usage { ess:, ece: } and { self:, eck: } ECE only, ECK only
View monitoring data in Kibana { eck:, self: } and { ess:, ece: } Self-managed only, ECE only
Stack settings { ess:, ece: } ECE only
Ingest metrics { self:, ece:, eck: } ECK only

In every case the key that survives is the last one in the item, or the one with a value. Items where every key has a value, such as { ece: ga, self: ga }, render fully.

I compared the multi-key applies-item tabs in docs-content main with the live labels. 26 of 107 pages are missing at least one badge. The others, mostly { stack:, serverless: } pairs with values, render fully. The affected pages also include deploy-manage/security/secure-settings.md, deploy-manage/users-roles/cluster-or-deployment-auth/kerberos.md, deploy-manage/autoscaling/trained-model-autoscaling.md, the five troubleshoot/elasticsearch pages that use { ess:, ece: } and { self:, eck: }, and the Kubernetes OpenTelemetry pages.

Possible cause (not confirmed)

I couldn't build main to check this. The YAML parser moved to SharpYaml in #4506. ApplicableToYamlConverter now reads the flow mapping as an untyped dictionary and treats unknown keys as hints. If self:, is read as a key named self: with the colon, it is unknown and dropped, while ece: ga 4.2 parses normally. That matches every example above. A unit test that parses { self:, ece: ga 4.2 } through the converter and asserts both keys would confirm it.

Related

#1976 was about the badge order and separator in multi-key tab titles. That was a layout problem and all badges rendered. This issue is about badges missing entirely.

Activity

  1. reakaleek commented on Nov 23, 2026

    @reakaleek
    Member

    🔀 Pull request opened: #5008

    Status: Open for review

    What this PR does

    • Confirms the suspected cause. SharpYaml 3.17.0 reads self:, as a key named self:, so the converter drops it as unknown.
    • Strips the colon from keys that have no value before the converter maps keys, in nested mappings too. { self:, ece: ga 4.2 } now renders both the ECE 4.2+ and Self-managed badges.
    • Adds a snapshot table for the shapes in this issue and an HTML snapshot of the tab labels. Both fail without the fix.
    • Fixes a second case the issue did not list. Nested empty-value keys such as deployment: { self:, ece: } were dropped with no hint at all.

    Not covered / follow-ups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions