From cdec71dad85d4792dd6278ad06991485e4baaffb Mon Sep 17 00:00:00 2001 From: CalebTVanDyke Date: Thu, 21 Dec 2023 11:21:26 -0600 Subject: [PATCH 1/2] bump version for next release --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d9135ea0..944b19ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "buildflow" -version = "0.3.1" +version = "0.3.2" authors = [ { name = "Caleb Van Dyke", email = "caleb@launchflow.com" }, { name = "Josh Tanke", email = "josh@launchflow.com" }, From cf0be2d6f2433f40a0390cf83d84cf303514492d Mon Sep 17 00:00:00 2001 From: CalebTVanDyke Date: Thu, 21 Dec 2023 16:21:05 -0600 Subject: [PATCH 2/2] fix how we find num replicas for endpoints and collectors --- .../actors/collector_pattern/receive_process_push_ack.py | 7 ++++++- .../actors/endpoint_pattern/receive_process_respond.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/buildflow/core/app/runtime/actors/collector_pattern/receive_process_push_ack.py b/buildflow/core/app/runtime/actors/collector_pattern/receive_process_push_ack.py index 142b6a36..1eec2a77 100644 --- a/buildflow/core/app/runtime/actors/collector_pattern/receive_process_push_ack.py +++ b/buildflow/core/app/runtime/actors/collector_pattern/receive_process_push_ack.py @@ -158,7 +158,12 @@ async def snapshot(self) -> Snapshot: avg_process_time_millis=0, ) if self.collector_deployment is not None: - num_replicas = self.collector_deployment.num_replicas + num_replicas = ( + serve.status() + .applications.get(self.processor_group.group_id, {}) + .deployments.get(self.endpoint_deployment.name, {}) + .replica_states.get("RUNNING", 0) + ) else: num_replicas = 0 diff --git a/buildflow/core/app/runtime/actors/endpoint_pattern/receive_process_respond.py b/buildflow/core/app/runtime/actors/endpoint_pattern/receive_process_respond.py index 966a400a..6499037f 100644 --- a/buildflow/core/app/runtime/actors/endpoint_pattern/receive_process_respond.py +++ b/buildflow/core/app/runtime/actors/endpoint_pattern/receive_process_respond.py @@ -146,7 +146,12 @@ async def snapshot(self) -> Snapshot: avg_process_time_millis=0, ) if self.endpoint_deployment is not None: - num_replicas = self.endpoint_deployment.num_replicas + num_replicas = ( + serve.status() + .applications.get(self.processor_group.group_id, {}) + .deployments.get(self.endpoint_deployment.name, {}) + .replica_states.get("RUNNING", 0) + ) else: num_replicas = 0