class_docstr: cluster
  
  This is meant as a thin wrapper around GKE clusters and the raw kubernetes
  python api, mainly to provide a simple interface for the most common
  cluster tasks.
class_docstr_tok: ["cluster","This","is","meant","as","a","thin","wrapper","around","GKE","clusters","and","the","raw","kubernetes","python","api",",","mainly","to","provide","a","simple","interface","for","the","most","common","cluster","tasks","."]
docstr: deletes a job from the cluster
  see:
  github.com/kubernetes-client/python/blob/master/kubernetes/docs/BatchV1Api.md#delete_namespaced_job
  github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Status.md
  
  Args:
  job_name: name of job to delete
  
  Returns:
  True on success, False otherwise
docstr_tok: ["deletes","a","job","from","the","cluster","see",":","github.com\/kubernetes-client\/python\/blob\/master\/kubernetes\/docs\/BatchV1Api.md","#","delete_namespaced_job","github.com\/kubernetes-client\/python\/blob\/master\/kubernetes\/docs\/V1Status.md","Args",":","job_name",":","name","of","job","to","delete","Returns",":","True","on","success",",","False","otherwise"]
code: def delete_job(
      self,
      job_name: str,
      namespace: str = k.DEFAULT_NAMESPACE,
  ) -> bool:
      """deletes a job from the cluster
      see:
      github.com/kubernetes-client/python/blob/master/kubernetes/docs/BatchV1Api.md#delete_namespaced_job
      github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Status.md
  
      Args:
      job_name: name of job to delete
  
      Returns:
      True on success, False otherwise
      """
      if self._batch_api is None:
          return False
  
      try:
          # The propagation_policy arg here is important, as the default is
          # 'Orphan', which deletes the job, but keeps any running pods.
          # By setting this to 'Foreground', then all child pods, etc. get
          # deleted in a cascade, which is what we want here.
          rsp = self._batch_api.delete_namespaced_job(
              name=job_name,
              namespace=namespace,
              propagation_policy="Foreground",
          )
      except Exception as e:
          logging.error(
              f"error deleting job {job_name} from cluster {self.name}: {e}"
          )
          return False
  
      return True
  
imports: import json
  import logging
  import re
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple
  import googleapiclient
  import kubernetes
  import requests
  import urllib3
  import yaml
  from google.auth.credentials import Credentials
  from google.cloud.container_v1 import ClusterManagerClient
  from google.cloud.container_v1.types import NodePool, Cluster
  from googleapiclient import discovery
  from googleapiclient.http import HttpRequest
  from kubernetes.client import V1Container, V1DaemonSet, V1EnvVar, V1Job, V1JobSpec, V1ObjectMeta, V1Pod, V1PodSpec, V1PodTemplateSpec, V1ResourceRequirements, V1Toleration
  from kubernetes.client.api_client import ApiClient
  import caliban.config.experiment
  import caliban.platform.gke.constants
  import caliban.platform.gke.util
  from caliban.history.types import Experiment, Job, JobSpec, JobStatus, Platform
  from caliban.platform.cloud.types import GPU, TPU, Accelerator, GPUSpec, MachineType, TPUSpec
  from caliban.platform.gke.types import NodeImage, OpStatus, ReleaseChannel
  from caliban.platform.gke.util import trap
  import caliban.util.metrics
label_desc: Use image node_id 14 for calling the Cluster obj's underlying member method code with example usage: obj.delete_job(job_name, namespace) and returns: True, False, False