Skip to content

Conversation

@andystaples
Copy link
Contributor

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.

- Update entity messages to use UUIDs as requestIds
Copy link
Contributor

Copilot AI left a 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.

Copy link

Copilot AI commented Dec 5, 2025

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants