flippercloud / flipper Goto Github PK
View Code? Open in Web Editor NEW㪠Beautiful, performant feature flags for Ruby.
Home Page: https://www.flippercloud.io/docs
License: MIT License
π¬ Beautiful, performant feature flags for Ruby.
Home Page: https://www.flippercloud.io/docs
License: MIT License
If an actor belongs to two groups, once it's enabled for one group it's automatically enabled for that user even if the second group defines it as disabled
.
This might be the desired output, but it felt counterintuitive to me.
# Contrived example, but bear with me.
Flipper.register(:large_group) do |actor|
actor.part_of_large_group?
end
Flipper.register(:subset_of_large_group) do |actor|
actor.part_of_small_group?
end
$flipper[:can_do].enable_group :large_group
$flipper[:can_do].disable_group :subset_of_large_group
$flipper[:can_do].enabled? user_in_subset # => true
Is this the desired behavior?
I would like to add the ability to namespace keys in redis so that we can reduce the number of collisions in redis. I'm going to start working on this and hopefully make a PR for it once I'm done. Just wanted to open the issue and get some feedback on this.
This is really just a request for a change to the comment on line 11 (https://github.com/jnunemaker/flipper/blob/master/lib/flipper/feature.rb#L11) to document the attribute reader as public instead of "Internal".
If I use Flipper::DSL#features
to get a set of all known features, I want to be sure that, according to the official public API, I'm allowed to get the name of each of those features. For my use case, I need to be able to enumerate over all the features and know their names (I'm essentially "exporting" this list) and the DSL #features
method seems like the most straight forward way to do it.
Thanks.
Each gates text/help/instructions should be customizable so companies/developers can make it feel more like there own. I can also see providing an actor to instance conversion block for changing things like User:6
to @jnunemaker
or whatever makes sense.
Should definitely be optional, but would be nice to send success/fail/tries through AS::Notifs for easy instrumentation.
We recently wrote something like the following, hoping to set a generic group for flipper usage.
Flipper.register(:reviewers) do |actor|
actor.try(:email) =~ /@example.com\z/
end
It didn't work, because String#=~
returns an integer (the position of the match in the string) rather than true/false. Flipper groups only respond if the register
block explicitly returns true
.
This seems a bit unrubyish, so I wondered if there was a specific reason that only true
was allowed rather than (IMO) the more usual convention of any truthy value?
Maybe based on yaml or something. Just for something that can be persisted across requests if using shotgun or something in dev, but without requiring an external adapter like flipper-redis or whatever. Ran into this while working on flipper-ui which now uses flipper-redis in dev mode.
Should return all gates enabled for enabled_gates and disabled for disabled_gates. Something like:
def enabled_gates
values = gate_values
gates.select { |gate|
gate.enabled?(values[gate.key])
}
end
def enabled_gate_names
enabled_gates.map(&:key)
end
We hardcode defaults for all features in the app in a config file to act as documentation for all existing toggles. And while the name is usually descriptive ('new_dashboard'), it's usually short and sweet. It'd be useful to have a meta attribute for a feature to describe the feature in more detail (intended to help other devs / non-technical admins fully understand a feature).
And while it's definitely possible to put this meta description in a readme, readme's aren't easily accessible to non-technical admin vs a dashboard like Flipper UI.
Example:
$flipper[:new_dashboard].meta = 'The new user dashboard layout including the a redesigned profile section.'
Using flipper v 0.70
application_controller
helper_method :feature_enabled?
def feature_enabled?(feature_name)
$flipper[feature_name].enabled?(current_user)
end
in template just ask for
if feature_enabled? :chatting
the feature was enabled for all via ui
around every third request, the features is disabled. we are using 3 applicationserver, but all are having a good connection to redis.
known bug?
We recently tried to update to the latest version of the gem for our app and found a problem with the flipper ui that won't even load.
Here is a trace log of the request:
Started GET "/flipper" for ::1 at 2015-04-28 15:08:59 -0500
NoMethodError (undefined method `each' for #<ActionDispatch::Request::Session:0x7fb5738240f8 not yet loaded>):
rack (1.6.0) lib/rack/session/abstract/id.rb:158:in `stringify_keys'
rack (1.6.0) lib/rack/session/abstract/id.rb:95:in `update'
rack (1.6.0) lib/rack/session/abstract/id.rb:258:in `prepare_session'
rack (1.6.0) lib/rack/session/abstract/id.rb:224:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
rack (1.6.0) lib/rack/builder.rb:153:in `call'
actionpack (4.2.1) lib/action_dispatch/routing/mapper.rb:51:in `serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.0) lib/rack/etag.rb:24:in `call'
rack (1.6.0) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.0) lib/rack/head.rb:13:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.1.2) lib/web_console/middleware.rb:37:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.1) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
railties (4.2.1) lib/rails/engine.rb:518:in `call'
railties (4.2.1) lib/rails/application.rb:164:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
rack (1.6.0) lib/rack/content_length.rb:15:in `call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
And a sample app that reproduce this error: https://github.com/gssbzn/flipper-test
From what I could find there's an Incompatibility between Rack::Session and ActionDispatch::Request::Session that could be the cause of this error. Thanks in advance.
Same as rspec one but works for minitest.
Does percentage of users handle groups properly (and vice versa)?
Let's say I have two groups of users: East Coast, West Coast
Is there any way to deploy to, say, 10% of users in East Coast group? Or, more generally, to 10% of users per enabled group?
The interface appears to suggest that it's possible to enable, for example, a feature for 50% of actors and 25% of the time.
In my experience when the actors percentage gate is enabled, it means that whoever does have the feature enabled will have it enabled 100% of the time. In that case, the interface should not allow the other gate to be enabled simultaneously, should it?
It would be nice to have a way to define a custom group type that corresponds to, e.g., a GitHub team. Something like this:
class GitHubTeam
def flipper_id
"GitHubTeam:#{id}"
end
def self.find_by_flipper_id(flipper_id)
find flipper_id.split(":")[1]
end
end
Flipper.register_custom_group(:github_team) do |group_id, actor|
GitHubTeam.find_by_flipper_id(group_id).include? actor
end
$flipper[:my_feature].enable $flipper.custom_group(:github_team, GitHubTeam.find("rails/owners"))
$flipper[:my_feature].enabled? some_user #=> true because some_user is a member of @rails/owners
Basically the only difference from normal groups is that the group's ID is passed to the block as well as the actor, so we can look up the group (team) at runtime.
/cc @jnunemaker @rsanheim
It's cause: ec711815 -- the feature, boolean gate, is gone once I press Disable and then leave the page. I would have to re-add the feature although I simply want to disable it for awhile for experiment.
What was the reason to introduce that commit? Would it be reverted?
Is there anyway I could do something like this?:
flipper.features(current_user)
# => [:stats, :analytic]
or
current_user.enabled_features
# => [:stats, :analytic]
Is it even possible for the GEM to have such feature?
I ran into an issue implementing my first feature, refactor-images
. The application would crash with a bizarre error: Flipper::UI::RequestMethodNotSupported - Flipper::UI::Actions::File does not support request method "post"
This happened when I tried to add a specific actor using the UI.
This made me think that I had broken it somehow, or otherwise set it up incorrectly, but my only mistake was treading upon A Regular Expression
I discovered my error by the expedient combo of debugging, stepping, and print @action_collection.method(:action_for_request).source
. But of course I think more common consumers of the gem may be completely confused and give up or post an issue.
Shouldn't you specify the route match more strictly, rather than matching any part of the full path?
route %r{\a#{base_path}(images|css|js|octicons|fonts)/.*\Z}
Else, no features containing these five words will be permitted.
Currently on 1.8. There are several releases since then.
Currently the Actor#id stuff fails on 1.8.
Failures:
1) Flipper::DSL#actor for a number returns actor instance with identifer set to number
Failure/Error: actor.identifier.should eq(33)
expected: 33
got: 67
(compared using ==)
# ./spec/flipper/dsl_spec.rb:151
2) Flipper::Types::Actor converts identifier to integer
Failure/Error: actor.identifier.should eq(2)
expected: 2
got: 2156693720
(compared using ==)
# ./spec/flipper/types/actor_spec.rb:90
3) Flipper::Types::Actor has identifier
Failure/Error: actor.identifier.should eq(2)
expected: 2
got: 5
(compared using ==)
# ./spec/flipper/types/actor_spec.rb:95
4) Flipper::Types::Actor.wrappable? returns false if not actor and does not respond to identifier, id, nor to_i
Failure/Error: described_class.wrappable?(:nope).should be_false
expected: false value
got: true
# ./spec/flipper/types/actor_spec.rb:44
I'm thinking I'll just drop support for #id and force using identifier or something like that more specific to flipper.
Would be nice to be able to log feature checks (which features were checked and what did they return) and adapter reads (to verify efficiency).
Some features should be enabled on a per-account basis, others on a per-user basis (where an account has multiple users).
How can I query and enable certain features by account and others by user?
@orderedlist has been working on a UI. He has it mostly done. I need to start wiring it into the gem as a middleware or something and then make the adapters provide access to the data in a way that works for the UI.
I'm not sure if this is by design but if I flip a group, I would like to be able to unflip individual actors contained in the group.
Is this possible?
Thank you for creating such a valuable gem. I see that there is a support for Mongo generic Ruby driver. Is there a way to make Flipper work with Mongoid? Especially 4x version since it still uses the previous Moped driver vs Mongoid 5 (which uses Mongo Ruby driver)
If you are using MySQL with application replication, you'll often have something like this in your my.cnf
:
auto-increment-increment = 10
auto-increment-offset = 3 # this is different on each database
which means that you won't have an even distribution of users being enabled if you say id % 100 < percentage
.
I'm trying to figure out if there is a good way to control access to the UI other than with a routes constraint. My main concern with a routes constraint is that if you don't use devise to get your current_user then you would have to unpack a cookie and check the db in your routing which violates a number of best practices.
Would it be possible to put some sort of callback into the UI which would hand control over to the rails app and let it determine if the user has permissions to access the feature flipper? It would be helpful to have this after the application controller has loaded because that way it would be easier to grab the current user in most rails apps.
I can definitely see use for a memcached adapter that is simply a cache adapter. It will work just like the memoized adapter but talk to memcache instead of memory.
We fronted rollout with memcache when working on words with friends and it really relieved the feature reads burden.
I appreciate the fact that flipper-ui
is a separate gem from the core flipper
gem, as it means we can have a separate lightweight management application (using flipper-ui) for enabling and disabling feature flags. In fact, we intend to use a single lightweight rack application to manage feature flags for a few smaller ruby applications (and one large one). However, with this kind of setup it would be ideal to prevent accidental changes to state except from the management application. A 'read_only' setting would be a simple way to address this.
In the current UI there is no way to disable for site administrators to disable a certain feature for a given user/account.
I think the gem.file matcher for flipper-active_record is leaving out a necessary migration template file.
I propose adding it as a special-case, and cutting a new minor gem version.
On Rails 4.2.4 I'm seeing this error
$ bundle exec rails g flipper:active_record
Could not find "migration.rb" in any of your source paths.
Please invoke Flipper::Generators::ActiveRecordGenerator.source_root(PATH) with the PATH containing your templates.
Your current source paths are:
/Users/nruth/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/flipper-active_record-0.7.3/lib/generators/flipper/templates
bundle open flipper-active_record
showed me that the file really is missing; there's no template directory at all.
Cloning the repo and trying out the gem.file matcher in irb I found it's including these files, which have active_record in their name (as per the regex in the gemspec)
docs/active_record/README.md
examples/active_record/basic.rb
examples/active_record/internals.rb
flipper-active_record.gemspec
lib/flipper-active_record.rb
lib/flipper/adapters/active_record.rb
lib/generators/flipper/active_record_generator.rb
spec/flipper/adapters/active_record_spec.rb
test/generators/flipper/active_record_generator_test.rb
lib/flipper/version.rb
but not the lib/generators/flipper/templates/migration.rb
I guess the simplest fix is to add it in the same way as lib/flipper/version.rb
?
gem file matcher: https://github.com/jnunemaker/flipper/blob/master/flipper-active_record.gemspec#L16
gem file regex: https://github.com/jnunemaker/flipper/blob/master/flipper-active_record.gemspec#L5
No one wants to type out all this gibberish. Need to make it more succinct for creating a flipper instance and getting access to features, groups, etc.
The individual actor and group gates are not made to store hundreds or thousands of values. We should limit the size these sets can grow to in an effort to help prevent people from hurting themselves. This check could happen at enable time to prevent enabling more than 1k or some number of individual elements in a set.
Flipper looks great, very flexible and with a good selection of adapters. But with great choice comes⦠great confusion?
The DSL example in the README is ok but it could do with some suggested best practices in Rails.
$flipper
in helper method anyway. Perhaps it makes more sense to do the initialization there to avoid the global variable?I'd love to hear how others actually use Flipper in Rails.
Is there any guidance we could offer on which adapters to choose? For example, I'm guessing the selection process goes like:
Also, I'm not sure of the maturity for these adapters so maybe that also plays a factor. And is there a performance consideration?
I'm just setting up Flipper so I don't have the answers myself right now but I'll happily write a PR on the docs when I figure it out. Help me?
When I go to /flipper in flipper-ui I get this stack trace:
NameError - undefined method `name' for module `Kernel':
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/delegate.rb:89:in `method_missing'
flipper (0.7.0.beta6) lib/flipper/adapters/instrumented.rb:32:in `features'
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/delegate.rb:87:in `method_missing'
flipper (0.7.0.beta6) lib/flipper/adapters/memoizable.rb:25:in `block in features'
flipper (0.7.0.beta6) lib/flipper/adapters/memoizable.rb:24:in `features'
flipper (0.7.0.beta6) lib/flipper/dsl.rb:230:in `features'
flipper-ui (0.7.0.beta6) lib/flipper/ui/actions/features.rb:14:in `get'
flipper-ui (0.7.0.beta6) lib/flipper/ui/action.rb:67:in `block in run'
flipper-ui (0.7.0.beta6) lib/flipper/ui/action.rb:67:in `run'
flipper-ui (0.7.0.beta6) lib/flipper/ui/action.rb:27:in `run'
flipper-ui (0.7.0.beta6) lib/flipper/ui/middleware.rb:70:in `call!'
flipper-ui (0.7.0.beta6) lib/flipper/ui/middleware.rb:60:in `call'
flipper (0.7.0.beta6) lib/flipper/middleware/memoizer.rb:40:in `call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in `call'
rack-protection (1.5.3) lib/rack/protection/xss_header.rb:18:in `call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in `call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in `call'
rack-protection (1.5.3) lib/rack/protection/path_traversal.rb:16:in `call'
rack-protection (1.5.3) lib/rack/protection/json_csrf.rb:18:in `call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in `call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in `call'
rack-protection (1.5.3) lib/rack/protection/frame_options.rb:31:in `call'
rack (1.6.0) lib/rack/builder.rb:153:in `call'
actionpack (4.2.0) lib/action_dispatch/routing/mapper.rb:51:in `serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.0) lib/rack/etag.rb:24:in `call'
rack (1.6.0) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.0) lib/rack/head.rb:13:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
activerecord (4.2.0) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
web-console (2.0.0) lib/action_dispatch/debug_exceptions.rb:18:in `middleware_call'
web-console (2.0.0) lib/action_dispatch/debug_exceptions.rb:13:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
sentry-raven (0.12.3) lib/raven/integrations/rack.rb:61:in `call'
rack-cors (0.3.1) lib/rack/cors.rb:72:in `call'
railties (4.2.0) lib/rails/engine.rb:518:in `call'
railties (4.2.0) lib/rails/application.rb:164:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
rack (1.6.0) lib/rack/content_length.rb:15:in `call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'a
With the updated set of adapters for the 0.5
release, the #set_delete
and #delete
methods have been removed from the adapter specs. This appeared to be the only way to abstractly delete features/sets from any given adapter and it was definitely nice to have. Is this move completely intentional?
One useful trick we use in production is to have a banner, or some sort of distinguishing color/banner/icon/popup that indicates that you are making changes to production. What do you all think about adding something similar to Flipper? It's definitely helpful to prevent mistakes from happening.
It's HA and gives you an easy ability to watch for changes to update your in-memory cache of the current state of things.
Failures look like:
Failures:
1) Flipper::Instrumentation::LogSubscriber feature enabled checks logs feature calls with result after operation
Failure/Error: raise("Could not find line matching #{str.inspect} in #{lines.inspect}")
RuntimeError:
Could not find line matching "Flipper feature(search) enabled? false" in []
# ./spec/flipper/instrumentation/log_subscriber_spec.rb:105:in `find_line'
# ./spec/flipper/instrumentation/log_subscriber_spec.rb:35:in `block (3 levels) in <top (required)>'
Works fine with < 4.0.0
I am sorry in advance for maybe a noobish question but I am stuck
After deploying flipper (with ui) to production and trying to flip feature I got 403 Forbidden from every action
I am running two thins, http and ssl one with force ssl option on
I see ui just fine but I can't trigger any action getting 403 Forbidden
Going back to development environment (with single ssl thin) and actions work fine
Any hints?
uncomfortable solution is to flip on development and copy flipper.pstore to production
Gems included by the bundle:
It is kind of terrible. Instead, inspect could use enabled gates or include the gate values. This also makes description available as an actual field that users fill out for each feature.
Hi @jnunemaker π
We're currently adding flipper to Classroom for GitHub education/classroom#474, and I was trying to figure out how to override the flipper-ui
views.
Is there a way to do this?
My attempt at doing it myself was rather unsuccessful.
I tried to override adding to the Rails lib
directory /lib/flipper-ui/flipper/lib/views/layout.erb
, but I was unsuccessful.
Any help would be much appreciated!
Hi,
I've been trying to create a group from the UI but it seems that's not possible yet.
Can you confirm that?
I'm thinking about add a feature on the UI but I'm not sure if it's the best approach according to your original idea of the project.
What do you think of add a separate button aside "Add Feature", redirecting to a new group creation page? Then I'll be able to see it on the group session. Now the API seems to be the only way. Image below:
Another option is add a similar to the actors form but, since a group doesn't belong to a specific feature, I don't know if it is a good idea.
What are your thoughts?
Thanks!!
Now that we have Flipper::UI it would be nice to have Flipper::API. Flipper::API would provide the same functionality as the UI but all json responses instead of html/css views. Clients could then be created for chatops/hubot to enable/disable features and all that.
When I go to /flipper in flipper-ui I get this stack trace:
NameError - undefined method name' for module
Kernel':
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/delegate.rb:89:in method_missing' flipper (0.7.0.beta6) lib/flipper/adapters/instrumented.rb:32:in
features'
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/delegate.rb:87:in method_missing' flipper (0.7.0.beta6) lib/flipper/adapters/memoizable.rb:25:in
block in features'
flipper (0.7.0.beta6) lib/flipper/adapters/memoizable.rb:24:in features' flipper (0.7.0.beta6) lib/flipper/dsl.rb:230:in
features'
flipper-ui (0.7.0.beta6) lib/flipper/ui/actions/features.rb:14:in get' flipper-ui (0.7.0.beta6) lib/flipper/ui/action.rb:67:in
block in run'
flipper-ui (0.7.0.beta6) lib/flipper/ui/action.rb:67:in run' flipper-ui (0.7.0.beta6) lib/flipper/ui/action.rb:27:in
run'
flipper-ui (0.7.0.beta6) lib/flipper/ui/middleware.rb:70:in call!' flipper-ui (0.7.0.beta6) lib/flipper/ui/middleware.rb:60:in
call'
flipper (0.7.0.beta6) lib/flipper/middleware/memoizer.rb:40:in call' rack (1.6.0) lib/rack/methodoverride.rb:22:in
call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in call' rack-protection (1.5.3) lib/rack/protection/xss_header.rb:18:in
call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in call' rack-protection (1.5.3) lib/rack/protection/base.rb:49:in
call'
rack-protection (1.5.3) lib/rack/protection/path_traversal.rb:16:in call' rack-protection (1.5.3) lib/rack/protection/json_csrf.rb:18:in
call'
rack-protection (1.5.3) lib/rack/protection/base.rb:49:in call' rack-protection (1.5.3) lib/rack/protection/base.rb:49:in
call'
rack-protection (1.5.3) lib/rack/protection/frame_options.rb:31:in call' rack (1.6.0) lib/rack/builder.rb:153:in
call'
actionpack (4.2.0) lib/action_dispatch/routing/mapper.rb:51:in serve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in
block in serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in serve' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in
call'
warden (1.2.3) lib/warden/manager.rb:35:in block in call' warden (1.2.3) lib/warden/manager.rb:34:in
call'
rack (1.6.0) lib/rack/etag.rb:24:in call' rack (1.6.0) lib/rack/conditionalget.rb:25:in
call'
rack (1.6.0) lib/rack/head.rb:13:in call' actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in
call'
actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in call' rack (1.6.0) lib/rack/session/abstract/id.rb:225:in
context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in
call'
activerecord (4.2.0) lib/active_record/query_cache.rb:36:in call' activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in
call'
activerecord (4.2.0) lib/active_record/migration.rb:378:in call' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in
block in call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in _run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:734:in
_run_call_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in
call'
actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in call' actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in
call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in protected_app_call' better_errors (2.1.1) lib/better_errors/middleware.rb:79:in
better_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in call' web-console (2.0.0) lib/action_dispatch/debug_exceptions.rb:18:in
middleware_call'
web-console (2.0.0) lib/action_dispatch/debug_exceptions.rb:13:in call' actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call'
railties (4.2.0) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.0) lib/rails/rack/logger.rb:20:in
block in call'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in
tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.0) lib/rails/rack/logger.rb:20:in
call'
quiet_assets (1.1.0) lib/quiet_assets.rb:27:in call_with_quiet_assets' actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in
call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in call' rack (1.6.0) lib/rack/runtime.rb:18:in
call'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' rack (1.6.0) lib/rack/lock.rb:17:in
call'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in call' rack (1.6.0) lib/rack/sendfile.rb:113:in
call'
sentry-raven (0.12.3) lib/raven/integrations/rack.rb:61:in call' rack-cors (0.3.1) lib/rack/cors.rb:72:in
call'
railties (4.2.0) lib/rails/engine.rb:518:in call' railties (4.2.0) lib/rails/application.rb:164:in
call'
rack (1.6.0) lib/rack/lock.rb:17:in call' rack (1.6.0) lib/rack/content_length.rb:15:in
call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in service' /Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in
service'
/Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in run' /Users/kcoleman/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in
block in start_thread'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.