From: Nitzan Mordechai Date: Wed, 22 Oct 2025 05:41:56 +0000 (+0000) Subject: tasks/cbt_performance: Tolerate exceptions during performance data updates X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66016%2Fhead;p=ceph.git tasks/cbt_performance: Tolerate exceptions during performance data updates If an exception occurs during the POST request to update CBT performance, log the error instead of failing the entire job. This ensures that intermittent update failures do not block the main workflow. Fixes: https://tracker.ceph.com/issues/68843 Signed-off-by: Nitzan Mordechai --- diff --git a/qa/tasks/cbt_performance.py b/qa/tasks/cbt_performance.py index 44f6d9ade3d..9a52b84bf1d 100644 --- a/qa/tasks/cbt_performance.py +++ b/qa/tasks/cbt_performance.py @@ -50,12 +50,18 @@ class CBTperformance: "benchmark" : benchmark["benchmarks"], "results" : cbt_results.get("results", None), } - response = requests.post(self.endpoint_url, json=data, headers=self.headers, auth=self.auth) - if response.status_code == 201: - self.log.info("Data inserted successfully.") - ctx.summary['cbt_perf_url'] = self.create_cbt_perf_url(ctx, config) - else: - self.log.info(f"Error inserting data: {response}") + + try: + response = requests.post(self.endpoint_url, json=data, headers=self.headers, auth=self.auth, timeout=10) + if response.status_code == 201: + self.log.info("Data inserted successfully.") + ctx.summary['cbt_perf_url'] = self.create_cbt_perf_url(ctx, config) + else: + self.log.info(f"Error inserting data: {response}") + except requests.exceptions.RequestException as e: + self.log.warning(f"Could not send performance data to {self.endpoint_url}: {e}") + self.log.warning("Continuing without performance data collection") + return def read_results(self, ctx, config):