Commits on Source (2)
-
Mathieu Bridon authored
We currently return the "ignore" items as a set, to remove duplicates in the underlying collection. The goal of returning a set was also to avoid ordering issues: since sets aren't ordered, comparing two sets containing the same elements will always return True no matter the order of the elements. This way, cache keys would match no matter the order of the items in the "ignore" collection. However, the set is then serialized as JSON further down in Buildstream. Sets don't exist in JSON though, so ujson actually transforms it into a list. Lists are ordered, and that means cache key comparison depends on the order of the items once serialized. Sorting the set before returning it achieves the desired result to have identical cache keys computed for 2 ignore lists which only differ in the order of their items. Incidentally, this fixes a second issue, which is what was originally observed: the yet-unreleased ujson 2.0 does not serialize sets any more, intentionally, considering that to be an input error as sets don't exist in JSON: https://github.com/esnme/ultrajson/commit/53f85b1bd6e4f27a3e4cdc605518c48a6c7e7e9e
-
Benjamin Schubert authored
collect_integration: Order the "ignore" items See merge request BuildStream/bst-plugins-experimental!51