(GH-154) Fix canonicalization in get
method for DSC Base Provider
#157
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.
Prior to this commit the call to
canonicalize
for a retrieved resource would return the previously cached canonical value for the specified name hash; in other words, it would return the canonicalized should value. The strict check for retrieved data fromget
validates thatcalling
canonicalize
does not change the result, as it is meant to munge the manifest input into a state that matches whatget
will return.We have been (ab?)using this functionality to force the manifest values to be case insensitive but case preserving. We do not want to munge the return data from the
get
method.This commit modifies the logic for handling canonicalizing a resource hash to only munge if no entry for the namehash was found in the cache; otherwise, it returns the data as-is.
This can only happen when a resource has already had its should hash canonicalized during catalogue compilation and a strict check is being applied to the data returned from
get
.