isolate 0.13.2__py3-none-any.whl → 0.13.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of isolate might be problematic. Click here for more details.
- isolate/_isolate_version.py +2 -2
- isolate/connections/_local/_base.py +2 -0
- isolate/connections/grpc/agent.py +7 -5
- {isolate-0.13.2.dist-info → isolate-0.13.4.dist-info}/METADATA +1 -1
- {isolate-0.13.2.dist-info → isolate-0.13.4.dist-info}/RECORD +9 -9
- {isolate-0.13.2.dist-info → isolate-0.13.4.dist-info}/LICENSE +0 -0
- {isolate-0.13.2.dist-info → isolate-0.13.4.dist-info}/WHEEL +0 -0
- {isolate-0.13.2.dist-info → isolate-0.13.4.dist-info}/entry_points.txt +0 -0
- {isolate-0.13.2.dist-info → isolate-0.13.4.dist-info}/top_level.txt +0 -0
isolate/_isolate_version.py
CHANGED
|
@@ -15,6 +15,7 @@ from typing import (
|
|
|
15
15
|
TypeVar,
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
+
from isolate import __version__ as isolate_version
|
|
18
19
|
from isolate.backends.common import get_executable_path, logged_io
|
|
19
20
|
from isolate.connections.common import AGENT_SIGNATURE
|
|
20
21
|
from isolate.logs import LogLevel, LogSource
|
|
@@ -138,6 +139,7 @@ class PythonExecutionBase(Generic[ConnectionType]):
|
|
|
138
139
|
immediately (so that we can seamlessly transfer logs)."""
|
|
139
140
|
|
|
140
141
|
custom_vars = {}
|
|
142
|
+
custom_vars["ISOLATE_SERVER_VERSION"] = isolate_version
|
|
141
143
|
custom_vars[AGENT_SIGNATURE] = "1"
|
|
142
144
|
custom_vars["PYTHONUNBUFFERED"] = "1"
|
|
143
145
|
|
|
@@ -17,13 +17,12 @@ from typing import (
|
|
|
17
17
|
import grpc
|
|
18
18
|
from grpc import ServicerContext, StatusCode
|
|
19
19
|
|
|
20
|
+
from isolate import __version__ as agent_version
|
|
20
21
|
from isolate.backends.common import sha256_digest_of
|
|
21
22
|
from isolate.connections.common import SerializationError, serialize_object
|
|
22
23
|
from isolate.connections.grpc import definitions
|
|
23
24
|
from isolate.connections.grpc.configuration import get_default_options
|
|
24
25
|
from isolate.connections.grpc.interface import from_grpc
|
|
25
|
-
from isolate.logger import logger
|
|
26
|
-
from isolate.logs import LogLevel, LogSource
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
@dataclass
|
|
@@ -44,6 +43,8 @@ class AgentServicer(definitions.AgentServicer):
|
|
|
44
43
|
context: ServicerContext,
|
|
45
44
|
) -> Iterator[definitions.PartialRunResult]:
|
|
46
45
|
self.log(f"A connection has been established: {context.peer()}!")
|
|
46
|
+
server_version = os.getenv("ISOLATE_SERVER_VERSION") or "unknown"
|
|
47
|
+
self.log(f"Isolate info: server {server_version}, agent {agent_version}")
|
|
47
48
|
|
|
48
49
|
extra_args = []
|
|
49
50
|
if request.HasField("setup_func"):
|
|
@@ -114,7 +115,7 @@ class AgentServicer(definitions.AgentServicer):
|
|
|
114
115
|
# depickling is basically involves code execution from the *user*.
|
|
115
116
|
function = from_grpc(function)
|
|
116
117
|
except SerializationError:
|
|
117
|
-
|
|
118
|
+
traceback.print_exc()
|
|
118
119
|
raise AbortException(
|
|
119
120
|
f"The {function_kind} function could not be deserialized."
|
|
120
121
|
)
|
|
@@ -151,7 +152,8 @@ class AgentServicer(definitions.AgentServicer):
|
|
|
151
152
|
definition = serialize_object(serialization_method, result)
|
|
152
153
|
except SerializationError:
|
|
153
154
|
if stringized_tb:
|
|
154
|
-
|
|
155
|
+
print(stringized_tb, file=sys.stderr)
|
|
156
|
+
self.log(traceback.format_exc())
|
|
155
157
|
raise AbortException(
|
|
156
158
|
"Error while serializing the execution result "
|
|
157
159
|
f"(object of type {type(result)})."
|
|
@@ -176,7 +178,7 @@ class AgentServicer(definitions.AgentServicer):
|
|
|
176
178
|
)
|
|
177
179
|
|
|
178
180
|
def log(self, message: str) -> None:
|
|
179
|
-
self._log.write(message)
|
|
181
|
+
self._log.write(message + "\n")
|
|
180
182
|
self._log.flush()
|
|
181
183
|
|
|
182
184
|
def abort_with_msg(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
isolate/__init__.py,sha256=uXOKnONs7sXgARNgElwr4_A1sKoA6ACHVEvs3IDiX1M,127
|
|
2
|
-
isolate/_isolate_version.py,sha256=
|
|
2
|
+
isolate/_isolate_version.py,sha256=dhPsd2j9Al5Z6JN-zXmB6-Uti2Ily2tvtEtKPTNHaCQ,413
|
|
3
3
|
isolate/_version.py,sha256=05pXvy-yr5t3I1m9JMn42Ilzpg7fa8IB2J8a3G7t1cU,274
|
|
4
4
|
isolate/logger.py,sha256=SehnK6rPx-HDqQHJ3sKWqhDGmD3fTDGBIkjnNQYnFJU,453
|
|
5
5
|
isolate/logs.py,sha256=R_AHUVYD18z_PhtK_mDWi9Gch79CxmwHY09hUDShtwg,2079
|
|
@@ -20,11 +20,11 @@ isolate/common/timestamp.py,sha256=seh7FrMRH4i1SCQavA8d-7z8qi0pP8lYYhd29gTPMwE,3
|
|
|
20
20
|
isolate/connections/__init__.py,sha256=oa0PNo7ZQ0StPIDvKnJ02_CNVMyfOhxJ3M1C0VMvj9c,627
|
|
21
21
|
isolate/connections/common.py,sha256=PAfBGKZNUdtFlZQlw3_nQaUCKQXTnEkxzNNRV_i4R2A,3498
|
|
22
22
|
isolate/connections/_local/__init__.py,sha256=6FtCKRSFBvTvjm5LNlNA-mieKEq3J7DZZRPcXVedERo,146
|
|
23
|
-
isolate/connections/_local/_base.py,sha256=
|
|
23
|
+
isolate/connections/_local/_base.py,sha256=YGf141VgXErrXYNyRN7sXcts2SemlFEEocZsKmLQfVM,6659
|
|
24
24
|
isolate/connections/_local/agent_startup.py,sha256=swCs6Q0yVkDw7w-RftizHSMyJDM7DQwuP3TB0qI1ucg,1552
|
|
25
25
|
isolate/connections/grpc/__init__.py,sha256=tcesLxlC36P6wSg2lBcO2egsJWMbSKwc8zFXhWac3YU,85
|
|
26
26
|
isolate/connections/grpc/_base.py,sha256=qyagLVl4BOmkJvbFDLyA2-IZNkXeTRGOgRGGcvcyQwM,5713
|
|
27
|
-
isolate/connections/grpc/agent.py,sha256=
|
|
27
|
+
isolate/connections/grpc/agent.py,sha256=CvcYunQkjwkKcN8NbXeyVWNJtgOvbpwjvUI0Cwl3OqE,7697
|
|
28
28
|
isolate/connections/grpc/configuration.py,sha256=50YvGGHA9uyKg74xU_gc73j7bsFk973uIpMhmw2HhxY,788
|
|
29
29
|
isolate/connections/grpc/interface.py,sha256=yt63kytgXRXrTnjePGJVdXz4LJJVSSrNkJCF1yz6FIE,2270
|
|
30
30
|
isolate/connections/grpc/definitions/__init__.py,sha256=Z0453Bbjoq-Oxm2Wfi9fae-BFf8YsZwmuh88strmvxo,459
|
|
@@ -53,9 +53,9 @@ isolate/server/health/health.proto,sha256=wE2_QD0OQAblKkEBG7sALLXEOj1mOLKG-FbC4t
|
|
|
53
53
|
isolate/server/health/health_pb2.py,sha256=onOdP3M4Tpqhqs2PlGcyfoKe2VVKUEDx5ALeRcObb9A,1899
|
|
54
54
|
isolate/server/health/health_pb2.pyi,sha256=CPyvxvDzra-1d-mBsukaJnscMUDBaqSACvo9LiXlFzo,2416
|
|
55
55
|
isolate/server/health/health_pb2_grpc.py,sha256=XgsULrnRBmYIqvKr8eI7bqs6NIea5A0kkqdOOc2JHBY,5303
|
|
56
|
-
isolate-0.13.
|
|
57
|
-
isolate-0.13.
|
|
58
|
-
isolate-0.13.
|
|
59
|
-
isolate-0.13.
|
|
60
|
-
isolate-0.13.
|
|
61
|
-
isolate-0.13.
|
|
56
|
+
isolate-0.13.4.dist-info/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
|
|
57
|
+
isolate-0.13.4.dist-info/METADATA,sha256=tcbkgDOLzXHtoonohNGTNVVOlXI_9UUI38P4GRV7UZo,3209
|
|
58
|
+
isolate-0.13.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
59
|
+
isolate-0.13.4.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
|
|
60
|
+
isolate-0.13.4.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
|
|
61
|
+
isolate-0.13.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|