From 38e998960b8307b55dab7604e1ed3c9080da895e Mon Sep 17 00:00:00 2001 From: Ziyan Huang Date: Thu, 11 Aug 2022 21:22:15 -0700 Subject: [PATCH] Remove partial dependency in PCSContainerService (#1428) Summary: Pull Request resolved: https://github.com/facebookresearch/fbpcs/pull/1428 X-link: https://github.com/facebookresearch/fbpcp/pull/405 We decided that validate_container_definitions should not be a public API in container service. This diff is to remove partial dependency in PCSContainerService The validation logic has been moved in D38629555, to ensure the backward compatibility, we firstly changed the function body to ``pass``. Differential Revision: D38604420 fbshipit-source-id: fe1f6fb35587ce975f6fce492ec60218facd90fd --- fbpcs/common/service/pcs_container_service.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fbpcs/common/service/pcs_container_service.py b/fbpcs/common/service/pcs_container_service.py index 25b04274f..57ee47828 100644 --- a/fbpcs/common/service/pcs_container_service.py +++ b/fbpcs/common/service/pcs_container_service.py @@ -7,6 +7,7 @@ # pyre-strict from typing import Dict, List, Optional +from warnings import warn from fbpcp.entity.container_instance import ContainerInstance from fbpcp.error.pcp import PcpError @@ -81,6 +82,7 @@ def get_current_instances_count(self) -> int: return self.inner_container_service.get_current_instances_count() def validate_container_definition(self, container_definition: str) -> None: - return self.inner_container_service.validate_container_definition( - container_definition + warn( + "validate container definitions in container service is deprecated", + DeprecationWarning, )