-
Notifications
You must be signed in to change notification settings - Fork 20
Add new_uuid method to client #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Update entity messages to use UUIDs as requestIds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new_uuid() method to the OrchestrationContext to generate replay-safe UUIDs, which is required for Azure Functions compatibility where the entity protocol needs request IDs to be parseable as GUIDs in .NET.
Key changes:
- Implements
new_uuid()method using RFC 4122 §4.3 name-based UUID generation with orchestration instance ID, current UTC datetime, and an internal counter - Updates entity message functions to use generated UUIDs instead of simple string concatenations for request IDs
- Adds comprehensive end-to-end tests validating UUID uniqueness across replays
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| durabletask/task.py | Adds abstract new_uuid() method definition with documentation to OrchestrationContext |
| durabletask/worker.py | Implements new_uuid() method in _RuntimeOrchestrationContext and updates entity operations to use generated UUIDs |
| durabletask/internal/helpers.py | Updates new_call_entity_action() and new_signal_entity_action() function signatures to accept request_id parameter |
| tests/durabletask/test_orchestration_e2e.py | Adds test validating UUID uniqueness before and after orchestration replay |
| tests/durabletask-azuremanaged/test_dts_orchestration_e2e.py | Adds test validating UUID uniqueness before and after orchestration replay for Azure-managed scenario |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
@andystaples I've opened a new pull request, #84, to work on those changes. Once the pull request is ready, I'll request review from you. |
Adds new_uuid to the OrchestrationContext to allow generating replay-safe UUIDs. Also update entity messages to use UUIDs generated using this method as requestIds. This is a prerequisite for working with azure functions as the older entity protocol requires these IDs to be parsed as GUID in the .NET.