From a40331817346dd28f79ac62eda75abb811098f2e Mon Sep 17 00:00:00 2001 From: James Kebinger Date: Wed, 24 Sep 2025 11:15:17 -0500 Subject: [PATCH 1/3] Switch runs-on to ubuntu-latest because 20.04 is discontinued --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f68649..c7e4940 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: MIX_ENV: test GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 737b8291ecfafc829f15a70aec7036b7fc77eb02 Mon Sep 17 00:00:00 2001 From: James Kebinger Date: Wed, 24 Sep 2025 11:20:50 -0500 Subject: [PATCH 2/3] Fix remaining prefab_cloud_python references in examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated gunicorn example files to use sdk_reforge instead of prefab_cloud_python. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- examples/gunicorn/gunicorn_conf.py | 14 +++++++------- examples/gunicorn/test_app.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/gunicorn/gunicorn_conf.py b/examples/gunicorn/gunicorn_conf.py index 7312c2e..35fe79e 100644 --- a/examples/gunicorn/gunicorn_conf.py +++ b/examples/gunicorn/gunicorn_conf.py @@ -1,22 +1,22 @@ import logging -import prefab_cloud_python -from prefab_cloud_python import Options +import sdk_reforge +from sdk_reforge import Options def on_starting(server): logging.warning("Starting server") - prefab_cloud_python.set_options(Options(collect_sync_interval=5)) + sdk_reforge.set_options(Options(collect_sync_interval=5)) logging.warning( - f"current value of 'foobar' is {prefab_cloud_python.get_client().get('foobar')}" + f"current value of 'foobar' is {sdk_reforge.get_client().get('foobar')}" ) def post_worker_init(worker): # Initialize the client for each worker - prefab_cloud_python.reset_instance() + sdk_reforge.reset_instance() def on_exit(server): - logging.warning("shutting down prefab") - prefab_cloud_python.reset_instance() + logging.warning("shutting down reforge") + sdk_reforge.reset_instance() diff --git a/examples/gunicorn/test_app.py b/examples/gunicorn/test_app.py index 60f4df6..8b7e52e 100644 --- a/examples/gunicorn/test_app.py +++ b/examples/gunicorn/test_app.py @@ -1,8 +1,8 @@ -import prefab_cloud_python +import sdk_reforge def app(environ, start_response): - output = f"value of 'test.config' is {prefab_cloud_python.get_client().config_client().get('test.config')}".encode() + output = f"value of 'test.config' is {sdk_reforge.get_client().config_client().get('test.config')}".encode() start_response( "200 OK", [("Content-Type", "text/plain"), ("Content-Length", str(len(output)))] ) From d83295b4643aec2b4cbd1b32da1bd444662128d7 Mon Sep 17 00:00:00 2001 From: James Kebinger Date: Wed, 24 Sep 2025 11:26:26 -0500 Subject: [PATCH 3/3] Fix SSE connection manager test to use v2 API endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated test expectations to match current implementation: - Changed API endpoint from /api/v1/sse/config to /api/v2/sse/config - Updated header from x-prefab-start-at-id to Last-Event-ID 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- tests/test_sse_connection_manager.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_sse_connection_manager.py b/tests/test_sse_connection_manager.py index fe8a9e8..1c74a44 100644 --- a/tests/test_sse_connection_manager.py +++ b/tests/test_sse_connection_manager.py @@ -54,8 +54,8 @@ def test_backoff_on_failed_response(self, mock_sleep): mock_sleep.assert_has_calls(expected_calls, any_order=False) self.api_client.resilient_request.assert_called_with( - "/api/v1/sse/config", - headers={"x-prefab-start-at-id": "123", "accept": "text/event-stream"}, + "/api/v2/sse/config", + headers={"Last-Event-ID": "123", "accept": "text/event-stream"}, stream=True, auth=("authuser", "test_api_key"), timeout=(5, 60), @@ -110,8 +110,8 @@ def test_backoff_on_too_quick_connection(self, mock_sleep, mock_timing): mock_sleep.assert_has_calls(expected_calls, any_order=False) self.api_client.resilient_request.assert_called_with( - "/api/v1/sse/config", - headers={"x-prefab-start-at-id": "123", "accept": "text/event-stream"}, + "/api/v2/sse/config", + headers={"Last-Event-ID": "123", "accept": "text/event-stream"}, stream=True, auth=("authuser", "test_api_key"), timeout=(5, 60), @@ -149,8 +149,8 @@ def test_backoff_on_general_exception(self, mock_sleep): mock_sleep.assert_has_calls(expected_calls, any_order=False) self.api_client.resilient_request.assert_called_with( - "/api/v1/sse/config", - headers={"x-prefab-start-at-id": "123", "accept": "text/event-stream"}, + "/api/v2/sse/config", + headers={"Last-Event-ID": "123", "accept": "text/event-stream"}, stream=True, auth=("authuser", "test_api_key"), timeout=(5, 60), @@ -202,8 +202,8 @@ def test_backoff_reset_on_successful_connection(self, mock_sleep, mock_timing): mock_sleep.assert_has_calls(expected_calls, any_order=False) self.api_client.resilient_request.assert_called_with( - "/api/v1/sse/config", - headers={"x-prefab-start-at-id": "123", "accept": "text/event-stream"}, + "/api/v2/sse/config", + headers={"Last-Event-ID": "123", "accept": "text/event-stream"}, stream=True, auth=("authuser", "test_api_key"), timeout=(5, 60),