Skip to content

Commit

Permalink
merge with main branch changes
Browse files Browse the repository at this point in the history
Signed-off-by: vishnuchalla <[email protected]>
  • Loading branch information
vishnuchalla committed May 23, 2024
2 parents cc9c74e + e3c39d5 commit 1117a7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion backend/app/api/v1/commons/example_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def response_422():
"formal": "true",
"startDate": "2024-05-16 19:39:48+00:00",
"endDate": "2024-05-16 20:41:48+00:00",
"buildUrl": "https://ci-jenkins-csb-kniqe.apps.ocp-c1.prod.psi.redhat.com/job/ocp-far-edge-vran-tests/10506",
"buildUrl": "https://ci-jenkins-xxx.com/job/your-tests/532",
"jobStatus": "success",
"jobDuration": 3720
},
Expand Down
7 changes: 6 additions & 1 deletion backend/app/api/v1/commons/telco.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import date
import pandas as pd
from app import config
from app.services.splunk import SplunkService
import app.api.v1.commons.hasher as hasher
from datetime import datetime, timezone
Expand All @@ -8,7 +9,11 @@

async def getData(start_datetime: date, end_datetime: date, configpath: str):
test_types = ["oslat", "cyclictest", "cpu_util", "deployment", "ptp", "reboot", "rfc-2544"]
jenkins_url = "https://ci-jenkins-csb-kniqe.apps.ocp-c1.prod.psi.redhat.com/job/ocp-far-edge-vran-tests/"
cfg = config.get_config()
try:
jenkins_url = cfg.get('telco.config.job_url')
except Exception as e:
print(f"Error reading telco configuration: {e}")
test_type_execution_times = {
"oslat": 3720,
"cyclictest": 3720,
Expand Down
16 changes: 8 additions & 8 deletions backend/app/services/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ async def post(self, query, indice=None, size=10000, start_date=None, end_date=N
query['query']['bool']['filter']['range'][timestamp_field]['gte'] = str(new_start_date)
if end_date:
query['query']['bool']['filter']['range'][timestamp_field]['lte'] = str(end_date)
if end_date is None:
response = await self.new_es.search(
index=self.new_index+"*",
body=jsonable_encoder(query),
size=size)
new_results = response['hits']['hits']
else:
new_results = await self.scan_indices(self.new_es, self.new_index, query, timestamp_field, new_start_date, end_date, size)
if end_date is None:
response = await self.new_es.search(
index=self.new_index+"*",
body=jsonable_encoder(query),
size=size)
new_results = response['hits']['hits']
else:
new_results = await self.scan_indices(self.new_es, self.new_index, query, timestamp_field, new_start_date, end_date, size)
return await self.remove_duplicates(previous_results + new_results)
else:
if start_date and end_date:
Expand Down

0 comments on commit 1117a7c

Please sign in to comment.