spring-cloud / spring-cloud/spring-cloud-consul
Large files can throw YAMLException due to node limits
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
Is your feature request related to a problem? Please describe.
Same problem as mentioned in https://github.com/spring-projects/spring-boot/issues/23096. When loading large yaml config from consul it ends up wtih org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50.
This was fixed for org.springframework.boot.env.OriginTrackedYamlLoader but is still problem in org.springframework.beans.factory.config.YamlPropertiesFactoryBean that is used by org.springframework.cloud.consul.config.ConsulPropertySource
Describe the solution you'd like
Provide a way to override the settings in org.yaml.snakeyaml.LoaderOptions or use custom org.springframework.beans.factory.config.YamlProcessor in org.springframework.cloud.consul.config.ConsulPropertySource.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with org.springframework.beans.factory.config.YamlPropertiesFactoryBean and org.springframework.cloud.consul.config.ConsulPropertySource, then compare their YAML loading path with the fixed OriginTrackedYamlLoader. Check how org.yaml.snakeyaml.LoaderOptions is configured. Done means large Consul YAML configuration can override the relevant node limits or use a custom YamlProcessor without the YAMLException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100