From e2b390e06ed7124c724a772c36710cd0ad56124b Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Mon, 4 Nov 2024 16:32:08 -0500 Subject: [PATCH 1/3] set default on runner for websocket flag --- sdk/src/beta9/abstractions/base/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/src/beta9/abstractions/base/runner.py b/sdk/src/beta9/abstractions/base/runner.py index 1704f92d0..f7ecc00d0 100644 --- a/sdk/src/beta9/abstractions/base/runner.py +++ b/sdk/src/beta9/abstractions/base/runner.py @@ -132,6 +132,7 @@ def __init__( self.settings: SDKSettings = get_settings() self.config_context: ConfigContext = get_config_context() self.tmp_files: List[tempfile.NamedTemporaryFile] = [] + self.is_websocket: bool = False def print_invocation_snippet(self, url_type: str = "") -> None: """Print curl request to call deployed container URL""" @@ -159,7 +160,7 @@ def print_invocation_snippet(self, url_type: str = "") -> None: "-d '{}'", ] - if self.is_websocket: + if getattr(self, "is_websocket", False): commands = [ f"websocat '{res.url.replace('http://', 'ws://').replace('https://', 'wss://')}' \\", *( From f209b5684988102dcc2ae2f0a5c6aacce6608f88 Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Mon, 4 Nov 2024 16:33:24 -0500 Subject: [PATCH 2/3] no need for getattr if we have default --- sdk/src/beta9/abstractions/base/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/beta9/abstractions/base/runner.py b/sdk/src/beta9/abstractions/base/runner.py index f7ecc00d0..bce71b27b 100644 --- a/sdk/src/beta9/abstractions/base/runner.py +++ b/sdk/src/beta9/abstractions/base/runner.py @@ -160,7 +160,7 @@ def print_invocation_snippet(self, url_type: str = "") -> None: "-d '{}'", ] - if getattr(self, "is_websocket", False): + if self.is_websocket: commands = [ f"websocat '{res.url.replace('http://', 'ws://').replace('https://', 'wss://')}' \\", *( From c0a214de403361f0f236a64d5a51a394d3022bd1 Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Mon, 4 Nov 2024 16:33:36 -0500 Subject: [PATCH 3/3] bump sdk --- sdk/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/pyproject.toml b/sdk/pyproject.toml index 86c6258d4..638585cd3 100644 --- a/sdk/pyproject.toml +++ b/sdk/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "beta9" -version = "0.1.108" +version = "0.1.109" description = "" authors = ["beam.cloud "] packages = [