private boolean waitForDesiredState(ApiClient apiClient, String name, String namespace,ActivityContext activityContext) throws HyscaleException {
        Long startTime = System.currentTimeMillis();
        boolean stable = false;
        int rotateThreshold = 5;
        int sleep = 3;
        try {
            int rotations = 0;
            while (System.currentTimeMillis() - startTime < DeployerConstants.MAX_WAIT_TIME_IN_MILLISECONDS) {
                rotations++;
                V1Deployment updatedDeployment = null;
                updatedDeployment = get(apiClient, name, namespace);
                LOGGER.debug("Patched deployment status :{} ", updatedDeployment.getStatus());
                if (status(updatedDeployment) == ResourceStatus.STABLE) {
                    stable = true;
                    break;
                }
                if (rotateThreshold == rotations) {
                    sleep++;
                    rotations = 0;
                }
                WorkflowLogger.continueActivity(activityContext);
                Thread.sleep(sleep * 1000L);
            }
        } catch (InterruptedException e) {
            LOGGER.error("Sleep Thread interrupted ", e);
            Thread.currentThread().interrupt();
        } catch (HyscaleException ex){
            LOGGER.error("Error while fetching deployment {}", ex.getHyscaleError(), ex);
        }
        return stable;
    }
@param deploymentList
@return list of service names from label of deployment
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/handler/impl/V1DeploymentHandler.java