dex-python-sdk 1.45.7__tar.gz → 1.45.9__tar.gz
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.
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/PKG-INFO +1 -1
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_async_value_hydrator.py +7 -4
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_async_worker_dispatcher.py +1 -1
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_pull_worker.py +12 -16
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_value_hydrator.py +7 -4
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_worker_dispatcher.py +13 -1
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/async_worker.py +32 -38
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/pyproject.toml +1 -1
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/LEGACY_NOTICES.md +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/LICENSE +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/README.md +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/__init__.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_attribute_reads.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_credential_transport.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_flow_definition_upload.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_flow_service_tls.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_grpc_errors.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_history_point_mapping.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_invocation_context.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_message_size.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_native.pyi +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_pull_slot_streams.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_server_protocol.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_stop_flow_mapping.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_task_queue_names.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_utils.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/_value_mapper.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/action.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/async_client.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/attribute.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/attribute_match.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/attribute_values.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/blob_cache.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/channel.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/client.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/client_options.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/codec.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/condition.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/context.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/credential.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/dexpb/__init__.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/dexpb/dex_pb2.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/dexpb/dex_pb2.pyi +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/dexpb/dex_pb2_grpc.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_config.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_definition.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_info.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_options.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_result.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_service_tls_options.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/flow_state.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/graceful_completion_context.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/join.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/pull_registration.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/py.typed +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/rpc_invoke_options.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/runtime_errors.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/step.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/step_execution.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/stream.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/subflow.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/timer.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/wait.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/wait_options.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/worker.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/dex/worker_options.py +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/Cargo.lock +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/Cargo.toml +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/Cargo.toml +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/LICENSE +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/README.md +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/config.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/entry.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/error.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/format.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/lib.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/policy.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/store.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/tests/blob_cache_integration.rs +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/LICENSE +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/README.md +0 -0
- {dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs +0 -0
|
@@ -177,16 +177,19 @@ class AsyncValueHydrator:
|
|
|
177
177
|
) -> pb.InvokeWorkerRPCRequest:
|
|
178
178
|
result = pb.InvokeWorkerRPCRequest()
|
|
179
179
|
result.CopyFrom(request)
|
|
180
|
-
|
|
180
|
+
# Released TypeScript Clients leave the input of an input-free RPC unset.
|
|
181
|
+
has_input = request.HasField("input")
|
|
182
|
+
values = [request.input] if has_input else []
|
|
183
|
+
values.extend(entry.value for entry in request.attributes)
|
|
181
184
|
channel_messages = [
|
|
182
185
|
message
|
|
183
186
|
for channel_values in request.loaded_channel_messages.values()
|
|
184
187
|
for message in channel_values.messages
|
|
185
188
|
]
|
|
186
189
|
values.extend(message.value for message in channel_messages)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
hydrated_entries = iter(await self.hydrate_all(request.context.flow_id, values))
|
|
191
|
+
if has_input:
|
|
192
|
+
result.input.CopyFrom(next(hydrated_entries))
|
|
190
193
|
for entry in result.attributes:
|
|
191
194
|
entry.value.CopyFrom(next(hydrated_entries))
|
|
192
195
|
result_messages = [
|
|
@@ -386,7 +386,7 @@ class AsyncWorkerDispatcher(WorkerDispatcher):
|
|
|
386
386
|
)
|
|
387
387
|
arguments: list[object] = [context]
|
|
388
388
|
if rpc.input_codec is not None:
|
|
389
|
-
arguments.append(self.
|
|
389
|
+
arguments.append(self._decode_rpc_input(request, rpc.input_codec))
|
|
390
390
|
returned: Any = rpc.method(*arguments)
|
|
391
391
|
if isawaitable(returned):
|
|
392
392
|
returned = await returned
|
|
@@ -143,7 +143,7 @@ class PullWorkerRuntime:
|
|
|
143
143
|
self._permanent_error: RuntimeError | None = None
|
|
144
144
|
self._rejection_stop_task: asyncio.Task[None] | None = None
|
|
145
145
|
self._streams: set[PullStream] = set()
|
|
146
|
-
self._stopping
|
|
146
|
+
self._stopping = asyncio.Event()
|
|
147
147
|
self._loop: asyncio.AbstractEventLoop | None = None
|
|
148
148
|
self._stub: Any = None
|
|
149
149
|
self._slot_streams = PullSlotStreams(self, options)
|
|
@@ -209,6 +209,8 @@ class PullWorkerRuntime:
|
|
|
209
209
|
return None
|
|
210
210
|
|
|
211
211
|
async def run(self) -> None:
|
|
212
|
+
if self.is_stopping:
|
|
213
|
+
return
|
|
212
214
|
if self._should_warn_rpc_capacity:
|
|
213
215
|
_LOGGER.warning(
|
|
214
216
|
"RPCs may wait behind long-running Steps; use max_concurrent_tasks >= 2 or set reserved_rpc_tasks explicitly"
|
|
@@ -220,7 +222,6 @@ class PullWorkerRuntime:
|
|
|
220
222
|
self._loop = asyncio.get_running_loop()
|
|
221
223
|
self._loop_thread_id = threading.get_ident()
|
|
222
224
|
self._wake = asyncio.Event()
|
|
223
|
-
self._stopping = asyncio.Event()
|
|
224
225
|
self._stop_completed = asyncio.Event()
|
|
225
226
|
self._started.set()
|
|
226
227
|
channel: grpc.aio.Channel | None = None
|
|
@@ -256,7 +257,7 @@ class PullWorkerRuntime:
|
|
|
256
257
|
self._wake.set()
|
|
257
258
|
|
|
258
259
|
def _reconcile(self, stub: Any) -> None:
|
|
259
|
-
if self._stopping
|
|
260
|
+
if self._stopping.is_set():
|
|
260
261
|
return
|
|
261
262
|
self._stub = stub
|
|
262
263
|
self._slot_streams.reconcile()
|
|
@@ -324,8 +325,6 @@ class PullWorkerRuntime:
|
|
|
324
325
|
|
|
325
326
|
async def stop(self) -> None:
|
|
326
327
|
self.registration.record_stopping()
|
|
327
|
-
if self._stopping is None:
|
|
328
|
-
return
|
|
329
328
|
if self._stopping.is_set():
|
|
330
329
|
if self._stop_completed is not None:
|
|
331
330
|
await self._stop_completed.wait()
|
|
@@ -408,7 +407,7 @@ class PullWorkerRuntime:
|
|
|
408
407
|
|
|
409
408
|
@property
|
|
410
409
|
def is_stopping(self) -> bool:
|
|
411
|
-
return self._stopping
|
|
410
|
+
return self._stopping.is_set()
|
|
412
411
|
|
|
413
412
|
|
|
414
413
|
class PullStream:
|
|
@@ -538,14 +537,13 @@ class PullStream:
|
|
|
538
537
|
# Only the reopen rule continues this runner; a stream closed on purpose never reopens.
|
|
539
538
|
if not slot_streams.take_reopen_grant(self):
|
|
540
539
|
return
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
pass
|
|
540
|
+
try:
|
|
541
|
+
await asyncio.wait_for(
|
|
542
|
+
self.runtime._stopping.wait(),
|
|
543
|
+
timeout=backoff + random.uniform(0, backoff / 2),
|
|
544
|
+
)
|
|
545
|
+
except asyncio.TimeoutError:
|
|
546
|
+
pass
|
|
549
547
|
if code not in _PERMANENT_CODES and task_queue_mismatch is None:
|
|
550
548
|
backoff = min(backoff * 2, 5)
|
|
551
549
|
|
|
@@ -741,8 +739,6 @@ class PullStream:
|
|
|
741
739
|
loop = asyncio.get_running_loop()
|
|
742
740
|
reconnect_deadline = loop.time() + self.runtime.stop_drain_timeout
|
|
743
741
|
stopping = self.runtime._stopping
|
|
744
|
-
if stopping is None:
|
|
745
|
-
raise RuntimeError("pull Worker Stop event is unavailable")
|
|
746
742
|
stop_wait: asyncio.Task[bool] | None = None
|
|
747
743
|
try:
|
|
748
744
|
while True:
|
|
@@ -175,16 +175,19 @@ class ValueHydrator:
|
|
|
175
175
|
) -> pb.InvokeWorkerRPCRequest:
|
|
176
176
|
result = pb.InvokeWorkerRPCRequest()
|
|
177
177
|
result.CopyFrom(request)
|
|
178
|
-
|
|
178
|
+
# Released TypeScript Clients leave the input of an input-free RPC unset.
|
|
179
|
+
has_input = request.HasField("input")
|
|
180
|
+
values = [request.input] if has_input else []
|
|
181
|
+
values.extend(entry.value for entry in request.attributes)
|
|
179
182
|
channel_messages = [
|
|
180
183
|
message
|
|
181
184
|
for channel_values in request.loaded_channel_messages.values()
|
|
182
185
|
for message in channel_values.messages
|
|
183
186
|
]
|
|
184
187
|
values.extend(message.value for message in channel_messages)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
hydrated_entries = iter(self.hydrate_all(request.context.flow_id, values))
|
|
189
|
+
if has_input:
|
|
190
|
+
result.input.CopyFrom(next(hydrated_entries))
|
|
188
191
|
for entry in result.attributes:
|
|
189
192
|
entry.value.CopyFrom(next(hydrated_entries))
|
|
190
193
|
result_messages = [
|
|
@@ -26,6 +26,7 @@ from dex.attribute import (
|
|
|
26
26
|
_require_matching_hard_delete_on_null,
|
|
27
27
|
)
|
|
28
28
|
from dex.channel import Channel, ChannelMap, ChannelMapLoad
|
|
29
|
+
from dex.codec import Codec
|
|
29
30
|
from dex.condition import (
|
|
30
31
|
ChannelCondition,
|
|
31
32
|
Condition,
|
|
@@ -301,7 +302,7 @@ class WorkerDispatcher:
|
|
|
301
302
|
)
|
|
302
303
|
arguments: list[object] = [context]
|
|
303
304
|
if rpc.input_codec is not None:
|
|
304
|
-
arguments.append(self.
|
|
305
|
+
arguments.append(self._decode_rpc_input(request, rpc.input_codec))
|
|
305
306
|
returned = rpc.method(*arguments)
|
|
306
307
|
if isawaitable(returned):
|
|
307
308
|
raise TypeError(
|
|
@@ -760,6 +761,17 @@ class WorkerDispatcher:
|
|
|
760
761
|
)
|
|
761
762
|
return mapped
|
|
762
763
|
|
|
764
|
+
def _decode_rpc_input(
|
|
765
|
+
self,
|
|
766
|
+
request: pb.InvokeWorkerRPCRequest,
|
|
767
|
+
input_codec: Codec[Any],
|
|
768
|
+
) -> object:
|
|
769
|
+
if not request.HasField("input"):
|
|
770
|
+
raise ValueMappingError(
|
|
771
|
+
"decode", f"RPC {request.rpc_name!r} request is missing its input"
|
|
772
|
+
)
|
|
773
|
+
return self._values.decode(request.input, input_codec)
|
|
774
|
+
|
|
763
775
|
def _result_attribute_writes(
|
|
764
776
|
self,
|
|
765
777
|
context: InvocationContext,
|
|
@@ -184,6 +184,10 @@ class AsyncWorker:
|
|
|
184
184
|
clamped to the cap with a warning instead. See
|
|
185
185
|
``PullWorkerOptions.min_open_slots``.
|
|
186
186
|
|
|
187
|
+
.. versionchanged:: 1.45.9
|
|
188
|
+
If ``stop`` or ``close`` occurs during startup, no task stream opens.
|
|
189
|
+
Cancellation of the start task also releases resources.
|
|
190
|
+
|
|
187
191
|
Raises:
|
|
188
192
|
PullRegistrationError: A permanent stream rejection stops this Worker.
|
|
189
193
|
RuntimeError: If lifecycle state is invalid, Server protocol 4 is
|
|
@@ -198,12 +202,22 @@ class AsyncWorker:
|
|
|
198
202
|
start_error: BaseException | None = None
|
|
199
203
|
try:
|
|
200
204
|
await self._start()
|
|
205
|
+
except asyncio.CancelledError as failure:
|
|
206
|
+
# Channel shutdown cancels RPCs without a cancellation request on the start task.
|
|
207
|
+
task = asyncio.current_task()
|
|
208
|
+
if (task is not None and task.cancelling()) or self._state not in (
|
|
209
|
+
"stopping",
|
|
210
|
+
"stopped",
|
|
211
|
+
"closed",
|
|
212
|
+
):
|
|
213
|
+
start_error = failure
|
|
214
|
+
raise
|
|
201
215
|
except BaseException as failure:
|
|
202
216
|
start_error = failure
|
|
203
217
|
raise
|
|
204
218
|
finally:
|
|
205
219
|
self._pull.registration.finish_start(start_error)
|
|
206
|
-
if self._state
|
|
220
|
+
if self._state in ("starting", "uploading", "running"):
|
|
207
221
|
await self.stop()
|
|
208
222
|
|
|
209
223
|
async def wait_pull_registered(self, timeout: float | None = None) -> None:
|
|
@@ -310,33 +324,28 @@ class AsyncWorker:
|
|
|
310
324
|
async def _start(self) -> None:
|
|
311
325
|
if self._state != "created":
|
|
312
326
|
raise RuntimeError(f"AsyncWorker cannot start from state {self._state}")
|
|
327
|
+
self._state = "starting"
|
|
313
328
|
try:
|
|
314
329
|
server_info = await self._flow_service.GetServerInfo(
|
|
315
330
|
empty_pb2.Empty(),
|
|
316
331
|
timeout=self.options.attribute_index_sync_timeout.total_seconds(),
|
|
317
332
|
)
|
|
318
333
|
except grpc.RpcError as failure:
|
|
319
|
-
self._state
|
|
320
|
-
|
|
321
|
-
self._stopped.set()
|
|
334
|
+
if self._state != "starting":
|
|
335
|
+
return
|
|
322
336
|
raise server_info_request_error(self._sdk_version, failure) from failure
|
|
323
337
|
except Exception as failure:
|
|
324
|
-
self._state
|
|
325
|
-
|
|
326
|
-
self._stopped.set()
|
|
338
|
+
if self._state != "starting":
|
|
339
|
+
return
|
|
327
340
|
raise RuntimeError("cannot get Dex server info") from failure
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
)
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
self._state = "stopped"
|
|
337
|
-
await self._close_failed_start_channel()
|
|
338
|
-
self._stopped.set()
|
|
339
|
-
raise
|
|
341
|
+
if self._state != "starting":
|
|
342
|
+
return
|
|
343
|
+
self._server_protocol.record_version(
|
|
344
|
+
negotiate_server_protocol(server_info, self._sdk_version)
|
|
345
|
+
)
|
|
346
|
+
self._server_protocol.require_named_task_queue_support(
|
|
347
|
+
self.options.pull.task_queue
|
|
348
|
+
)
|
|
340
349
|
try:
|
|
341
350
|
await self._flow_service.SyncAttributeIndexes(
|
|
342
351
|
pb.SyncAttributeIndexRequest(
|
|
@@ -344,16 +353,12 @@ class AsyncWorker:
|
|
|
344
353
|
),
|
|
345
354
|
timeout=self.options.attribute_index_sync_timeout.total_seconds(),
|
|
346
355
|
)
|
|
347
|
-
except grpc.RpcError as failure:
|
|
348
|
-
self._state = "stopped"
|
|
349
|
-
await self._close_failed_start_channel()
|
|
350
|
-
self._stopped.set()
|
|
351
|
-
raise RuntimeError("cannot synchronize Attribute indexes") from failure
|
|
352
356
|
except Exception as failure:
|
|
353
|
-
self._state
|
|
354
|
-
|
|
355
|
-
self._stopped.set()
|
|
357
|
+
if self._state != "starting":
|
|
358
|
+
return
|
|
356
359
|
raise RuntimeError("cannot synchronize Attribute indexes") from failure
|
|
360
|
+
if self._state != "starting":
|
|
361
|
+
return
|
|
357
362
|
self._state = "uploading"
|
|
358
363
|
self._upload_task = asyncio.ensure_future(
|
|
359
364
|
upload_worker_flow_definitions_async(
|
|
@@ -368,10 +373,6 @@ class AsyncWorker:
|
|
|
368
373
|
)
|
|
369
374
|
try:
|
|
370
375
|
await self._upload_task
|
|
371
|
-
except asyncio.CancelledError:
|
|
372
|
-
# Stop cancels the upload; any other cancellation belongs to start.
|
|
373
|
-
if self._state == "uploading":
|
|
374
|
-
raise
|
|
375
376
|
finally:
|
|
376
377
|
self._upload_task = None
|
|
377
378
|
if self._state != "uploading":
|
|
@@ -436,10 +437,3 @@ class AsyncWorker:
|
|
|
436
437
|
if self._credential_runner is not None:
|
|
437
438
|
self._credential_runner.close()
|
|
438
439
|
self._state = "closed"
|
|
439
|
-
|
|
440
|
-
async def _close_failed_start_channel(self) -> None:
|
|
441
|
-
try:
|
|
442
|
-
await self._flow_channel.close(None)
|
|
443
|
-
finally:
|
|
444
|
-
if self._credential_runner is not None:
|
|
445
|
-
self._credential_runner.close()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dex-python-sdk"
|
|
3
3
|
# Publish uses tag sdk-python/v*; CI stamps this for release builds.
|
|
4
|
-
version = "1.45.
|
|
4
|
+
version = "1.45.9"
|
|
5
5
|
description = "Python SDK for the Dex workflow engine"
|
|
6
6
|
authors = [{name = "Super Durable"}]
|
|
7
7
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/config.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/format.rs
RENAMED
|
File without changes
|
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache/src/policy.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml
RENAMED
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/LICENSE
RENAMED
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/README.md
RENAMED
|
File without changes
|
{dex_python_sdk-1.45.7 → dex_python_sdk-1.45.9}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs
RENAMED
|
File without changes
|