Skip to content

Update gitlab-experiment to version 0.5.3

Jeremy Jackson requested to merge jj-upgrade-gitlab-experiment into master

What does this MR do?

https://gitlab.com/gitlab-org/gitlab-experiment/-/compare/v0.5.2...v0.5.3

0.5.3 has a refactor to and resolves a bug where :control can be incorrectly cached on exclusions. This only manifests when the exclusion logic is based on something independent of the context. A simple example of this potentially negative caching behavior would be:

user = User.all.sample

context = { project: Project.all.sample }
excluded = user.username == 'jejacks0n' 

experiment(:example, context) do |e|
  # could start as candidate, and if we encounter jejacks0n, we exclude and
  # cache that this project is excluded, which isn't the case -- we are only
  # saying that the state of this user should exclude this instance of
  # running of the experiment.
  e.exclude! if excluded

  e.control { }
  e.candidate { }
end

Does this MR meet the acceptance criteria?

Conformity

Edited by Jeremy Jackson

Merge request reports

Loading