Loading
fix(config): resolve YAML alias nodes in hosts config
Summary
YAML anchors (e.g. *gitlab) in the hosts: section of config.yml were not resolved. Host entries referencing an anchor silently got an empty config.
Closes #8489 (closed)
Root cause
go.yaml.in/yaml/v3 preserves YAML aliases as AliasNode with an Alias pointer. parseHosts in internal/config/config.go did not dereference AliasNode, so the host config was empty.
Fix
Dereference AliasNode before building the HostConfig:
if hostRoot.Kind == yaml.AliasNode {
hostRoot = hostRoot.Alias
}Testing
Added TestConfig_parseHosts_YAMLAnchor which verifies that a host entry using a YAML anchor resolves the same values as the anchored host.