summaryrefslogtreecommitdiff
path: root/lib/feature.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use RequestStore to memoize Flipper features so that memoized values are ↵Rémy Coutable2018-06-011-2/+9
| | | | | | cleared between requests Signed-off-by: Rémy Coutable <remy@rymai.me>
* Ensure Flipper memoizer is used in Sidekiq's context45528-repeated-calls-to-redis-for-flipper-feature-flagRémy Coutable2018-05-181-1/+16
| | | | | | | Also, don't use the provided Middleware, which isn't thread-safe, and instantiate a new Flipper instance per thread instead. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Update flipper to 0.11.0 and take advantage of the new featuresrc/update-flipperRémy Coutable2017-12-141-8/+1
| | | | | | | | - Added an ActiveSupport (using Rails.cache) caching adapter - Overview of the new features can be found at https://johnnunemaker.com/flippin-features-at-runtime/ - Full Changelog can be found at https://github.com/jnunemaker/flipper/blob/v0.11.0/Changelog.md Signed-off-by: Rémy Coutable <remy@rymai.me>
* Cache feature names in RequestStoreYorick Peterse2017-11-071-1/+13
| | | | | | | | The GitHub importer (and probably other parts of our code) ends up calling Feature.persisted? many times (via Gitaly). By storing this data in RequestStore we can save ourselves _a lot_ of database queries. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/39361
* Re-add Feature.register_feature_groups which is already documentedRémy Coutable2017-07-101-0/+6
| | | | | | | | | This is a follow-up for !12362 where this was documented but the code was removed in the last iteration. Since this can still be useful and this is already supported by the API, I think re-adding the code was the best course of action. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow the feature flags to be enabled/disabled with more granularityRémy Coutable2017-06-271-6/+16
| | | | | | | | This allows to enable/disable a feature flag for a given user, or a given Flipper group (must be declared statically in the `flipper.rb` initializer beforehand). Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix Style/EmptyLines violation in lib/feature.rb33940-cache-flipper_gate-queryRobert Speicher2017-06-221-1/+0
|
* Add the Flipper::Middleware::Memoizer middlewareRémy Coutable2017-06-211-1/+0
| | | | | | | | | This ensures we make maximum one call per feature per request. See https://github.com/jnunemaker/flipper/blob/v0.10.2/docs/Optimization.md#memoizing-middleware Signed-off-by: Rémy Coutable <remy@rymai.me>
* Increase diff limits to 100 KB for collapse and 200 KB overall31983-increase-merge-request-diff-file-size-limit-for-default-toggle-openingSean McGivern2017-06-021-0/+12
| | | | | | This is controlled with the feature flag gitlab_git_diff_size_limit_increase. Both of these limits were basically picked arbitrarily in the first place; disabling the feature flag reverts to the old limits.
* Add feature toggles through FlipperAlejandro Rodríguez2017-05-311-0/+41