diff --git a/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py b/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py index 3a7c4949cc7..5dae31ade3e 100644 --- a/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py +++ b/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py @@ -30,10 +30,13 @@ def get_experiment_pods_logs(katib_client: KatibClient, exp_name: str, exp_names if exp_name in pod.metadata.name: logging.info(f"Fetching logs for pod: {pod.metadata.name}") try: + # Specify the container name when retrieving logs pod_logs = v1.read_namespaced_pod_log( - name=pod.metadata.name, namespace=exp_namespace + name=pod.metadata.name, + namespace=exp_namespace, + container="metrics-logger-and-collector" # Specify the desired container ) - logging.info(f"Logs for pod {pod.metadata.name}:\n{pod_logs}") + logging.info(f"Logs for pod {pod.metadata.name} (container: metrics-logger-and-collector):\n{pod_logs}") except Exception as e: logging.error(f"Failed to get logs for pod {pod.metadata.name}: {str(e)}")