From 4983a77be75f6d8e5113c4872d71dfd8f48177ec Mon Sep 17 00:00:00 2001 From: Ziqi Huang Date: Tue, 9 Aug 2022 17:23:17 -0700 Subject: [PATCH] Modify PCSContainerInstance to use keyword arguments (#400) Summary: X-link: https://github.com/facebookresearch/fbpcp/pull/400 ## Context We want to enable customized containers in our infra ([design doc](https://docs.google.com/document/d/1UqaK6VXEoIVUHSJnYs_Ydju8)). Therefore we need to add cpu & memory properties to ContainerInstance; ## This commit Change ```PCSContainerInstance``` to use keyword arguments to prevent breaks when we add cpu and memory to ```ContainerInstance ``` later Differential Revision: D38553232 fbshipit-source-id: b96624305a4443e5ec7801d0f44f258132bceba0 --- fbpcs/common/entity/pcs_container_instance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fbpcs/common/entity/pcs_container_instance.py b/fbpcs/common/entity/pcs_container_instance.py index 7075c0f6f..e70046bd7 100644 --- a/fbpcs/common/entity/pcs_container_instance.py +++ b/fbpcs/common/entity/pcs_container_instance.py @@ -23,8 +23,8 @@ def from_container_instance( cls, container_instance: ContainerInstance, log_url: Optional[str] = None ) -> "PCSContainerInstance": return cls( - container_instance.instance_id, - container_instance.ip_address, - container_instance.status, - log_url, + instance_id=container_instance.instance_id, + ip_address=container_instance.ip_address, + status=container_instance.status, + log_url=log_url, )