Skip to content

Add `Loader::MultiDocYaml` to load multi-doc YAML

Avielle Wolfe requested to merge 383375-aw-add-yaml-multi-doc-parser into master

What does this MR do and why?

This is the first MR for #383375 (closed)

The upcoming CI Catalog feature set includes an update to CI configuration files that requires the use of multi-document YAML. The existing Loader::Yaml class only accepts single document YAML, since YAML.safe_load does not work for multi-document files.

This MR adds a new class Loader::MultiDocYaml to split a multi-document file into single documents, and then safely loads each document.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Avielle Wolfe

Merge request reports