Enhance XML meta data comparison to ignore changes in XML order
In org monitoring we frequently get notification about changes an the only thing is a change to the order of the XML elements returned.
The XML is virtually the same but the order of elements returned changed from one day to the other.
It makes differentiating "real" changes from those false positives time-consuming.
It would be great if those kind of changes could be ignored or if there was an option to configure the XML comparison behavior for each monitoring job.
We’ve made this option available now. See https://docs.gearset.com/en/articles/2413367-why-is-xml-order-of-some-metadata-in-the-comparison-results-different for more information.
-
Kris Goncalves commented
I agree it'd be great to have some sort of "option" (similar to include managed package option) to denote you're ok with Gearset re-ordering the XML (canonical sort) just for diff visualization (not making actual changes to the XML).
Otherwise, at least attempting to help on metadata types you know order doesn't matter would be a drastic improvement (and could be deployed in a specific order to improve PR diffs as well in source control).
-
Goldwin commented
If there is an option to sort the XML based on the inner text in the compare screen that can be temporary and not make the actual changes in the XML file, it would be great to compare and avoid false positive. For example: the field list in LeadConvertSettings, Related list in the Page layout.
-
Anonymous commented
Maybe we could ignore order only in layouts for starters ?
I think this is the main source of "false positives" -
[Deleted User] commented
I would opt for ignore diffs on benign metadata types but show diffs on metadata types where it matters (e.g. picklists).
That said, I find this to be a bigger issue in the GitHub PR diff viewer because GS has deployed a changed file to branch A and when compared to master, there are false negative diffs due to reordering of the XML during the dev cycle.
-
chris commented
Okay I understand. Would it be possible to differentiate between the difference meta data objects when doing XML comparisons?
E.g. when comparing custom labels, ignore the XML element order but when comparing picklists to not ignore them?
Maybe a switch to toggle between comparing them exactly and without regard to the order could be set on a pre-object basis in the meta data filter dialog...
That would make me, as a user responsible to select the proper comparison method. -
Thanks for the suggestion to a problem we also experience!
It turns out that it's a tricky one to address: the change(s) in XML order is sometimes important (e.g. picklists) and sometimes not (e.g. layouts); and we haven't found a good way to distinguish the differences to help users in a consistent and reliable manner.
This happens because the Salesforce metadata API is not always consistent in the XML order when returning XML elements.
We've published an article to discuss this issue in more detail.
The potential approaches are:
- we try to identify which changes are relevant, but potentially hide changes you care about or
- we show you all the differences, relevant or not, but it's annoying for users because you get lots of false positivesWhat do you think about these approaches? Or is there another approach we haven't thought of?