Skip to content

Commit

Permalink
regression_tracker: workaround: match node paths programatically
Browse files Browse the repository at this point in the history
Don't use 'path' as an api search parameter. The use of lists as query
parameters (path is a list) is undefined. Instead, do the filtering in
code.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
  • Loading branch information
r-c-n authored and nuclearcat committed Jun 27, 2024
1 parent ac15e37 commit 0be7a36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/regression_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,14 @@ def _get_last_matching_node(self, search_params):
TODO: Move this to core helpers.
"""
# Workaround: Don't use 'path' as a search parameter (we can't
# use lists as query parameter values). Instead, do the
# filtering in python code
path = search_params.pop('path')
nodes = self._api.node.find(search_params)
if not nodes:
return None
nodes = [node for node in nodes if node['path'] == path]
node = sorted(
nodes,
key=lambda node: node['created'],
Expand Down

0 comments on commit 0be7a36

Please sign in to comment.