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

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, python
領域
analytics, backend

調査の方向性

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.

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

説明

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
主要言語
Python
スター
9.9k
フォーク
658
平均マージ
1日 15時間
マージ済み PR(30日)
168

環境構築

はじめの一歩

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

Flagsmith/flagsmith のほかの issue

Flagsmith/flagsmith の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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