Skip to content

Commit f150b5a

Browse files
committed
remove validate grpc key prefix
Signed-off-by: Filinto Duran <1373693+filintod@users.noreply.github.com>
1 parent f3442db commit f150b5a

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

durabletask/aio/internal/shared.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
INSECURE_PROTOCOLS,
1212
SECURE_PROTOCOLS,
1313
get_default_host_address,
14-
validate_grpc_options,
1514
)
1615

1716
ClientInterceptor = Union[
@@ -51,9 +50,6 @@ def get_grpc_aio_channel(
5150
host_address = host_address[len(protocol) :]
5251
break
5352

54-
if options is not None:
55-
validate_grpc_options(options)
56-
5753
if secure_channel:
5854
channel = grpc_aio.secure_channel(
5955
host_address, grpc.ssl_channel_credentials(), interceptors=interceptors, options=options

durabletask/worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ def create_fresh_connection():
308308
current_stub = None
309309
try:
310310
current_channel = shared.get_grpc_channel(
311-
self._host_address, self._secure_channel, self._interceptors, options=self._channel_options
311+
self._host_address,
312+
self._secure_channel,
313+
self._interceptors,
314+
options=self._channel_options,
312315
)
313316
current_stub = stubs.TaskHubSidecarServiceStub(current_channel)
314317
current_stub.Hello(empty_pb2.Empty())

tests/durabletask/test_orchestration_e2e.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ def empty_orchestrator(ctx: task.OrchestrationContext, _):
3333
w.start()
3434

3535
# set a custom max send length option
36-
c = client.TaskHubGrpcClient(
37-
channel_options=channel_options
38-
)
36+
c = client.TaskHubGrpcClient(channel_options=channel_options)
3937
id = c.schedule_new_orchestration(empty_orchestrator)
4038
state = c.wait_for_orchestration_completion(id, timeout=30)
4139

tests/durabletask/test_orchestration_e2e_async.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,11 @@ def sequence(ctx: task.OrchestrationContext, start_val: int):
6262
numbers.append(current)
6363
return numbers
6464

65-
channel_options =[
66-
("grpc.max_send_message_length", 1024 * 1024), # 1MB
67-
]
65+
channel_options = [
66+
("grpc.max_send_message_length", 1024 * 1024), # 1MB
67+
]
6868
# Start a worker, which will connect to the sidecar in a background thread
69-
with worker.TaskHubGrpcWorker(
70-
channel_options=channel_options
71-
) as w:
69+
with worker.TaskHubGrpcWorker(channel_options=channel_options) as w:
7270
w.add_orchestrator(sequence)
7371
w.add_activity(plus_one)
7472
w.start()

0 commit comments

Comments
 (0)