Andystaples/add functions support#155
Draft
andystaples wants to merge 28 commits into
Draft
Conversation
- 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
Contributor
There was a problem hiding this comment.
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-durablepackage implementing Durable Functions worker/client/decorators on top ofdurabletask. - Updated CI pipelines (ADO + GitHub Actions) to lint, type-check, build, test, and release the new package.
- Adjusted
durabletask/worker.pyentity 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT: adds
azure-functions-durablev2 to this package - complete rewrite of the functions durable story based ondurabletask