Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • BuildStream/buildstream-plugins-community
  • coldtom/bst-plugins-experimental
  • bwh-ct/bst-plugins-experimental
  • abderrahimk/bst-plugins-experimental
  • nanonyme/bst-plugins-experimental
  • christopherphang/bst-plugins-experimental
  • cheeselee/bst-plugins-experimental
  • sophie-h/bst-plugins-experimental
  • AdrianVovk/bst-plugins-experimental
  • wjt/bst-plugins-experimental
  • neill.whillans/bst-plugins-experimental
  • joshua.zivkovic/bst-plugins-experimental
  • harrysarson-ct/buildstream-plugins-community
  • muditsharma_ct/buildstream-plugins-community
  • leopark94/buildstream-plugins-community
  • sam-leonard-ct/buildstream-plugins-community
16 results
Select Git revision
Show changes
Commits on Source (2)
  • Mathieu Bridon's avatar
    collect_integration: Order the "ignore" items · cc3779d0
    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
    cc3779d0
  • Benjamin Schubert's avatar
    Merge branch 'bochecha/ujson-set' into 'master' · f01c3233
    Benjamin Schubert authored
    collect_integration: Order the "ignore" items
    
    See merge request BuildStream/bst-plugins-experimental!51
    f01c3233
...@@ -65,7 +65,7 @@ class ExtractIntegrationElement(Element): ...@@ -65,7 +65,7 @@ class ExtractIntegrationElement(Element):
def get_unique_key(self): def get_unique_key(self):
key = { key = {
'script-path': self.script_path, 'script-path': self.script_path,
'ignore': set(self.ignore) 'ignore': sorted(set(self.ignore))
} }
return key return key
......