Skip to content

Experiment versions cause confusion with allow_multiple_experiments='control' #612

Closed

Description

@brunopedroso

Describe the bug
When we reset an experiment from dashboard, starting numbered versions of experiments in data, it makes confusion in User.max_experiments_reached? and considers the current experiment as already taken.

The symptom is that subsequent calls to ab_test will always return control, once the user starts to be excluded from alternative choice by max_experiments_reached.

To Reproduce
Steps to reproduce the behavior:

I wrote an example app that reproduces the error. It's in rails because it was easier to me.

here is the app.

  1. Go to home page. You'll see the alternatives returned by multiple calls to ab_test. This time it works as usual;
  2. Go to split dashboard and click in reset data, so to start a new version in the experiment
  3. Now refreshes the app until the first alternative is choosed as other.
  4. In this case, the result you see is oher, control, control showing that, after that first call subsequent ones will always return control

Additional context
I've already debugged it. The problem is in User#max_experiments_reached?. The count in L31 doesn't clean up experiment key, that now has :<version> at the end.

I can submit the PR if you like so.

Activity

  1. andrehjr commented on Apr 28, 2020

    @andrehjr
    Member

    Thanks for the detailed report and reproduction steps @brunopedroso 🚀

    I'll check it out. In the meantime, feel free to submit a PR 😄

  2. added 2 commits that reference this issue on May 2, 2020
    05243ed
    0d2178e
  3. added 4 commits that reference this issue on Nov 24, 2023
    51e66f2
    2bc3be1
    db1adcb
    189bc7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions