Skip to content

Fix Functions RPC URLs and orchestration query page sizes - #342

Merged
andystaples merged 2 commits into
microsoft:mainfrom
TsuyoshiUshio:tsuyoshiushio-durable-storage-sdk-fixes
Nov 6, 2026
Merged

andystaples merged 2 commits into
microsoft:mainfrom
TsuyoshiUshio:tsuyoshiushio-durable-storage-sdk-fixes

Conversation

@TsuyoshiUshio

Copy link
Copy Markdown
Contributor

Summary

  • Normalize HTTP(S) RPC URLs before async and sync Functions clients open a gRPC channel. Keep the scheme, host, and port. Remove the path, query, and fragment. Keep other gRPC target formats unchanged.
  • Limit orchestration query pages to at most 1000 instances in Functions clients. Keep smaller explicit page sizes and all query filters. Do not change the query object supplied by the caller.
  • Use the existing continuation-token loop to return all matching instances, including results after an empty page. The page size does not limit the total result count. This also applies to the get_status_all() and get_status_by() compatibility methods.

The URL fix does not convert an old HTTP-only listener into a gRPC listener. The host must supply an endpoint that supports gRPC.

The page-size limit applies only to Functions clients. Core SDK and direct Durable Task Scheduler clients are unchanged. Existing connection settings, task hub metadata, authentication-related interceptor settings, channel options, and channel lifetime are kept.

Checks

The checks used Python 3.13 on Windows. The root .venv contains the local packages in editable mode.

Before the fix, the first regression test run had 19 failures and 16 passes. It showed the URL-path connection failure against a local gRPC server and query requests with a page size of 2147483647. Two explicit-page-size cases were then added. After the fix, all 37 regression tests passed.

.\.venv\Scripts\python.exe -m pytest tests\azure-functions-durable\test_client_transport.py -q --disable-warnings

Functions unit tests: 448 passed, 90 deselected.

.\.venv\Scripts\python.exe -m pytest tests\azure-functions-durable -m 'not dts and not azurite and not functions_e2e' -q --disable-warnings

Core client and shared-helper tests: 51 passed.

.\.venv\Scripts\python.exe -m pytest tests\durabletask\test_shared.py tests\durabletask\test_client.py -q --disable-warnings

Azure Managed unit tests: 183 passed.

.\.venv\Scripts\python.exe -m pytest tests\durabletask-azuremanaged\test_azuremanaged_grpc_resiliency.py tests\durabletask-azuremanaged\test_durabletask_grpc_interceptor.py tests\durabletask-azuremanaged\test_logging.py tests\durabletask-azuremanaged\test_resource_id.py tests\durabletask-azuremanaged\test_sandboxes_extension.py -q --disable-warnings

Source and packaged public-type checks: 0 errors, 0 warnings.

fnm env --shell powershell | Out-String | Invoke-Expression
fnm use 22
.\.venv\Scripts\python.exe -m pyright -p azure-functions-durable\pyrightconfig.json
$env:PATH = "$PWD\.venv\Scripts;$env:PATH"
nox -s typecheck_functions_package

Functions host query tests through Nox: 2 passed, 88 deselected. This run used the existing local Azurite instance.

fnm env --shell powershell | Out-String | Invoke-Expression
fnm use 22
$env:PATH = "$PWD\.venv\Scripts;$env:PATH"
nox -s functions_e2e -- -k 'get_status_all or get_all_orchestration_states' -q --disable-warnings

Python lint, README lint, and whitespace checks passed. The changelog was checked manually.

.\.venv\Scripts\python.exe -m flake8 azure-functions-durable
.\.venv\Scripts\python.exe -m flake8 tests\azure-functions-durable
.\.venv\Scripts\python.exe -m pymarkdown -c .pymarkdown.json scan azure-functions-durable\README.md
git diff --check

Test limits

  • The 1002-instance and empty-page cases use protobuf responses in regression tests. They were not tested with 1002 instances in live Azure Table Storage.
  • Python 3.14 and 3.15 and the full Functions E2E suite were not run locally.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:57

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.

🟢 Approval recommended

There are no active review issues for the Functions client RPC endpoint and query page-size changes.

No open issues 🎉

What changed in this PR

This PR fixes RPC endpoint handling and query page sizes in the Azure Functions clients without changing core SDK or direct Durable Task Scheduler client behavior.

Changes:

  • Normalize HTTP(S) RPC addresses before opening gRPC channels, preserving other target formats.
  • Cap query pages at 1000 instances while retaining smaller explicit sizes, filters, caller-owned queries, and continuation-token pagination.
  • Add regression coverage and document the Functions-specific behavior.
File Description
tests/​azure-functions-durable/​test_client_transport.py Tests URL normalization, local gRPC connectivity, page-size limits, and pagination through empty pages.
azure-functions-durable/​README.md Explains page-size limits and total-result behavior.
azure-functions-durable/​CHANGELOG.md Records the user-facing connection and query fixes.
azure-functions-durable/​azure/​durable_functions/​client.py Applies shared address normalization and query limits to async and sync clients.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@andystaples
andystaples merged commit 6c0865f into microsoft:main Nov 6, 2026
24 checks passed
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.

3 participants