Skip to content

initial impl for out-cluster communication#62

Merged
reiase merged 1 commit intomainfrom
feature/out_cluster
Apr 1, 2026
Merged

initial impl for out-cluster communication#62
reiase merged 1 commit intomainfrom
feature/out_cluster

Conversation

@reiase
Copy link
Copy Markdown
Contributor

@reiase reiase commented Apr 1, 2026

Overview:

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

@@ -0,0 +1,318 @@
"""High-level Python connector for out-cluster actor access."""

import asyncio

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'asyncio' is not used.

Copilot Autofix

AI 3 days ago

To fix an unused import, remove the corresponding import statement, ensuring that no remaining code depends on it. This reduces unnecessary dependencies and minor overhead in module loading.

In this file, the single best fix is to delete the import asyncio line at the top of python/pulsing/connect/proxy.py. No additional code changes or new imports are needed, because there are no references to asyncio in the provided code. Specifically, remove line 3 (import asyncio) and leave the remaining imports (inspect, logging, Any, ConnectActorRef, PulsingConnect, _check_response, _wrap_call) unchanged.

Suggested changeset 1
python/pulsing/connect/proxy.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/python/pulsing/connect/proxy.py b/python/pulsing/connect/proxy.py
--- a/python/pulsing/connect/proxy.py
+++ b/python/pulsing/connect/proxy.py
@@ -1,6 +1,5 @@
 """High-level Python connector for out-cluster actor access."""
 
-import asyncio
 import inspect
 import logging
 from typing import Any
EOF
@@ -1,6 +1,5 @@
"""High-level Python connector for out-cluster actor access."""

import asyncio
import inspect
import logging
from typing import Any
Copilot is powered by AI and may make mistakes. Always verify output.
from typing import Any

from pulsing._core import ConnectActorRef, PulsingConnect
from pulsing.core.protocol import _check_response, _wrap_call

Check notice

Code scanning / CodeQL

Unused import Note

Import of '_check_response' is not used.

Copilot Autofix

AI 3 days ago

The general fix for an unused import is to remove the unused name from the import statement while preserving any imported names that are actually used. This reduces unnecessary dependencies and slightly improves readability and load time.

In this specific case, in python/pulsing/connect/proxy.py, line 9 currently imports both _check_response and _wrap_call from pulsing.core.protocol, but only _wrap_call is used (in _ConnectMethodCaller._sync_call). To fix the issue without changing behavior, edit that line so it only imports _wrap_call. No other code changes or additional imports are required.

Suggested changeset 1
python/pulsing/connect/proxy.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/python/pulsing/connect/proxy.py b/python/pulsing/connect/proxy.py
--- a/python/pulsing/connect/proxy.py
+++ b/python/pulsing/connect/proxy.py
@@ -6,7 +6,7 @@
 from typing import Any
 
 from pulsing._core import ConnectActorRef, PulsingConnect
-from pulsing.core.protocol import _check_response, _wrap_call
+from pulsing.core.protocol import _wrap_call
 
 logger = logging.getLogger(__name__)
 
EOF
@@ -6,7 +6,7 @@
from typing import Any

from pulsing._core import ConnectActorRef, PulsingConnect
from pulsing.core.protocol import _check_response, _wrap_call
from pulsing.core.protocol import _wrap_call

logger = logging.getLogger(__name__)

Copilot is powered by AI and may make mistakes. Always verify output.
import asyncio

import pytest
import pulsing as pul

Check notice

Code scanning / CodeQL

Unused import Note test

Import of 'pul' is not used.

Copilot Autofix

AI 3 days ago

To fix the problem, remove the unused import statement import pulsing as pul from the test file. This eliminates the unnecessary alias and dependency without affecting existing functionality, since nothing in the snippet uses pul.

Concretely, in tests/python/test_connect.py, delete line 17 (import pulsing as pul) and leave the other imports intact. No additional methods, imports, or definitions are needed.

Suggested changeset 1
tests/python/test_connect.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tests/python/test_connect.py b/tests/python/test_connect.py
--- a/tests/python/test_connect.py
+++ b/tests/python/test_connect.py
@@ -14,7 +14,6 @@
 import asyncio
 
 import pytest
-import pulsing as pul
 from pulsing.core import remote
 
 
EOF
@@ -14,7 +14,6 @@
import asyncio

import pytest
import pulsing as pul
from pulsing.core import remote


Copilot is powered by AI and may make mistakes. Always verify output.
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.64624% with 170 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/pulsing-actor/src/connect/mod.rs 22.00% 78 Missing ⚠️
python/pulsing/connect/proxy.py 79.16% 35 Missing ⚠️
crates/pulsing-actor/src/connect/reference.rs 50.00% 28 Missing ⚠️
crates/pulsing-actor/src/transport/http2/server.rs 14.28% 24 Missing ⚠️
crates/pulsing-actor/src/system/handler.rs 0.00% 5 Missing ⚠️
Files with missing lines Coverage Δ
python/pulsing/connect/__init__.py 100.00% <100.00%> (ø)
python/pulsing/subprocess/ray_spawn.py 0.00% <ø> (ø)
crates/pulsing-actor/src/system/handler.rs 74.30% <0.00%> (-1.32%) ⬇️
crates/pulsing-actor/src/transport/http2/server.rs 61.33% <14.28%> (-2.91%) ⬇️
crates/pulsing-actor/src/connect/reference.rs 50.00% <50.00%> (ø)
python/pulsing/connect/proxy.py 79.16% <79.16%> (ø)
crates/pulsing-actor/src/connect/mod.rs 22.00% <22.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reiase reiase merged commit e195083 into main Apr 1, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants