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

[Bug] Bug: purge_instance_history_by has incorrect parameter handling and time filter behavior

Đang mở
#533 0 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
azure, python
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu từ purge_instance_history_by trên DurableOrchestrationClient và xem xét hành vi được mô tả trong issue cùng với yêu cầu azure-functions-durable==1.2.10. Sử dụng lệnh gọi được cung cấp để xác minh rằng việc bỏ qua created_time_from không còn tạo ra phản hồi 400 và rằng created_time_from cùng created_time_to xác định một khoảng giao nhau.

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

Mô tả

bug fixed-in-v2
Expected Behavior

The created_time_from parameter should be optional, and the time filters should be combined with an intersection (AND) to allow precise time intervals.

Actual Behavior

Observe that the API returns a 400 Bad Request error.

Steps to Reproduce

Use the following code to call purge_instance_history_by

await client.purge_instance_history_by(
    created_time_to=datetime.now(timezone.utc) - timedelta(days=1),
    runtime_status=[
        df.OrchestrationRuntimeStatus.Completed,
        df.OrchestrationRuntimeStatus.Failed,
        df.OrchestrationRuntimeStatus.Terminated,
    ],
)

Observe that the API returns a 400 Bad Request error.

requirements.txt file
azure-functions-durable==1.2.10
Description:

When using the purge_instance_history_by method in the DurableOrchestrationClient I encountered the following issues:

  1. Missing Mandatory Parameter:

    The created_time_from parameter is treated as optional in the SDK, but it is actually mandatory in the underlying API. If created_time_from is not
    provided, the API returns a 400 Bad Request error.

  2. Time Filter Behavior:

    The time filters (created_time_from and created_time_to) are combined with a union (OR) instead of an intersection (AND). This makes it impossible
    to define precise time intervals for purging.

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.