An error occurred fetching the project authors.
  1. 27 Jul, 2021 1 commit
  2. 14 Apr, 2021 1 commit
  3. 01 Apr, 2021 1 commit
    • Sean McGivern's avatar
      Fix feature flag race condition with stale reads · 1cd0540c
      Sean McGivern authored
      On GitLab.com we sometimes observe that a feature flag has been changed
      - and we have the response in chatops to demonstrate that - but the
      behaviour of the application doesn't reflect that. While we cannot prove
      that this is the case, we believe that this is due to a combination of
      these factors:
      
      1. We have some feature flags (Gitaly feature flags in particular) that
         are read very frequently. All Gitaly feature flags are read on every
         Gitaly call.
      2. We use database load balancing, so a read from a secondary may be
         slightly behind the primary.
      3. The feature flag library we use (Flipper) deletes the feature flag
         from the cache when it's changed, and relies on the next read to
         re-populate the cache. As these reads use what is essentially
         `Rails.cache.fetch`, the last writer 'wins'.
      
      That could lead to this situation:
      
      1. Client A is using the primary. It performs `fetch`, finds nothing,
         executes its block to get the value.
      2. Client B does the same, but using a secondary and missing out the
         write performed by client A.
      3. Client A finishes its block and writes to Redis.
      4. Client B does the same, clobbering client A's write.
      
      The solution in this change is simple: instead of deleting the feature
      flag from the cache when updating it, we always immediately write the
      new value back. That way any clients using `Rails.cache.fetch` won't
      attempt to write until the cache has expired after an hour, by which
      point the secondaries would have caught up anyway.
      
      This is behind a feature flag because it is a somewhat risky change, but
      using a feature flag is safe here as this only controls how we handle
      feature flag writes.
      1cd0540c
  4. 29 Mar, 2021 1 commit
  5. 26 Mar, 2021 1 commit
  6. 10 Mar, 2021 1 commit
  7. 14 Dec, 2020 1 commit
    • Fabio Pitino's avatar
      Allow feature flag checks to read default_enabled value from YAML · e017b14e
      Fabio Pitino authored
      When `default_enabled: :yaml` is passed to the Feature.enabled? method
      we read the value from the YAML definition.
      
      With this change we can use the YAML definition as a SSOT. Changing
      the default behavior would simply mean flipping the `default_enabled`
      in the YAML file, rather than at every occurrence in the code.
      e017b14e
  8. 02 Dec, 2020 1 commit
  9. 21 Sep, 2020 1 commit
    • Kamil Trzciński's avatar
      Make `development` flags to be `required` · 9145ed53
      Kamil Trzciński authored
      This does:
      
      - add all leftover `development` feature flags
      - ensures that licensed `feature flags` are actually checked
        against `type: :licensed`
      - makes `development` to be `optional: false`, aka `required`
      9145ed53
  10. 30 Jun, 2020 1 commit
    • Kamil Trzciński's avatar
      Introduce Feature Flag Definition · 885611a2
      Kamil Trzciński authored
      This adds a YAML-based definition of feature flags
      that are stored in `(ee/)configs/feature-flags/`.
      
      Currently none of feature flag types are required
      to have a present YAML definition.
      
      This definition contains information like:
      
      - what MR introduced FF
      - helps to create and has a issue that tracks
        the rollout and removal of FF
      - intentionally adds `default_enabled` to YAML
      - force checks the consistency of `default_enabled`
        between what is in code and what is in YAML
      885611a2
  11. 29 Jun, 2020 1 commit
  12. 23 Jun, 2020 1 commit
  13. 01 Jun, 2020 1 commit
  14. 29 May, 2020 1 commit
    • Kamil Trzciński's avatar
      Use a memoized Flipper engine in tests · 19b4e263
      Kamil Trzciński authored
      This makes us to use a memoized Flipper engine
      that simply always works.
      
      We also change a implementation of `persisted_names`
      to use a `Flipper` instead of requesting features
      manually.
      
      By default a memoized engine is used, which
      can be overwritten with `stub_feature_flags: false`.
      
      The memoized engine requires us to use object that
      are `FeatureGate-inherited`. We ensure
      that this holds true, always.
      
      This MR also updates all tests to adhere to this requirement.
      19b4e263
  15. 06 May, 2020 1 commit
    • Heinrich Lee Yu's avatar
      Switch ThreadMemoryCache to ProcessMemoryCache · 723c116b
      Heinrich Lee Yu authored
      Thread-local cache is ineffective when using Puma because unused threads
      are reaped until it reaches the min threads setting.
      
      We already tested this ProcessMemoryCache for feature flags so this
      enables it for other classes where we're still using ThreadMemoryCache
      723c116b
  16. 18 Mar, 2020 1 commit
    • Stan Hu's avatar
      Move feature flag list into process cache · 3c8efb6a
      Stan Hu authored
      When we switched from a single-threaded application server (Unicorn) to
      a multithreaded one (Puma), we did not realize that Puma often reaps
      threads after a request is done and recreates them later. This makes the
      thread-local cache ineffective, as the cache does not store anything
      beyond the lifetime of the thread.
      
      Since `ActiveSupport::Cache::MemoryStore` is thread-safe, we should be
      able to switch the L1 cache for the feature flag list to use this to
      reduce load on Redis.
      
      Since read and write access is synchronized, this does have the side
      effect of adding contention when feature flags are accessed.
      
      We made a similar change in
      https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26935, and this
      seems to be working fine.
      
      Discovered in
      https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9414
      3c8efb6a
  17. 11 Mar, 2020 1 commit
    • Stan Hu's avatar
      Use process-wide memory cache for feature flags · f2c063d1
      Stan Hu authored
      When we switched from a single-threaded application server (Unicorn) to
      a multithreaded one (Puma), we did not realize that Puma often reaps
      threads after a request is done and recreates them later. This makes the
      thread-local cache ineffective, as the cache does not store anything
      beyond the lifetime of the thread.
      
      Since `ActiveSupport::Cache::MemoryStore` is thread-safe, we should be
      able to switch the L1 cache for feature flags to use this to reduce load
      on Redis.
      
      Since read and write access is synchronized, this does have the side
      effect of adding contention when feature flags are accessed.
      
      Discovered in
      https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9414
      f2c063d1
  18. 10 Jan, 2020 1 commit
  19. 02 Dec, 2019 1 commit
  20. 29 Nov, 2019 1 commit
  21. 17 Oct, 2019 2 commits
    • Alex Buijs's avatar
      Implement feedback fixes BE · 63d389e9
      Alex Buijs authored
      - redirect users to almost there page after signing up when
      soft_email_confirmation is not enabled
      - remove enabled_since code for feature flags, since it is unreliable
      - add User#role_required? and User#set_role_required! methods to
      ‘abuse’ the role column in order to determine whether the role is
      required
      - store the requested url and redirect there after setting the role
      - add flash notice after successful signup
      - enable invisible captcha when signup_flow experiment is enabled
      - change `Welcome to GitLab.com` text to `Welcome to GitLab` in
      order to apply to Self hosted instances as well
      - cancel the signup_notice flash in the create action, where it is set
      63d389e9
    • Alex Buijs's avatar
      Only require role when appropriate · 8bb5373a
      Alex Buijs authored
      Only redirect to stage 2 of the new signup flow when
      appropriate:
      - a user’s role is missing
      - a user’s name is the same as it’s username
      - the experiment is enabled
      - the user is created after the experiment is enabled
      8bb5373a
  22. 31 Jul, 2019 1 commit
  23. 26 Jul, 2019 1 commit
  24. 03 Jul, 2019 1 commit
  25. 02 Jul, 2019 2 commits
    • Stan Hu's avatar
      Cache Flipper persisted names directly to local memory storage · f0cdffce
      Stan Hu authored
      Now that application settings are no longer dominating network traffic,
      we see that the Feature#persisted_names is using a significant amount of
      CPU and network bandwidth for Redis. Move this cache into the
      thread-local memory storage to reduce Redis overhead.
      f0cdffce
    • Stan Hu's avatar
      Cache Flipper persisted names directly to local memory storage · 385aa460
      Stan Hu authored
      Now that application settings are no longer dominating network traffic,
      we see that the Feature#persisted_names is using a significant amount of
      CPU and network bandwidth for Redis. Move this cache into the
      thread-local memory storage to reduce Redis overhead.
      385aa460
  26. 18 Jun, 2019 1 commit
  27. 19 Feb, 2019 1 commit
    • James Edwards-Jones's avatar
      Allow setting feature flags per GitLab group · 46f66c7f
      James Edwards-Jones authored
      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.
      46f66c7f
  28. 14 Jan, 2019 1 commit
  29. 24 Sep, 2018 1 commit
    • Michael Kozono's avatar
      Refactor Feature.flipper method · 74ae1358
      Michael Kozono authored
      * Fix typo in context 'when request store is active'
      * Rearrange test since the instance variable always gets set now,
      even if RequestStore is active
      74ae1358
  30. 05 Sep, 2018 1 commit
  31. 22 Aug, 2018 1 commit
  32. 20 Jul, 2018 1 commit
  33. 01 Jun, 2018 1 commit
  34. 08 Nov, 2017 1 commit
  35. 07 Nov, 2017 1 commit
  36. 27 Jul, 2017 1 commit
  37. 26 Jul, 2017 1 commit
  38. 21 Jun, 2017 1 commit