Skip to content

Commit

Permalink
Remove partial dependency in PCSContainerService (#1428)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1428

X-link: facebookresearch/fbpcp#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
  • Loading branch information
zhuang-93 authored and facebook-github-bot committed Aug 12, 2022
1 parent 419dce0 commit 38e9989
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fbpcs/common/service/pcs_container_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)

0 comments on commit 38e9989

Please sign in to comment.