Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Etsy FeatureAPI and Rollout Unite #32

Closed
wants to merge 44 commits into from

Conversation

davidgiffin
Copy link

I worked at etsy for several years. Now that I'm back in a rails shop (CarWoo!) I started looking for an alternative to our "ServerConfig", which just got open sourced as "Feature API" https://github.com/etsy/feature

I have been in the process of porting / merging etsy's featureAPI into rollout. I like your redis based configuration it make a ton of sense. So I just added support for url overrides, variants and a few other useful items. I also added tighter integration into Rails, with helpers and rollout_context for accessing user objects, etc. Still a bit clunky, but we are rolling it into prod this week.

Let me know what you think, maybe a 3.0 version of rollout??

@chrisabad-zz
Copy link

This is awesome and very timely. We've been looking at using Rollout, but realized it lacked the A/B testing functionality that Feature API has. Did you do a write-up about usage anywhere? Or maybe you'd be kind enough to add some docs to your pull? :)

@davidgiffin
Copy link
Author

Here are the docs:

Basic Feature Gate
<% if enabled?(:background) %>
Doing the background feature
<% end %>

Using Variants
<% feature(:background) do |background| %>
<%= 'red' if background.red? %>
<%= 'green' if background.green? %>
<%= 'blue' if background.blue? %>
<%= 'never going to happen' if background.none? %>
<% end %>

Creating a Feature Configuration

get a rollout object in Rails console
pry(main)> rollout = Rollout::Roller.new(Rollout.redis, ViperContext.new)

get list of features
pry(main)> rollout.features

turn off "background"
pry(main)> rollout.with_feature(:background) {|f| f.enabled = :off }

turn on "background"
pry(main)> rollout.with_feature(:background) {|f| f.enabled = :on }

turn on "background" for 10% users
pry(main)> rollout.with_feature(:background) {|f| f.enabled = :rollout; f.percentage = 10 }

turn on "background" for some users: admin, groups, etc
pry(main)> rollout.with_feature(:background) {|f| f.enabled = :rollout }

session bucketing (default)
pry(main)> rollout.with_feature(:background) {|f| f.bucketing = :uaid }

user bucketing
pry(main)> rollout.with_feature(:background) {|f| f.bucketing = :user }

random bucketing
pry(main)> rollout.with_feature(:background) {|f| f.bucketing = :random }

set variants red, green and blue all at 33%
pry(main)> rollout.with_feature(:background) {|f| f.variants = {:red => 33, :blue => 33, :green => 33} }

override variant via URL
http://carwoo.com/?features=background:green

If you have multiple features to test, use commas to separate the features. For example, if you had features "background", "color", and "size" the url would look like this:
http://carwoo.com/?features=background:green,color:orange,size:really_big

@chrisabad-zz
Copy link

Very helpful, thank you.

@wwkeyboard
Copy link

Is there a status on this? It's very interesting work!

@srpouyet
Copy link

Will this be merged?

@EricR
Copy link
Contributor

EricR commented Apr 25, 2014

This looks cool. Please be patient with me, as I just took over this project and have a lot to catch up on! :-) I'll get to this soon.

@davidgiffin
Copy link
Author

Awesome, looking forward to seeing this get merged!

David

On Apr 25, 2014, at 2:01 PM, Eric Rafaloff notifications@github.com wrote:

This looks cool. Please be patient with me, as I just took over this project and have a lot to catch up on! :-)


Reply to this email directly or view it on GitHub.

@EricR
Copy link
Contributor

EricR commented May 23, 2014

This is a fantastic set of features. I'd love to perhaps see this in a Rollout version 3, but there are a couple of key concerns I have with version 2 that I'd like to address first.

@oboxodo
Copy link

oboxodo commented Nov 5, 2015

Any updates on this PR? Plans to merge it and release a new Rollout version?

@mattyb
Copy link

mattyb commented Nov 5, 2015

+1

@EricR
Copy link
Contributor

EricR commented Nov 5, 2015

Hi,

I no longer have contributor access to this github repository since I left FetLife, and I have not heard back from FetLife regarding what they plan to do with Rollout. I even volunteered to remain a contributor.

Sorry about this. There's not much I can do until they respond.

@eric
Copy link
Contributor

eric commented Nov 5, 2015

Adding rails-specific stuff to this codebase is going to greatly limit the number of people who can use this.

I use this in non-rails projects (as well as projects with wildly different rails versions including 2.3).

I could see creating a separate project to do those opinionated rails-specific things that leverages rollout, but I would not be in favor of tying rollout to a specific rails version.

@EricR
Copy link
Contributor

EricR commented Nov 5, 2015

For what my opinion is worth, I whole heartedly agree with @eric. I would advise that this be an extension of rollout and live in its own project and gem. Compatibility and separation of concerns (that is, keeping the project small and simple) are valid points.

@wizardbeard
Copy link

I agree.

-----Original Message-----
From: "Eric Rafaloff" notifications@github.com
Sent: ‎11/‎5/‎2015 2:31 PM
To: "FetLife/rollout" rollout@noreply.github.com
Subject: Re: [rollout] Etsy FeatureAPI and Rollout Unite (#32)

For what my opinion is worth, I whole heartedly agree with @eric. I would advise that this be an extension of rollout and live in its own project and gem.

Reply to this email directly or view it on GitHub.

@reneklacan
Copy link
Member

I agree too... so let's close this issue. But we are happy to add reference to this extension of rollout if it was moved to the separate project.

@reneklacan reneklacan closed this Feb 14, 2016
@johnbaku johnbaku changed the title Etsy FeatureAPI and Rollout Unite Etsy FeatureAPI and Rollout Unite Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet