Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I offer a beta feature to select users? (rails)

We want to start letting our users help us test our feature changes before a wider release. Our rails app already has roles but I don't know how to we should go about implementing a beta feature without moving the whole app over.

Some issues I can't think of solutions to:

  • A beta feature may require a database migration. How can you handle this when it could cause problems with the existing app?
  • Changing templates and the css/sass will likely change it for existing features too.
  • Changing the underlying model code could break existing controllers / interfaces that rely on it.

One solution (a bad option) is to code in the new feature and wrap it in logic that only shows/uses it if the user has the "beta" role. The problem with this is when you finally take it live, you could have a lot of unwinding/changing to do. This is both a waste of time and could introduce bugs.

Another solution is to run a separate "beta" branch of the app off a subdomain and route users with the beta role to it. The problem with this is that the complexity of ssl certificates, email links and other domain dependent issues make this a bit of a maintenance pain (though not as bad as the first solution).

How can I offer this most efficiently so as to minimize the additional work to maintain and then switch the beta to the full version?

like image 700
chrishomer Avatar asked Aug 30 '10 12:08

chrishomer


1 Answers

I think the only reasonable chance of these kind of tests work without affecting the current application would be using a "staging" environment and really just redirect the beta users to that environment.

Compared to problems with domain related features it is really nothing compared to migrations/functionality problems.

On our company we do exactly that, but we don't have the beta users thing, but without an separated environment it will be pretty much inviable to keep new features from messing with current features.

For the features, just use different branches for those new features and create that "staging" environment from that branch, once the features have been tested you just merge them to HEAD and new feature is there :]

like image 79
Draiken Avatar answered Oct 20 '22 11:10

Draiken