python/ray/serve/deployment_state.py
def deploy(self, deployment_info: DeploymentInfo) -> bool:
        """Deploy the deployment.

        If the deployment already exists with the same version and config,
        this is a no-op and returns False.

        Returns:
            bool: Whether or not the deployment is being updated.
        """
        # Ensures this method is idempotent.
        existing_info = self._target_info
        if existing_info is not None:
            # Redeploying should not reset the deployment's start time.
            deployment_info.start_time_ms = existing_info.start_time_ms

            if (
                existing_info.deployment_config == deployment_info.deployment_config
                and deployment_info.version is not None
                and existing_info.version == deployment_info.version
            ):
                return False

        # Reset constructor retry counter.
        self._replica_constructor_retry_counter = 0

        self._set_deployment_goal(deployment_info)

        # NOTE(edoakes): we must write a checkpoint before starting new
        # or pushing the updated config to avoid inconsistent state if we
        # crash while making the change.
        self._save_checkpoint_func()

        return True
Deploy the deployment.

        If the deployment already exists with the same version and config,
        this is a no-op and returns False.

        Returns:
            bool: Whether or not the deployment is being updated.
        
Deploy the deployment.
If the deployment already exists with the same version and config,
this is a no-op and returns False.
Deploy the deployment . If the deployment already exists with the same version and config this is a no - op and returns False .
def deploy(self, deployment_info: DeploymentInfo) -> bool:
        existing_info = self._target_info
        if existing_info is not None:
            deployment_info.start_time_ms = existing_info.start_time_ms
            if (
                existing_info.deployment_config == deployment_info.deployment_config
                and deployment_info.version is not None
                and existing_info.version == deployment_info.version
            ):
                return False
        self._replica_constructor_retry_counter = 0
        self._set_deployment_goal(deployment_info)
        self._save_checkpoint_func()
        return True
def deploy ( self , deployment_info : DeploymentInfo ) -> bool : existing_info = self . _target_info if existing_info is not None : deployment_info . start_time_ms = existing_info . start_time_ms if ( existing_info . deployment_config == deployment_info . deployment_config and deployment_info . version is not None and existing_info . version == deployment_info . version ) : return False self . _replica_constructor_retry_counter = 0 self . _set_deployment_goal ( deployment_info ) self . _save_checkpoint_func ( ) return True
Deploy the deployment.
Deploy the deployment .
"""Deploy the deployment.

        If the deployment already exists with the same version and config,
        this is a no-op and returns False.

        Returns:
            bool: Whether or not the deployment is being updated.
        """ # Ensures this method is idempotent. # Redeploying should not reset the deployment's start time. # Reset constructor retry counter. # NOTE(edoakes): we must write a checkpoint before starting new # or pushing the updated config to avoid inconsistent state if we # crash while making the change.
Whether or not the deployment is being updated.
Whether or not the deployment is being updated .
bool
self
deployment_info
DeploymentInfo