Closed Lybecker closed 5 years ago
I will investigate - I was able to repro with the config file provided.
Root cause: Fabrikate is unable to distinguish right now between a failed file load (which causes it to move on to JSON) and a failed YAML file parse.
Fix: Add support for differentiating between these two failures and fatally failing if the YAML or JSON file parse fails in componentConfig.go and add tests to cover.
PR #242 contains fix and tests to cover.
The same issue happens for malformed component files - adding checks for this as well.
Thanks!
I have verified the fix.
Nice solution with informative errors like:
Describe the bug: Adding an environment variable with no space between the key and the value removes most of the content of the HLD YAML file.
To Reproduce:
Make a /config/common.yaml like this:
The subcomponents | screenprofiler | envVar | culprit is the problem
Execute fabricate
Fabricate removes most of the HLD file:
Expected behavior: Fabricate should fail, as the YAML is invalid
OR
subcomponents | screenprofiler | image | tag is set to 747
Like
Desktop (please complete the following information):
Reproduced on:
fab version 0.15.2
Execute via Azure DevOps Agent like so: curl https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh > build.sh chmod +x ./build.sh
curl https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/release.sh > release.sh chmod +x ./release.sh