"Non-Deterministic workflow detected" error from deterministic code
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- azure, python
- Domain
- backend, distributed-systems
Research direction
Start by running the minimal reproduction from repro_nondeterminism.py with the function_app.py setup, using the supplied exception string and the shorter "x" comparison. Trace how the activity exception is reported through orchestration replay and determinism checks; done means the workflow reaches Failed status and exposes the activity exception without a non-deterministic error.
Written by the indexing model from the issue text.
Description
🐛 Describe the bug
I have a minimal repro which makes the Function fail with "Non-Deterministic workflow detected" error, even if the code is completely deterministic. If I replace the RuntimeError argument string with "x", then I get the expected behavior. There is something in the exception string which triggers the undesired behavior.
🤔 Expected behavior
The Function should end with Failed status with the exception from the activity in the output.
☕ Steps to reproduce
Here is the code for a minimal repro: HTTP trigger + trivial orchestration and activity. The activity throws an exception every time. (the SAS signature is fake)
import logging
import azure.functions as func
import azure.durable_functions as df
bp = df.Blueprint()
logger = logging.getLogger(__name__)
# ── Trigger ────────────────────────
@bp.route(route="repro")
@bp.durable_client_input(client_name="orchestration_client")
async def http_start_repro(
req: func.HttpRequest, orchestration_client: df.DurableOrchestrationClient
) -> func.HttpResponse:
instance_id = await orchestration_client.start_new("repro_orchestrator")
logger.info(f"Started repro orchestrator with ID '{instance_id}'")
return orchestration_client.create_check_status_response(req, instance_id)
# ── Orchestrator ──────────────────
@bp.orchestration_trigger(context_name="context")
def repro_orchestrator(context: df.DurableOrchestrationContext):
try:
yield context.call_activity("repro_activity")
except Exception as e:
logger.error(f"Repro orchestrator caught: {e}")
raise
# ── Activity ──────────────────────
@bp.activity_trigger(input_name="input_data")
def repro_activity(input_data):
# The sig= value contains /, +, and = which trigger the bug.
raise RuntimeError(
"Download failed: https://example.blob.core.windows.net/container/test.file"
"?sv=2025-07-05&spr=https&st=2026-04-01T10:58:55Z"
"&se=2026-04-02T10:58:55Z&sr=b&sp=r"
"&sig=aB3dE/fG5hI+jK7lM9nO="
)
# ── function_app.py ──────────────
# Save the following as function_app.py in the same directory:
import azure.functions as func
import azure.durable_functions as df
from repro_nondeterminism import bp
app = df.DFApp(http_auth_level=func.AuthLevel.ANONYMOUS)
app.register_blueprint(bp)
⚡If deployed to Azure
I see the same behavior if deployed to Azure. Please refer to the code.
- Dominant language
- Python
- Stars
- 157
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/azure-functions-durable-python
-
Enhancement fixed-in-v2 P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Azure/azure-functions-durable-python#617 · 1 comment ·
-
bug Debuggability fixed-in-v2 P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Azure/azure-functions-durable-python#587 · 2 comments · 1 reaction ·
-
Custom object serialization broken for orchestrator return valuesPossibly taken @andystaples claimed this 69 days ago. Openbug fixed-in-v2 P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Azure/azure-functions-durable-python#568 · 1 comment ·
-
bug fixed-in-v2 P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Azure/azure-functions-durable-python#475 · 1 comment ·
-
Enhancement fixed-in-v2 P3
Difficulty 4/5 3-5 days Newbie friendliness 62/100
Azure/azure-functions-durable-python#618 · 1 comment ·
All issues in Azure/azure-functions-durable-python
Similar issues
-
Maven path-index: "Ambiguous or noncanonical artifact path" error does not report the offending pathOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pulp/pulp_maven#524 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
infinispan/langchain-infinispan#34 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#3891 ·