Experimentation: after an experiment is completed, its rollout override keeps splitting identities, so the documented "end it, then update the flag" doesn't reach them

Đang mở
#9,120 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/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ệ
python
Lĩnh vực
backend, documentation

Hướng nghiên cứu

Read the experiment completion path in experimentation/services.py:624-625 and the rollout cleanup path at services.py:619-623,632-681; compare those behaviors with the flag save path in features/future/views.py:117. Decide how completion should handle the system segment override, then add or update tests for completing an experiment and evaluating identities after changing the flag default. Done means the documented completion flow reaches the winner for identities covered by the rollout.

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

Mô tả

Summary

The analysis docs say to end the experiment, then update the flag to the winning value
(docs/docs/experimentation/analyse-an-experiment.md:58-61). On 2.291.0, completing an experiment sets ended_at
but leaves its experiment-<id>-rollout system segment override in place. The override is only removed when the
flag's next experiment starts. So after following the docs, every identity the rollout covered keeps its old
variation, and the flag edit reaches none of them.

Reproduction (self-hosted 2.291.0, local-evaluation Node SDK, 300 fresh identities)
  1. Create a multivariate flag (control, v2) and an experiment on it with a 50/50 split. Start it.
  2. Evaluate 300 new identities: control 144, v2 156.
  3. Complete the experiment, then set the flag's environment default to v2 (the documented order).
  4. Evaluate the same 300 identities again: control 144, v2 156. Nothing moved.
  5. Start a second experiment on the same flag: the first rollout override is removed (services.py:619-623,632-681, PR #8770).

Script: spikes/07-round04.ts, log in spikes/RESULTS.md.

Where it happens
  • The split is a system segment override, a percentage split on the identity key: experimentation/services.py:757-775,937-939.
  • Complete sets ended_at only: services.py:624-625.
  • Saves through the flag API don't overwrite the override: features/future/views.py:117.
Expected

Either Complete removes the rollout (or offers to, for example "Complete and roll out the winner"), or the docs say the
override stays until the next experiment and how to clear it.

Workaround I use

Pause → set the default to the winner → set the rollout to 0% with the winner's weights → Complete. Measured: 300 of
300 identities on the winner, and a later default edit back to control reaches all 300.


Found while building Turnout on self-hosted Flagsmith 2.291.0.

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.