From 496e8ffd5beed87e8f71868312e9753337ce0640 Mon Sep 17 00:00:00 2001 From: Min Lim Date: Thu, 19 Mar 2026 23:50:12 +0000 Subject: [PATCH] Propagate no-verify option for dynamic profiling Signed-off-by: Min Lim --- gprofiler/dynamic_profiling_management/heartbeat.py | 6 ++++-- gprofiler/main.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gprofiler/dynamic_profiling_management/heartbeat.py b/gprofiler/dynamic_profiling_management/heartbeat.py index 28fb03996..2eb9e03c1 100644 --- a/gprofiler/dynamic_profiling_management/heartbeat.py +++ b/gprofiler/dynamic_profiling_management/heartbeat.py @@ -44,10 +44,12 @@ def __init__( api_server: str, service_name: str, server_token: str, + verify: bool = True, ): self.api_server = api_server.rstrip("/") self.service_name = service_name self.server_token = server_token + self.verify = verify self.hostname = get_hostname() self.ip_address = self._get_local_ip() self.last_command_id: Optional[str] = None @@ -88,7 +90,7 @@ def send_heartbeat(self) -> Optional[Dict[str, Any]]: "executed_command_ids": list(self.executed_command_ids), } url = f"{self.api_server}/api/metrics/heartbeat" - response = self.session.post(url, json=heartbeat_data, timeout=30) + response = self.session.post(url, json=heartbeat_data, timeout=30, verify=self.verify) if response.status_code == 200: result = response.json() @@ -122,7 +124,7 @@ def send_command_completion( "results_path": results_path, } url = f"{self.api_server}/api/metrics/command_completion" - response = self.session.post(url, json=completion_data, timeout=30) + response = self.session.post(url, json=completion_data, timeout=30, verify=self.verify) if response.status_code == 200: logger.info(f"Reported command completion for {command_id} (status={status})") return True diff --git a/gprofiler/main.py b/gprofiler/main.py index 8bd02724b..0f4ac645d 100644 --- a/gprofiler/main.py +++ b/gprofiler/main.py @@ -1364,6 +1364,7 @@ def main() -> None: api_server=args.api_server, service_name=args.service_name, server_token=args.server_token, + verify=args.verify, ) # Create dynamic profiler manager