Use another yaml dep to unmarshall the schema #4050
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
Follow-up PR of #4023.
After giving a try to the repo that the TCE folks so kindly created (vmware-tanzu/community-edition#2775 (comment))), I noticed it still failed in Kubeapps. The unmarshaller was returning an error even if the
addtionalProperties
prop was properly being set (according to the JSONSchema Spec).I guess it has something to do with the
JSONSchemaPropsOrBool
(from k8s) field it tries to unmarshall to, but I don't know the root cause yet.Anyway, it gets sorted out when using another
yaml
dependency, which in case of failures, it seems to be using the default value inJSONSchemaPropsOrBool
(which istrue
).This PR replaces this yaml dep and updates the test cases accordingly.
Benefits
Kubeapps will be able to set default values for all the TCE packages (and any other with the same issue in the schema)
Possible drawbacks
Perhaps it can influence #3848.
Applicable issues
Additional information