Skip to content

Conversation

sudo-bmitch
Copy link
Contributor

Fixes issue

A duplicate key error can be triggered when parsing certain yaml files, particularly with the anchor/alias syntax where a default is overridden.

Describe the change

Updates yaml config decoders to allow duplicate keys.

How to verify it

See the updated config examples in the tests.

make test

Changelog text

  • Fix: Allow duplicate keys in yaml config.

Please verify and check that the pull request fulfills the following requirements

  • Tests have been added or not applicable
  • Documentation has been added, updated, or not applicable
  • Changes have been rebased to main
  • Multiple commits to the same code have been squashed

This is needed for the anchor/alias syntax that may override defaults.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch merged commit b3283df into regclient:main Jun 9, 2025
4 checks passed
@sudo-bmitch sudo-bmitch deleted the pr-yaml-duplicate-key branch June 9, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant