Skip to content

Bump SharpYaml to 3.18.0 and drop the empty-value key workaround - #5026

Merged
reakaleek merged 3 commits into
mainfrom
claude/bump-sharpyaml-revert-5008
Nov 24, 2026
Merged

reakaleek merged 3 commits into
mainfrom
claude/bump-sharpyaml-revert-5008

Conversation

@claude

@claude claude Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Requested by Jan Calanog · Slack thread

Before: ApplicableToYamlConverter carries a temporary workaround (NormalizeEmptyValueKeys, from #5008) that strips the trailing colon from keys such as self: that SharpYaml 3.17.0 misreads in flow mappings like { self:, ece: ga 4.2 }.

After: SharpYaml is 3.18.0, which includes the upstream scanner fix, and the workaround is gone. The converter reads the YAML as it did before #5008 was needed.

This PR bumps SharpYaml to the release that contains the upstream fix and removes the workaround from #5008.

How

Directory.Packages.props is the only place SharpYaml is pinned (central package management, no lock files), so the bump is one line, 3.17.0 to 3.18.0. 1e41a26 is contained in the 3.18.0 tag and not in 3.17.0. The converter change is reverted by hand: NormalizeEmptyValueKeys and its call in FinalizeApplicableTo are deleted. The snapshot test Read_FlowMappings_KeysWithoutAValue and the HTML test ApplicabilitySwitchEmptyValueKeysTests from #5008 stay, so they now check the upstream fix. They fail if the bug comes back.

Not run yet: the environment that prepared this PR has no .NET SDK, so the build and those tests have not run. CI must confirm them before this leaves draft.

Links


Generated by Claude Code

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 claude Bot added the dependencies label Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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
reakaleek added a commit to elastic/docs-content that referenced this pull request Nov 24, 2026
## Summary
SharpYaml 3.18.0 (elastic/docs-builder#5026) errors on duplicate keys in
front matter; 3.17.0 silently kept the last value. Three pages have
duplicates, so the bump fails the build. This removes the duplicates,
keeping the value that was previously rendered (the last one):

- `solutions/observability/get-started.md`: duplicate `description`
(kept the later one)
-
`deploy-manage/tools/snapshot-and-restore/ece-aws-custom-repository.md`:
duplicate `navigation_title` (kept `AWS S3`)
-
`solutions/observability/incident-management/configure-service-level-objective-slo-access.md`:
identical duplicate `applies_to` block removed

No rendered change is expected.

Related: elastic/docs-builder#5007

## Generative AI disclosure
1. Did you use a generative AI (GenAI) tool to assist in creating this
contribution?
- [x] Yes  
- [ ] No  

Tool(s) and model(s) used: Claude Code (Claude)

---
_Generated by [Claude Code](https://claude.ai/code)_

Co-authored-by: Jan Calanog <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek marked this pull request as ready for review November 24, 2026 08:07
@reakaleek
reakaleek requested a review from a team as a code owner November 24, 2026 08:07
@reakaleek
reakaleek requested a review from akira28 November 24, 2026 08:07
@reakaleek
reakaleek merged commit ca5a600 into main Nov 24, 2026
44 checks passed
@reakaleek
reakaleek deleted the claude/bump-sharpyaml-revert-5008 branch November 24, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants