Skip to content

Commit

Permalink
adding lookback size
Browse files Browse the repository at this point in the history
  • Loading branch information
paigerube14 committed Jan 21, 2025
1 parent 89b4aec commit 2d23023
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ def extract_metadata_from_test(test: Dict[str, Any]) -> Dict[Any, Any]:
dict: dictionary of the metadata
"""
logger_instance = SingletonLogger.getLogger("Orion")
metadata = test["metadata"]
metadata["ocpVersion"] = str(metadata["ocpVersion"])
logger_instance.info("test" + str(test))
if "metadata" in test:
metadata = test["metadata"]
if "ocpVersion" in metadata:
metadata["ocpVersion"] = str(metadata["ocpVersion"])
else:
metadata = test
logger_instance.debug("metadata" + str(metadata))
return metadata

Expand Down Expand Up @@ -229,7 +234,7 @@ def process_test(
if options['previous_version']:
last_version_run = runs
metadata['ocpVersion'] = str(float(metadata['ocpVersion'][:4]) - .01)
runs = match.get_uuid_by_metadata(metadata, fingerprint_index, lookback_date=start_timestamp)
runs = match.get_uuid_by_metadata(metadata, fingerprint_index, lookback_date=start_timestamp, lookback_size=options['lookback_size'])
if len(last_version_run) > 0:
# get latest uuid as the "uuid" to compare against
last_uuid_run = last_version_run[-1]
Expand Down

0 comments on commit 2d23023

Please sign in to comment.