Skip to content

Commit

Permalink
Getting build urls for when uuid and baseline are set (#32)
Browse files Browse the repository at this point in the history
rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Paige Rubendall <[email protected]>
  • Loading branch information
paigerube14 authored May 20, 2024
1 parent 81c7fb8 commit 4546fd6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def orion(**kwargs):
benchmarkIndex=test['benchmarkIndex']
uuid = kwargs["uuid"]
baseline = kwargs["baseline"]
match = Matcher(index="ospst-perf-scale-ci-*",
index = "ospst-perf-scale-ci-*"
match = Matcher(index=index,
level=level, ES_URL=ES_URL, verify_certs=False)
if uuid == "":
metadata = orion_funcs.get_metadata(test, logger)
Expand All @@ -85,6 +86,8 @@ def orion(**kwargs):
else:
uuids = [uuid for uuid in re.split(' |,',baseline) if uuid]
uuids.append(uuid)
buildUrls = orion_funcs.get_build_urls(index, uuids,match)

index=benchmarkIndex
if metadata["benchmark.keyword"] in ["ingress-perf","k8s-netperf"] :
ids = uuids
Expand Down
18 changes: 18 additions & 0 deletions utils/orion_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,24 @@ def get_metadata(test,logger):
return metadata


def get_build_urls(index, uuids,match):
"""Gets metadata of the run from each test
to get the build url
Args:
uuids (list): str list of uuid to find build urls of
match: the fmatch instance
Returns:
dict: dictionary of the metadata
"""

test = match.getResults("",uuids,index,{})
buildUrls = {run["uuid"]: run["buildUrl"] for run in test}
return buildUrls


def filter_metadata(uuid,match,logger):
"""Gets metadata of the run from each test
Expand Down

0 comments on commit 4546fd6

Please sign in to comment.