flipper v0.21.0 Release Notes

  • ➕ Additions/Changes

    ⬆️ Upgrading

    ⬆️ You should be able to upgrade to 0.21 without any breaking changes. However, if you want to simplify your setup, you can remove some configuration that is now handled automatically:

    🔧 1. Adapters are configured when on require, so unless you are using caching or other customizations, you can remove adapter configuration.

    ```diff
    # config/initializers/flipper.rb
    - Flipper.configure do |config|
    -   config.default { Flipper.new(Flipper::Adapters::ActiveRecord.new) }
    - end
    ```
    
    1. Flipper::Middleware::Memoizer will be enabled by default -- including preloading. Note: You may want to disable preloading (see below) if you have > 100 features.

      # config/initializers/flipper.rb
      - Rails.configuration.middleware.use Flipper::Middleware::Memoizer,
      -   preload: [:stats, :search, :some_feature]
      + Rails.application.configure do
      +   # Uncomment to configure which features to preload on all requests
      +   # config.flipper.preload = [:stats, :search, :some_feature]
      +   #
      +   # Or, you may want to disable preloading entirely:
      +   # config.flipper.preload = false
      + end
      

    🚚 3. #flipper_id, which is used to enable features for specific actors, is now defined by [Flipper::Identifier](lib/flipper/identifier.rb) on all ActiveRecord and Sequel models. You can remove your implementation if it is in the form of ModelName;id.

    0️⃣ 4. When using flipper-cloud, The Flipper::Cloud.app webhook receiver is now mounted at /_flipper by default.

    ```diff
    # config/routes.rb
    - mount Flipper::Cloud.app, at: "/_flipper"
    ```