Repository navigation
Keep applies-item badges for keys without a value - #5008
Merged
Merged
Conversation
SharpYaml reads `{ self:, ece: ga 4.2 }` as a key named `self:` with the colon kept. The converter then dropped it as unknown, so the tab label lost its Self-managed badge. The converter now strips the colon from keys that have no value, including in nested mappings.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
akira28
approved these changes
Nov 23, 2026
SharpYaml fixes the flow-mapping scanner upstream in commit 1e41a26, which no release contains yet. The tests stay and fail until the next SharpYaml release is pinned. Co-Authored-By: Claude Fable 5.2 <[email protected]>
reakaleek
marked this pull request as draft
November 23, 2026 14:10
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5008/ |
The SharpYaml release that fixes the flow-mapping scanner has no date yet. The converter strips the colon again until then, and a TODO links the follow-up that removes it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
reakaleek
marked this pull request as ready for review
November 23, 2026 14:37
reakaleek
enabled auto-merge (squash)
November 23, 2026 14:42
claude Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
SharpYaml 3.18.0 contains upstream fix 1e41a26 (xoofx/SharpYaml#184), so `{ self:, ece: ga 4.2 }` parses `self` as a key without a value again. Remove NormalizeEmptyValueKeys from ApplicableToYamlConverter, added in #5008. The snapshot and HTML tests from #5008 stay as regression guards. Refs #5007, #5008 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EeRLAkeiiEBtg2XAkxV2fC
claude Bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
SharpYaml 3.18.0 contains upstream fix 1e41a26 (xoofx/SharpYaml#184), so `{ self:, ece: ga 4.2 }` parses `self` as a key without a value again. Remove NormalizeEmptyValueKeys from ApplicableToYamlConverter, added in #5008. The snapshot and HTML tests from #5008 stay as regression guards. Refs #5007, #5008 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EeRLAkeiiEBtg2XAkxV2fC
reakaleek
added a commit
that referenced
this pull request
Nov 24, 2026
* Bump SharpYaml to 3.18.0 and drop the empty-value key workaround SharpYaml 3.18.0 contains upstream fix 1e41a26 (xoofx/SharpYaml#184), so `{ self:, ece: ga 4.2 }` parses `self` as a key without a value again. Remove NormalizeEmptyValueKeys from ApplicableToYamlConverter, added in #5008. The snapshot and HTML tests from #5008 stay as regression guards. Refs #5007, #5008 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EeRLAkeiiEBtg2XAkxV2fC * Update YAML error-position snapshots for SharpYaml 3.18.0 SharpYaml 3.18.0 reports different source marks on YamlException: "Expected a ... token" errors now end one column after the offending token, and duplicate mapping key errors point at the duplicate entry instead of the end of the document. Only the (Lin/Col/Chr) ranges in the expected snapshots change; the message text is unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EeRLAkeiiEBtg2XAkxV2fC --------- Co-authored-by: Jan Calanog <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]> Co-authored-by: Jan Calanog <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An
applies-itemtab such as{ self:, ece: ga 4.2 }shows a badge for every key again, including the keys that have no value. The fix is a temporary workaround until SharpYaml ships a release.Affects: Authoring, Configuration
Prompt summary: Implement issue #5007. Multi-key
applies-itemtabs lose the badge of any key that has no value and is followed by a comma. The real fix is in SharpYaml and has no release date, so restore the badges now with a workaround that is marked for removal.Why
SharpYaml 3.17.0 reads
self:,in a flow mapping as a key namedself:, with the colon kept.ApplicableToYamlConverterdoes not know that key, so it drops it and the tab label loses the badge. 26 of 107 multi-key tabs in docs-content are affected, for example{ ess:, ece: }and{ self:, eck: }.Closes #5007
What
Empty-value keys keep their name
The converter strips the trailing colon from a key that has no value before it maps keys to applicability. It does this in nested mappings too, so
deployment: { self:, ece: ga 4.2 }also works. Keys with a value, and the last key before}, are unchanged.The workaround is temporary
SharpYaml commit 1e41a26 fixes the scanner, and no release contains it yet. The release is requested in xoofx/SharpYaml#184. A
TODOonNormalizeEmptyValueKeyslinks the follow-up that bumps SharpYaml and deletes the method: elastic/docs-eng-team#1236.Tests
A snapshot table covers the issue's shapes:
{ self:, ece: ga 4.2 },{ ess:, ece: },{ self:, ece:, eck: },{ stack:, serverless: }and two nested forms. An HTML snapshot checks that each tab label renders both badges. Both tests fail without the workaround, so they also guard the later removal.Verify
Notes
🤖 Generated with Claude Code