Closed Samara-Strauss closed 4 years ago
@Samara-Strauss I'm reading this and had a clarifying question. My memory of when we talked about this last year the idea was basically "now that Flipper is a thing, can we re-do the beta opt-in feature to allow users to add themselves to the list of users who have access to a feature gated by Flipper?" Does that sound right to you?
In the back end we have a BetaRegistrationsController
that will show/create/destroy beta registrations. I think it hasn't been used for a while but can be used for this.
Then, in flipper.rb
Flipper.register(:beta_user_for_foo_feature_group) do |user|
#user is nil if the user is not logged in
user.respond_to?(:uuid) && BetaRegistration.where(feature: "beta_user_for_foo_feature", user_uuid: user.uuid).present?
end
Then, enable the group beta_user_for_foo_feature in the flipper interface.
it looks like you may need to update the whitelist in the routes also.
As far as the front end goes, I think there's some code for Beta Enrollment that is still good. The front end just needs to call
GET/POST/DELETE /v0/beta_registration/beta_user_for_foo_feature.
My memory of when we talked about this last year the idea was basically "now that Flipper is a thing, can we re-do the beta opt-in feature to allow users to add themselves to the list of users who have access to a feature gated by Flipper?" Does that sound right to you?
@erikphansen yes, that is correct. We had talked about the idea of allowing people opt-in/opt-out to a beta feature without additional manual work from anyone on our team.
I do want to call attention to what @annaswims posted above, though. I didn't realize until recently that some sort of beta functionality was apparently used on Vets.gov or for the Vets.gov --> VA.gov transition. Will you take a look into that code and create some brief documentation on what that existing code does/doesn't do?
Ah, I was writing at the same time @erikphansen was. What I was describing was a combination of the old "beta enrollment" with the new Flipper feature toggle.
If you make a "group" in flipper, it can be "anyone who has clicked beta enrollment". Flipper looks for any of the conditions to be true. So, you could to a rollout with a few beta users, and an additional "x% of users".
Thanks @annaswims!!
@annaswims that's super helpful. I'm not seeing Swagger docs for the beta_registration
endpoints. Are those APIs still active, just not documented? Based on the FE work that uses the beta registration feature, it looks like we don't use the GET endpoint at all (at least not directly); instead doing a POST adds that feature name to list of available services that come back from the GET user/
call. Which is fine, but whatever code is being used to add data to the available services can probably stop doing that.
@Samara-Strauss we could pretty easily try this out for Profile 2.0. Anna laid out the BE technical requirements pretty clearly. We'd just need to decide where to put a button for a user to opt in/opt out of Profile 2.0. It might be worth doing this is the most barebones way possible and actually hide it behind a feature flag. So meta.
@erikphansen awesome, thanks for this!
Anything else you need from this ticket, or is this free to close?
I think it's been quite a while since we've used beta_registration, but it looks like the code is still there and it's just not documented in swagger.
@Samara-Strauss I think it's safe to close this. We can regroup and talk about next steps to implement Anna's ideas for a test feature flag.
Background
In the fall of 2019, our team had intended to build a beta/opt-in feature but ultimately got sidetracked by other work. This kind of feature would be great to have in place for the logged-in homepage redesign; however, whether we actually pursue this work depends on whether we have the capacity to do so. In theory, the design phase for the LIH work will take a couple of months, during which we could be implementing and testing an opt-in feature. My hope would be that beta/opt-in would be done before we needed to start build on the logged-in homepage itself and would be a good way to keep Sandra/Erik busy while they were waiting for LIH designs to come down the pipeline.
What I'm hoping to accomplish: I'm not willing to sign up our team for this work if we don't reasonably think we could finish the effort in a couple of months.
Let's use this ticket to:
Note: Ultimately, I think this work would be owned by the platform.
Tasks
Acceptance criteria