51
51
from temporalio .worker import Worker
52
52
from tests .helpers .nexus import create_nexus_endpoint , make_nexus_endpoint_name
53
53
54
- # TODO(dan ): test availability of Temporal client etc in async context set by worker
55
- # TODO(dan ): test worker shutdown, wait_all_completed, drain etc
56
- # TODO(dan ): test worker op handling failure
54
+ # TODO(nexus-prerelease ): test availability of Temporal client etc in async context set by worker
55
+ # TODO(nexus-prerelease ): test worker shutdown, wait_all_completed, drain etc
56
+ # TODO(nexus-prerelease ): test worker op handling failure
57
57
58
58
# -----------------------------------------------------------------------------
59
59
# Test definition
@@ -145,7 +145,7 @@ async def run(
145
145
)
146
146
147
147
148
- # TODO: make types pass pyright strict mode
148
+ # TODO(nexus-prerelease): check type-checking passing in CI
149
149
150
150
151
151
class SyncOrAsyncOperation (OperationHandler [OpInput , OpOutput ]):
@@ -156,7 +156,7 @@ async def start(
156
156
StartOperationResultAsync ,
157
157
]:
158
158
if input .response_type .exception_in_operation_start :
159
- # TODO(dan ): don't think RPCError should be used here
159
+ # TODO(nexus-prerelease ): don't think RPCError should be used here
160
160
raise RPCError (
161
161
"RPCError INVALID_ARGUMENT in Nexus operation" ,
162
162
RPCStatusCode .INVALID_ARGUMENT ,
@@ -381,7 +381,7 @@ class UntypedCallerWorkflow:
381
381
def __init__ (
382
382
self , input : CallerWfInput , request_cancel : bool , task_queue : str
383
383
) -> None :
384
- # TODO(dan ): untyped caller cannot reference name of implementation. I think this is as it should be.
384
+ # TODO(nexus-prerelease ): untyped caller cannot reference name of implementation. I think this is as it should be.
385
385
service_name = "ServiceInterface"
386
386
self .nexus_client = workflow .NexusClient (
387
387
service = service_name ,
@@ -427,9 +427,9 @@ async def run(
427
427
#
428
428
429
429
430
- # TODO(dan ): cross-namespace tests
431
- # TODO(dan ): nexus endpoint pytest fixture?
432
- # TODO(dan ): test headers
430
+ # TODO(nexus-prerelease ): cross-namespace tests
431
+ # TODO(nexus-prerelease ): nexus endpoint pytest fixture?
432
+ # TODO(nexus-prerelease ): test headers
433
433
@pytest .mark .parametrize ("exception_in_operation_start" , [False , True ])
434
434
@pytest .mark .parametrize ("request_cancel" , [False , True ])
435
435
@pytest .mark .parametrize (
@@ -476,7 +476,7 @@ async def test_sync_response(
476
476
task_queue = task_queue ,
477
477
)
478
478
479
- # TODO(dan ): check bidi links for sync operation
479
+ # TODO(nexus-prerelease ): check bidi links for sync operation
480
480
481
481
# The operation result is returned even when request_cancel=True, because the
482
482
# response was synchronous and it could not be cancelled. See explanation below.
@@ -551,7 +551,7 @@ async def test_async_response(
551
551
)
552
552
return
553
553
554
- # TODO(dan ): race here? How do we know it hasn't been canceled already?
554
+ # TODO(nexus-prerelease ): race here? How do we know it hasn't been canceled already?
555
555
handler_wf_info = await handler_wf_handle .describe ()
556
556
assert handler_wf_info .status in [
557
557
WorkflowExecutionStatus .RUNNING ,
@@ -736,8 +736,8 @@ class ServiceClassNameOutput:
736
736
name : str
737
737
738
738
739
- # TODO(dan ): test interface op types not matching
740
- # TODO(dan ): async and non-async cancel methods
739
+ # TODO(nexus-prerelease ): test interface op types not matching
740
+ # TODO(nexus-prerelease ): async and non-async cancel methods
741
741
742
742
743
743
@nexusrpc .service
@@ -822,12 +822,12 @@ async def run(
822
822
endpoint = make_nexus_endpoint_name (task_queue ),
823
823
)
824
824
825
- # TODO(dan ): maybe not surprising that this doesn't type check given complexity of
825
+ # TODO(nexus-prerelease ): maybe not surprising that this doesn't type check given complexity of
826
826
# the union?
827
827
return await nexus_client .execute_operation (service_cls .op , None ) # type: ignore
828
828
829
829
830
- # TODO(dan ): check missing decorator behavior
830
+ # TODO(nexus-prerelease ): check missing decorator behavior
831
831
832
832
833
833
async def test_service_interface_and_implementation_names (client : Client ):
@@ -979,8 +979,8 @@ async def test_workflow_run_operation_can_execute_workflow_before_starting_backi
979
979
assert result == "result-1-result-2"
980
980
981
981
982
- # TODO(dan ): test invalid service interface implementations
983
- # TODO(dan ): test caller passing output_type
982
+ # TODO(nexus-prerelease ): test invalid service interface implementations
983
+ # TODO(nexus-prerelease ): test caller passing output_type
984
984
985
985
986
986
async def assert_caller_workflow_has_link_to_handler_workflow (
@@ -1444,10 +1444,10 @@ def __init__(self, input: ErrorTestInput):
1444
1444
async def run (self , input : ErrorTestInput ) -> None :
1445
1445
try :
1446
1446
await self .nexus_client .execute_operation (
1447
- # TODO(nexus-preview ): why wasn't this a type error?
1447
+ # TODO(nexus-prerelease ): why wasn't this a type error?
1448
1448
# ErrorTestService.op, ErrorTestCallerWfInput()
1449
1449
ErrorTestService .op ,
1450
- # TODO(nexus-preview ): why wasn't this a type error?
1450
+ # TODO(nexus-prerelease ): why wasn't this a type error?
1451
1451
# None
1452
1452
input ,
1453
1453
)
0 commit comments