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: 74e63e0bd150e398b1a427fe35339b9ab0de6b39
  • Loading branch information
zhuang-93 authored and facebook-github-bot committed Aug 16, 2022
1 parent 989f88f commit 8281764
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fbpcs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Types of changes
### Added

### Changed

- Mark validate_container_definition as deprecated in PCSContainerService since it is no longer a public method in ContainerService in fbpcp
### Removed

## [1.10.0] - 2022-08-12
Expand Down
9 changes: 6 additions & 3 deletions fbpcs/common/service/pcs_container_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from fbpcs.common.entity.pcs_container_instance import PCSContainerInstance
from fbpcs.experimental.cloud_logs.log_retriever import CloudProvider, LogRetriever

from fbpcs.private_computation.service.utils import deprecated


class PCSContainerService(ContainerService):
def __init__(self, inner_container_service: ContainerService) -> None:
Expand Down Expand Up @@ -80,7 +82,8 @@ def cancel_instances(self, instance_ids: List[str]) -> List[Optional[PcpError]]:
def get_current_instances_count(self) -> int:
return self.inner_container_service.get_current_instances_count()

@deprecated(
"validate_container_definition is no longer a public method in container service"
)
def validate_container_definition(self, container_definition: str) -> None:
return self.inner_container_service.validate_container_definition(
container_definition
)
pass

0 comments on commit 8281764

Please sign in to comment.