Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#392 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với init.py và function.json của sample Counter đã tái hiện, sau đó theo dõi cách entry point entity_function được tải và cách binding outputQueueItem của nó được xác thực. Chạy reproducer cục bộ và so sánh việc tải function khi binding queue hiện diện; hoàn thành khi function Counter tải thành công với output Storage Queue được khai báo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
157
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-functions-durable-python

Tất cả issue của Azure/azure-functions-durable-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.