Repository navigation
fix(client): propagate resolved instance ID and version to schedule request builder - #345
Conversation
…t builder Signed-off-by: Hardik Kaurani <hardikkaurani1@gmail.com>
…an instance ID Signed-off-by: Hardik Kaurani <hardikkaurani1@gmail.com>
…pan instance ID Signed-off-by: Hardik Kaurani <hardikkaurani1@gmail.com>
… in schedule_new_orchestration Signed-off-by: Hardik Kaurani <hardikkaurani1@gmail.com>
|
Hi Bernd Verst (@berndverst) andystaples, I've opened this PR to address #343 across four focused commits. When Unit tests covering both synchronous and asynchronous clients have also been added. Thank you for your time! |
|
Hardik K (@hardikkaurani) Please make sure additions, changes, removals, and fixes, including small ones like these, are documented in the CHANGELOG files for all three libraries in the future. Just this once, I've approved and merged this one, and we will handle it in a follow-up, but expect it to block approvals in the future. |
Summary of Changes
Closes #343
When
schedule_new_orchestration()is invoked without an explicitinstance_id,resolved_instance_idis computed for the OpenTelemetry create-orchestration producer span. Previously, however,instance_id=instance_id(which isNone) was passed tobuild_schedule_new_orchestration_req().As a result,
build_schedule_new_orchestration_req()generated a second random UUID for the backendCreateInstanceRequest. This caused the emitted OpenTelemetry span to record an instance ID that did not match the actual scheduled orchestration instance ID.Changes Across Commits
Commit 1:
fix(client): pass resolved instance ID and version to schedule request builderTaskHubGrpcClient.schedule_new_orchestration()andAsyncTaskHubGrpcClient.schedule_new_orchestration()to passinstance_id=resolved_instance_idandversion=resolved_versiontobuild_schedule_new_orchestration_req().Commit 2:
test(tracing): verify sync schedule_new_orchestration matches OTel span instance IDschedule_new_orchestration()matches thedurabletask.task.instance_idattribute on the emitted producer span.Commit 3:
test(tracing): verify async schedule_new_orchestration matches OTel span instance IDAsyncTaskHubGrpcClient.schedule_new_orchestration()with an auto-generated instance ID records the same ID in the emitted producer span.Commit 4:
docs(client): document instance ID and version resolution propagation in schedule_new_orchestrationVerification
pytest tests/durabletask/test_client.py tests/durabletask/test_tracing.py