Commit graph

11 commits

Author SHA1 Message Date
James Edwards-Jones
46f66c7f0a Allow setting feature flags per GitLab group
Building on support for setting feature flags by project, this adds
support for setting them by GitLab group path.

This is different from setting them by Flipper feature_groups, which
are for batch updating pre-registered collections.
2019-02-19 14:57:03 +08:00
Zeger-Jan van de Weg
5396594a83
Allow setting of feature gates per project
For features the feature gates are sometimes projects, not groups or
users. For example for git object pools:
https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5872

This commit allows for setting feature group gates based on projects, by its
path as that seems most convenient.
2019-01-14 14:29:51 +01:00
Michael Kozono
74ae135888 Refactor Feature.flipper method
* Fix typo in context 'when request store is active'
* Rearrange test since the instance variable always gets set now,
even if RequestStore is active
2018-09-24 12:29:22 -07:00
Brett Walker
3aea946e7f add 'default_enabled' to feature flags
This allows you to default a feature flag to 'on' when
checking whether it's enabled/disabled.
2018-09-05 09:19:16 -05:00
Gabriel Mazetto
61c35b6ca1 Fixed stub_feature_flag behavior for disabled? flags.
Previous code would not work with `disabled?` because that method would
send two parameters (second always `nil`) which we are not mocking.

Instead of mock yet another state, I decide to fix it where it belongs.
2018-08-22 05:41:15 +02:00
Douglas Barbosa Alexandre
06e03f6e4d
Allow feature flag names to be a symbol 2018-07-19 21:05:24 -03:00
Rémy Coutable
e1ffd6a271
Use RequestStore to memoize Flipper features so that memoized values are cleared between requests
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-01 17:51:40 +02:00
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
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Alejandro Rodríguez
671284ba37 Add feature toggles through Flipper 2017-05-31 21:06:01 +00:00