Skip to content

Commit 79b975c

Browse files
Merge pull request ceph#66016 from NitzanMordhai/wip-nitzan-suites-perf-ci-disable-mira118-machine
tasks/cbt_performance: Tolerate exceptions during performance data up…
2 parents 70eecf4 + b47880f commit 79b975c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

qa/tasks/cbt_performance.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,18 @@ def collect(self, ctx, config):
5050
"benchmark" : benchmark["benchmarks"],
5151
"results" : cbt_results.get("results", None),
5252
}
53-
response = requests.post(self.endpoint_url, json=data, headers=self.headers, auth=self.auth)
54-
if response.status_code == 201:
55-
self.log.info("Data inserted successfully.")
56-
ctx.summary['cbt_perf_url'] = self.create_cbt_perf_url(ctx, config)
57-
else:
58-
self.log.info(f"Error inserting data: {response}")
53+
54+
try:
55+
response = requests.post(self.endpoint_url, json=data, headers=self.headers, auth=self.auth, timeout=10)
56+
if response.status_code == 201:
57+
self.log.info("Data inserted successfully.")
58+
ctx.summary['cbt_perf_url'] = self.create_cbt_perf_url(ctx, config)
59+
else:
60+
self.log.info(f"Error inserting data: {response}")
61+
except requests.exceptions.RequestException as e:
62+
self.log.warning(f"Could not send performance data to {self.endpoint_url}: {e}")
63+
self.log.warning("Continuing without performance data collection")
64+
return
5965

6066

6167
def read_results(self, ctx, config):

0 commit comments

Comments
 (0)