experimenter
experimenter copied to clipboard
Cloned experiment hits constraint error based on `(branch, experimentId)`.
I can't reproduce this -- more on that later.
I cloned https://experimenter.services.mozilla.com/nimbus/set-firefox-as-default-pdf-handler-on-windows-for-new-users-experiment/ from https://experimenter.services.mozilla.com/nimbus/set-firefox-as-default-pdf-handler-on-windows-for-new-users-rollout/. The latter is an 80% rollout with a single "branch", which I named "Treatment" since it has the feature enabled. The former is a 20% side-by-side experiment with two branches, a control and a treatment. If I name the second branch "Treatment", I saw a constraint error, something like (branch, experimentId)
is not unique. There was a numerical value for experimentId
: 211.
It rather looked like the experimentId
of the clone was the same as the original (since the branch names were the same). That seems like a problem.
I mitigated by changing the second branch name to "Enabled". But I can't reproduce by changing the name of the second branch back to "Treatment", suggesting the experimentId
has changed, or something else has changed. I don't want to create a second clone to try again, which will pollute the namespace yet further. Sorry for the vague bug report!
┆Issue is synchronized with this Jira Task ┆Attachments: branch rename.mp4
➤ Maria Heres commented:
This issue is also reproducible on Stage for non-cloned experiments. The STR:
- Have an experiment draft open.
- Set up a valid branch from “Branches” (i.e. has a feature, name and description).
- Click “Save”.
- Rename the branch.
- Create a new valid branch and give it the initial name of the renamed branch.
The page will display the “duplicate key value violates unique constraint "experiments_nimbusbranch_slug_experiment_id_eefe3985_uniq" DETAIL: Key (slug, experiment_id)=(
Included is a recording of the issue.
!branch rename.mp4|width=1900,height=982!
This should be fixed now.
➤ Maria Heres commented:
I am not able to reproduce the issue using the STR from my previous comment anymore.