Commit graph

7 commits

Author SHA1 Message Date
Yorick Peterse
90be53c5d3
Cache feature names in RequestStore
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
2017-11-07 22:28:57 +01:00
Rémy Coutable
a7d65aeaf2
Re-add Feature.register_feature_groups which is already documented
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>
2017-07-10 15:56:23 +02:00
Rémy Coutable
b4d325c80c Allow the feature flags to be enabled/disabled with more granularity
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>
2017-06-27 18:59:51 +02:00
Robert Speicher
6661b0b8e0 Fix Style/EmptyLines violation in lib/feature.rb 2017-06-22 11:20:54 -05:00
Rémy Coutable
b8a7b59d82 Add the Flipper::Middleware::Memoizer middleware
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>
2017-06-21 17:35:29 +02:00
Sean McGivern
1d3c33b57e Increase diff limits to 100 KB for collapse and 200 KB overall
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.
2017-06-02 19:37:09 +01:00
Alejandro Rodríguez
671284ba37 Add feature toggles through Flipper 2017-05-31 21:06:01 +00:00