Skip to content

Andystaples/add functions support#155

Draft
andystaples wants to merge 28 commits into
microsoft:mainfrom
andystaples:andystaples/add-functions-support
Draft

Andystaples/add functions support#155
andystaples wants to merge 28 commits into
microsoft:mainfrom
andystaples:andystaples/add-functions-support

Conversation

@andystaples

Copy link
Copy Markdown
Contributor

DRAFT: adds azure-functions-durable v2 to this package - complete rewrite of the functions durable story based on durabletask

andystaples and others added 28 commits November 6, 2025 10:01
- Still needs eventSent and eventRecieved implementations
- Add new_uuid method to OrchestrationContext for deterministic replay-safe UUIDs
- Fix entity locking behavior for Functions
- Align _RuntimeOrchestrationContext param names with OrchestrationContext
- Remap __init__.py files for new module
- Update version to 0.0.1dev0
- Add docstrings to missing methods
- Move code for executing orchestrators/entities to DurableFunctionsWorker
- Add function metadata to triggers for detection by extension
…ions-support

# Conflicts:
#	durabletask/client.py
#	durabletask/internal/shared.py
#	durabletask/worker.py
#	pyproject.toml
@andystaples andystaples marked this pull request as ready for review June 25, 2026 16:30
Copilot AI review requested due to automatic review settings June 25, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new azure-functions-durable package (v2 rewrite) built on top of the core durabletask runtime, along with CI/release pipeline updates to lint, type-check, build, and publish it. It also includes a small core SDK change to better handle double-encoded entity operation results in a specific event path.

Changes:

  • Added a new azure-functions-durable package implementing Durable Functions worker/client/decorators on top of durabletask.
  • Updated CI pipelines (ADO + GitHub Actions) to lint, type-check, build, test, and release the new package.
  • Adjusted durabletask/worker.py entity event result handling to attempt a second JSON decode when results arrive double-encoded.

Reviewed changes

Copilot reviewed 23 out of 25 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/azure-functions-durable/test_smoke.py Adds a basic smoke test to ensure the new public API imports.
tests/azure-functions-durable/init.py Initializes the new test package directory.
requirements.txt Adds azure-functions to CI/dev requirements for the new provider/tests.
eng/templates/build.yml Updates build template to lint/build/install/test the new package and bumps Python to 3.13.
eng/ci/release.yml Adds ESRP release job to publish azure-functions-durable.
durabletask/worker.py Adds fallback decoding for double-encoded entity operation results in eventRaised handling.
azure-functions-durable/pyrightconfig.json Adds strict pyright configuration for the new package targeting Python 3.13.
azure-functions-durable/pyproject.toml Defines packaging metadata and dependencies for azure-functions-durable.
azure-functions-durable/CHANGELOG.md Introduces a new changelog for the package.
azure-functions-durable/azure/durable_functions/init.py Exposes the public API surface and installs custom serialization on import.
azure-functions-durable/azure/durable_functions/worker.py Implements an Azure Functions-oriented worker wrapper around TaskHubGrpcWorker execution methods.
azure-functions-durable/azure/durable_functions/orchestrator.py Adds an orchestrator wrapper compatible with Functions invocation patterns.
azure-functions-durable/azure/durable_functions/client.py Adds a Functions durable client wrapper over TaskHubGrpcClient, plus HTTP response helpers.
azure-functions-durable/azure/durable_functions/constants.py Adds binding/trigger name constants.
azure-functions-durable/azure/durable_functions/decorators/durable_app.py Implements Blueprint / DFApp decorators integrating with azure-functions decorator APIs.
azure-functions-durable/azure/durable_functions/decorators/metadata.py Adds trigger/binding metadata classes for orchestration/activity/entity/client bindings.
azure-functions-durable/azure/durable_functions/decorators/init.py Package init for decorators module.
azure-functions-durable/azure/durable_functions/http/http_management_payload.py Implements a management-URLs payload type for HTTP orchestration management.
azure-functions-durable/azure/durable_functions/http/init.py Exposes HttpManagementPayload.
azure-functions-durable/azure/durable_functions/internal/functions_json.py Installs custom JSON (de)serialization using azure.functions internal serializers.
azure-functions-durable/azure/durable_functions/internal/azurefunctions_null_stub.py Adds a no-op sidecar stub to satisfy base worker expectations without a real sidecar.
azure-functions-durable/azure/durable_functions/internal/azurefunctions_grpc_interceptor.py Adds a DF-specific gRPC interceptor to attach taskhub and user-agent metadata.
azure-functions-durable/azure/durable_functions/internal/init.py Package init for internal module.
.github/workflows/typecheck.yml Adds a dedicated pyright (strict) job for the new package and tag trigger.
.github/workflows/durabletask-azurefunctions.yml Adds a dedicated workflow for lint + unit tests of azure-functions-durable across Python versions.

Comment on lines +18 to +19
# Get the version of the azurefunctions package
sdk_version = version('durabletask-azurefunctions')
Comment on lines +8 to +10
## v0.1.0

- Initial implementation
Comment on lines +44 to +45
self.durable_context = context
return DurableFunctionsWorker().execute_orchestration_request(self.fn, context)
Comment on lines +10 to +18
# ``azure.functions`` only exposes its custom-object (de)serialization helpers
# from a private module, and they are untyped. Resolve them dynamically and
# bind them to locally-typed callables so the rest of the module stays fully
# type-checked.
_df_serializers = importlib.import_module("azure.functions._durable_functions")
_serialize_custom_object: Callable[[Any], Any] = getattr(
_df_serializers, "_serialize_custom_object")
_deserialize_custom_object: Callable[[dict[str, Any]], Any] = getattr(
_df_serializers, "_deserialize_custom_object")
Comment on lines +21 to +24
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: 3.14
@andystaples andystaples marked this pull request as draft June 25, 2026 16:42
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