Experimentation: completing an experiment does not compute final results, while the docs say they are frozen as final

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

Maintainer thường phản hồi trong vòng 1 ngày

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
67/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, python
Lĩnh vực
analytics, backend

Hướng nghiên cứu

Trace the experiment completion endpoint and the results refresh endpoint described in the reproduction, then read the “Analyse an experiment” documentation page. Check what triggers the final results computation and how the five-minute refresh limit affects it. Done means completion makes results final without waiting for a later refresh, or the documentation and results page explain when that refresh is available.

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

Mô tả

Describe the bug

After POST .../experiments/{id}/complete/, the results endpoint keeps returning the last snapshot from before completion, with is_final: false. Final results appear only after the next results refresh, which is still subject to the 5-minute limit counted from the last refresh before completion, and only if something requests it.

The "Analyse an experiment" page says that after ending an experiment "Results are frozen as final and the flag is unlocked." A user who ends an experiment and reads the results page straight away sees a non-final snapshot, and nothing finalises it unless they come back and refresh.

Observed on self-hosted v2.295.2 (CI_COMMIT_SHA 5369ece3ff3aefbd021d2496f82a7ce0e9cd04d6), Postgres warehouse.

Steps To Reproduce
  1. Create a multivariate flag (control plus blue, green), a metric and an experiment, start it, and send exposures for 300 identities with the Python SDK.
  2. POST .../results/refresh/ and read GET .../results/: is_final: false, with an as_of.
  3. POST .../complete/ with {"rollout_decision": "variant", "rollout_variant": <blue option id>}. ended_at is set.
  4. Read GET .../results/ 5 s and 60 s later, with no refresh requested: same as_of as in step 2, is_final: false.
  5. POST .../results/refresh/ straight away: HTTP 429, {"detail":"A refresh was requested recently. Try again later. Expected available in 239 seconds."}.
  6. After the limit, POST .../results/refresh/: the results now read is_final: true.
  7. A further refresh: HTTP 400, {"detail":"Results are final for this completed experiment."}.
Expected behavior

Either completing queues the final computation (so the results become final shortly after completion without another request, regardless of the refresh limit), or the docs and the results page say that final results need one more refresh after ending the experiment, and when it will be allowed.

How are you running Flagsmith
  • Self-hosted with Docker
Ngôn ngữ chính
Python
Star
9.9k
Fork
658
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
168

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

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 Flagsmith/flagsmith

Tất cả issue của Flagsmith/flagsmith

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.