I am from Spinnaker community and we are in the process of upgrading Spring and Springboot versions. But with the yaml file size limitation introduced in snakeyaml-1.32 we can't upgrade to Springboot 3.0.x as it uses snakeyaml-1.33 and we have many users with configuration files > 5MB size. The default file size limit of 3MB in snakeyaml can be overriden but Springboot uses the default LoaderOptions with no configurable value to override LoaderOptions.codePointLimit.
We are looking for a configurable option to set the yaml file size limit within Springboot.
Comment From: wilkinsona
Have you considered splitting your 5MB+ configuration files up a bit? It would work around this limitation while also perhaps making them easier to read. Having split them up, you'd use spring.config.import to combine them at runtime.
Comment From: kirangodishala
@wilkinsona - Spinnaker uses yaml files containing cloud provider (kubernetes, google cloud, azure, aws etc) account info to load required details. All the accounts of a particular type(say kubernetes) are configured as an array under kubernetes.accounts and hence if you split them into different files, only the accounts from the file configured under spring.config.import gets loaded as the property names are same. I have tested using clouddriver-local.yml & additional-accounts.yml where I added spring.config.import=additional-accounts.yml under clouddriver-local.yml but only the accounts from additional-accounts.yml got loaded.
There are other challenges as well like the custom ways the yamls are built and integrated into the system by the users will be broken if the file is to be split.
Comment From: kirangodishala
@wilkinsona I would like to work on the PR. Can you give some pointers on how to make use of custom configuration in this scenario?
Comment From: scottfrederick
@kirangodishala The issue is currently tagged with team-meeting, which indicates that we'd like some time to discuss this issue before we make any decisions about what to do. We'll update the status again and add another comment after we've had time to discuss it.
Comment From: philwebb
I think we can increase our limits. The OriginTrackedYamlLoader is only used to load application.yml so I don't see a good reason to artificially restrict the size.