Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Worker failed to load Durable Entity function when binding a Storage Queue

オープン
#392 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
backend

調査の方向性

再現した Counter サンプルの init.py と function.json から始め、エントリポイント entity_function がどのように読み込まれ、その outputQueueItem バインディングがどのように検証されるかを追跡します。ローカルの再現プログラムを実行し、キュー・バインディングが存在する場合の関数の読み込みを比較します。宣言された Storage Queue 出力で Counter 関数が正常に読み込まれれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Enhancement fixed-in-v2 P3

🐛 Describe the bug

I'm learning about Durable Entities , not sure if this is supported or not. I'm using counter sample provided here and trying to bind a Storage Queue . However worker complains about not finding the corresponding parameter:

[2022-07-22T15:02:30.124Z] Worker failed to load function: 'Counter' with function id: 'a80f6d9c-8814-4549-bc62-155546eaf880'.
[2022-07-22T15:02:30.125Z] Result: Failure
Exception: FunctionLoadError: cannot load the Counter function: the following parameters are declared in function.json but not in Python: {'outputQueueItem'}

🤔 Expected behavior

What should have happened?
Worker is able to load Function

☕ Steps to reproduce

What Durable Functions patterns are you using, if any?
HTTPTrigger > Orchestration > Entity

Any minimal reproducer we can use?
https://github.com/enriqueayala/azure-function-counter.git

_ init.py _

import logging
import json

import azure.functions as func
import azure.durable_functions as df


def entity_function(context: df.DurableEntityContext, outputQueueItem: func.Out[str]):
    """A Counter Durable Entity.
    A simple example of a Durable Entity that implements
    a simple counter.
    Parameters
    ----------
    context (df.DurableEntityContext):
        The Durable Entity context, which exports an API
        for implementing durable entities.
    """

    current_value = context.get_state(lambda: 0)
    operation = context.operation_name
    if operation == "add":
        amount = context.get_input()
        current_value += amount
    elif operation == "reset":
        current_value = 0
    elif operation == "get":
        pass
    
    context.set_state(current_value)
    context.set_result(current_value)
    outputQueueItem.set(current_value)


main = df.Entity.create(entity_function)

function.json

{
  "scriptFile": "__init__.py",
  "bindings": [
    {
      "name": "context",
      "type": "entityTrigger",
      "direction": "in"
    },
    {
      "type": "queue",
      "direction": "out",
      "name": "outputQueueItem",
      "queueName": "outqueue",
      "connection": "AzureWebJobsStorage"
    }
  ]
}

Are you running this locally or on Azure?
Locally

主要言語
Python
スター
157
フォーク
71
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azure-functions-durable-python のほかの issue

Azure/azure-functions-durable-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。