Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

"Non-Deterministic workflow detected" error from deterministic code

未关闭
#600 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
azure, python

调研方向

首先,使用提供的异常字符串和更短的 "x" 比较,在 function_app.py 设置下运行 repro_nondeterminism.py 中的最小复现。跟踪 activity 异常如何通过 orchestration 重放和确定性检查进行报告;当 workflow 达到 Failed 状态并在没有非确定性错误的情况下暴露 activity 异常时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

blocked bug fixed-in-v2 known-regression

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

主要语言
Python
星标
157
派生
70
PR 合并指标
30 天内没有已合并 PR

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure/azure-functions-durable-python 的其他 Issue

查看 Azure/azure-functions-durable-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。