Ensure dependency order for Deploy artifacts #11265
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.
The issue raised that this should resolve is here, where it seems to matter whether or not a template had a master template defined or not as to whether you could successfully deploy content that uses it.
After a bit of digging I found that Deploy was reporting a schema mismatch between two template entities that were identical, due to differences in how the dependencies of the template were ordered within the serialized output. This wasn't reproducible between two local environments, only between local and Cloud.
Initially I thought we weren't ensuring the order and were relying on the collection to come back in a particular way, but actually we are doing this. However the difference in behaviour looks to be due to differences in globalization settings (as we've seen in other contexts, related to this).
I've been able to demonstrate that the ordering of the string representations of these two UDIs comes back one way locally, and the opposite way in Cloud:
Using
OrdinalIgnoreCase
makes them consistent though in both environments. Hence I've applied the same setting for the ordering we do in core.In the end think we've just been quite unlucky in having two entities that happen to be ordered by
-
v/
.