python/ray/tests/kuberay/utils.py
def wait_for_crd(crd_name: str, tries=60, backoff_s=5):
    """CRD creation can take a bit of time after the client request.
    This function waits until the crd with the provided name is registered.
    """
    for i in range(tries):
        get_crd_output = subprocess.check_output(["kubectl", "get", "crd"]).decode()
        if crd_name in get_crd_output:
            logger.info(f"Confirmed existence of CRD {crd_name}.")
            return
        elif i < tries - 1:
            logger.info(f"Still waiting to register CRD {crd_name}")
            time.sleep(backoff_s)
        else:
            raise Exception(f"Failed to register CRD {crd_name}")
CRD creation can take a bit of time after the client request.
    This function waits until the crd with the provided name is registered.
    
CRD creation can take a bit of time after the client request.
This function waits until the crd with the provided name is registered.
CRD creation can take a bit of time after the client request . This function waits until the crd with the provided name is registered .
def wait_for_crd(crd_name: str, tries=60, backoff_s=5):
    for i in range(tries):
        get_crd_output = subprocess.check_output(["kubectl", "get", "crd"]).decode()
        if crd_name in get_crd_output:
            logger.info(f"Confirmed existence of CRD {crd_name}.")
            return
        elif i < tries - 1:
            logger.info(f"Still waiting to register CRD {crd_name}")
            time.sleep(backoff_s)
        else:
            raise Exception(f"Failed to register CRD {crd_name}")
def wait_for_crd ( crd_name : str , tries = 60 , backoff_s = 5 ) : for i in range ( tries ) : get_crd_output = subprocess . check_output ( [ "kubectl" , "get" , "crd" ] ) . decode ( ) if crd_name in get_crd_output : logger . info ( f"Confirmed existence of CRD {crd_name}." ) return elif i < tries - 1 : logger . info ( f"Still waiting to register CRD {crd_name}" ) time . sleep ( backoff_s ) else : raise Exception ( f"Failed to register CRD {crd_name}" )
CRD creation can take a bit of time after the client request.
CRD creation can take a bit of time after the client request .
"""CRD creation can take a bit of time after the client request.
    This function waits until the crd with the provided name is registered.
    """
crd_name
str
tries
backoff_s