in cli/gke_check.py [0:0]
def update_check_logs(self, pod_name: str | None = None):
"""Updates the check logs for the given pod name.
Args:
pod_name: The name of the pod to get the logs for.
"""
if pod_name is None:
self.check_logs = f'Fetching logs is not defined for check: {self.name}'
return
try:
self.check_logs = self._v1.read_namespaced_pod_log(
name=pod_name,
namespace='default',
container=self.check_container_name,
)
except client.rest.ApiException:
# This error is expected if the pod is not found, and should fail quietly.
pass