Skip to content

Latest commit

 

History

History
628 lines (443 loc) · 32.1 KB

Changelog.md

File metadata and controls

628 lines (443 loc) · 32.1 KB

Changelog

All notable changes to this project will be documented in this file.

Unreleased

Additions/Changes

  • Better read-only mode for UI (flippercloud#772).
  • Allow configuring preload via a block similar to memoize (flippercloud#771).
    Rails.application.configure do
      # don't preload features for /assets/* but do for everything else
      config.flipper.preload = ->(request) { !request.path.start_with?('/assets') }
    end
  • Added strict configuration to warn when accessing a feature that doesn't exist (flippercloud#760, flippercloud#763)
    Rails.application.configure do
      # Setting to `true` or `:raise` will raise error when a feature doesn't exist.
      # Use `:warn` to log a warning instead.
      config.flipper.strict = !Rails.env.production?
    end
  • Handle deprecation of Rack::File in Rack 3.1 (flippercloud#773).
  • Human readable actor names in flipper-ui (flippercloud#737).
  • Expressions are now available and considered "alpha". They are not yet documented, but you can see examples in examples/expressions.rb. (flippercloud#692)
  • Allow head requests to api (flippercloud#759)
  • Cloud Telemetry alpha (flippercloud#775).
  • Easier statsd setup (flippercloud#779).
    # You can now just do this in your configure block and it'll require the files and configure the client.
    Flipper.configure do |conf|
      conf.statsd = my_client
    end
  • Load cloud secrets from Rails credentials (flippercloud#782)
    $ rails credentials:edit
    flipper:
      cloud_token: <your-cloud-token>
      cloud_sync_secret: <your-webhook-secret>

1.0.0

Additions/Changes

  • ui, api: Allow Rack 3 (flippercloud#670)
  • cloud: The flipper-cloud gem has been merged into the flipper and no longer needs to be added separately. Configure cloud by setting the FLIPPER_CLOUD_TOKEN environment variable. (flippercloud#743)
      # Gemfile
      gem 'flipper'
    - gem 'flipper-cloud'

Breaking Changes

  • Removed bool, actors, time, actor, percentage_of_actors, and percentage_of_time methods on Flipper and Flipper::DSL. They are rarely if ever used and conflict with some upcoming features. If you are using them, you can migrate via a search and replace like so:
    • Change Flipper.bool => Flipper::Types::Boolean.new
    • Change Flipper.boolean => Flipper::Types::Boolean.new
    • Change Flipper.actor => Flipper::Types::Actor.new
    • Change Flipper.percentage_of_actors => Flipper::Types::PercentageOfActors.new
    • Change Flipper.actors => Flipper::Types::PercentageOfActors.new
    • Change Flipper.percentage_of_time => Flipper::Types::PercentageOfTime.new
    • Change Flipper.time => Flipper::Types::PercentageOfTime.new

0.28.3

  • Updated cloud config to ensure that poll adapter ONLY syncs from cloud to local adapter (and never back to cloud). Shouldn't affect anyone other than making things more safe if an incorrect response is received from the cloud poll endpoint. (flippercloud#740)

0.28.2

Additions/Changes

  • UI: fix path to bundled assets when mounted in another Rack app (flippercloud#742)

0.28.1

Additions/Changes

0.28.0

Additions/Changes

  • Allow multiple actors for Flipper.enabled?. Improves performance of feature flags for multiple actors and simplifies code for users of flipper. This likely breaks things for anyone using Flipper internal classes related to actors, but that isn't likely you so you should be fine.
    - [user, user.team, user.org].any? { |actor| Flipper.enabled?(:my_feature, actor) }
    + Flipper.enabled?(:my_feature, user, user.team, user.org)
  • If you currently use actor.thing in a group, you'll need to change it to actor.actor.
    - Flipper.register(:our_group) do |actor|
    -   actor.thing.is_a?(OurClassName)
    - end
    + Flipper.register(:our_group) do |actor|
    +   actor.actor.is_a?(OurClassName)
    + end
  • If you currently use context.thing in a group or elsewhere, you'll need to change it to context.actors.
    - Flipper.register(:our_group) do |actor, context|
    -   context.thing.is_a?(OurClassName)
    - end
    + Flipper.register(:our_group) do |actor, context|
    +   context.actors.any? { |actor| actor.is_a?(OurClassName) }
    + end

Deprecations

  • :thing in enabled? instrumentation payload. Use :actors instead.
    ActiveSupport::Notifications.subscribe('enabled?.feature_operation.flipper') do |name, start, finish, id, payload|
    -   payload[:thing]
    +   payload[:actors]
    end

0.27.1

  • Quick fix for missing require of "flipper/version" that was causing issues with some flipper-ui people.

0.27.0

  • Easy Import/Export (flippercloud#709). This has some breaking changes but only if you are using flipper internals. If you are just using Flipper.* methods, you'll be fine.

0.26.2

  • Improve Active Record Adapter get/get_multi/get_all performance by 5-10x when dealing with thousands of gate values (flippercloud#707).

0.26.1

0.26.0

  • Cloud Background Polling (flippercloud#682)
  • Changed default branch from master to main
  • Allow configuring railtie via ENV vars (flippercloud#681)
  • flipper-ui: Fix issue preventing feature flags being enabled when confirm_fully_enable is on and feature_removal_enabled is off (flippercloud#680)

0.25.4

0.25.3

0.25.2

0.25.1

Additions/Changes

0.25.0

Additions/Changes

  • Added a prompt in Flipper UI for the 'Delete' button to prevent accidental delete of features (flippercloud#625)
  • Added failsafe adapter (flippercloud#626)
  • Removed previously deprecated options and settings. Those upgrading from <0.21 should upgrade to ~>0.24 first and fix any deprecation warnings when initializing Flipper. (flippercloud#627)
  • ActiveRecord: base class for internal models (flippercloud#629)
  • Remove use of Rack::BodyProxy in the memoizer middleware (flippercloud#631)

0.24.1

Additions/Changes

0.24.0

Additions/Changes

  • Add Ruby 3.0 and 3.1 to the CI matrix and fix groups block arity check for ruby 3 (flippercloud#601)
  • Removed support for Ruby 2.5 (which was end of line 9 months ago)
  • Add (alpha) client side instrumentation of events to cloud (flippercloud#602)
  • Fix deprecated uses of Redis#pipelined (flippercloud#603). redis-rb >= 3 now required.
  • Fix Flipper UI Rack application when Rack::Session::Pool is used to build it (flippercloud#606).

0.23.1

Additions/Changes

Bug Fixes

  • Fix railtie initialization to mount middleware after config/intializers/* (flippercloud#586)

0.23.0

Additions/Changes

0.22.2

Additions/Changes

  • Allow adding multiple actors at once in flipper-ui via comma separation (configurable via Flipper::UI.configuration.actors_separator) (flippercloud#556)

Bug Fixes

  • Fix railtie initialization to avoid altering middleware order (flippercloud#563)

0.22.1

Additions/Changes

0.22.0

Additions/Changes

  • Enable log subscriber by default in Rails (flippercloud#525)
  • Remove memoizer from API and UI (flippercloud#527). If you are using the UI or API without configuring the default instance of Flipper, you'll need to enable memoization if you want it. For examples, see the examples/ui and examples/api directories.
  • Fix SQL reserved word use in get_all for ActiveRecord and Sequel (flippercloud#536).
  • Handle spaces in names gracefully in UI (flippercloud#541).

0.21.0

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.

    # config/initializers/flipper.rb
    - Flipper.configure do |config|
    -   config.default { Flipper.new(Flipper::Adapters::ActiveRecord.new) }
    - end
  2. 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 on all ActiveRecord and Sequel models. You can remove your implementation if it is in the form of ModelName;id.

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

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

0.20.4

Additions/Changes

  • Allow actors and time gates to deal with decimal percentages (flippercloud#492)
  • Change Flipper::Cloud::Middleware to receive webhooks at / in addition to /webhooks.
  • Add write_through option to ActiveSupportCacheStore adapter to support write-through caching (flippercloud#512)

0.20.3

Additions/Changes

  • Changed the internal structure of how the memory adapter stores things.

0.20.2

Additions/Changes

  • Http adapter now raises error when enable/disable/add/remove/clear fail.
  • Cloud adapter sends some extra info like hostname, ruby version, etc. for debugging and decision making.

0.20.1

Additions/Changes

  • Just a minor tweak to cloud webhook middleware to provide more debugging information about why a hook wasn't successful.

0.20.0

Additions/Changes

0.19.1

Additions/Changes

0.19.0

Additions/Changes

  • 100% of actors is now considered conditional. Feature#on?, Feature#conditional?, Feature#state would all be affected. See flippercloud#463 for more.
  • Several doc updates.

0.18.0

Additions/Changes

  • Add support for feature descriptions to flipper-ui (flippercloud#461).
  • Remove rubocop (flippercloud#469).
  • flipper-ui redesign (flippercloud#470).
  • Removed support for ruby 2.4.
  • Added support for ruby 2.7.
  • Removed support for Rails 4.x.x.
  • Removed support for customizing actors, groups, % of actors and % of time text in flipper-ui in favor of automatic and more descriptive text.

0.17.2

Additions/Changes

0.17.1

0.17.0

Additions/Changes

0.16.2

Additions/Changes

0.16.1

Additions/Changes

0.16.0

Bug Fixes

Additions/Changes

0.15.0

  • Move Flipper::UI configuration options to Flipper::UI::Configuration (flippercloud#345).
  • Bug fix in adapter synchronizing and switched DSL#import to use Synchronizer (flippercloud#347).
  • Fix AR adapter table name prefix/suffix bug (flippercloud#350).
  • Allow feature names to end with "features" in UI (flippercloud#353).

0.14.0

  • Changed sync_interval to be seconds instead of milliseconds.

0.13.0

Additions/Changes

0.12.2

Additions/Changes

0.12.1

Additions/Changes

Bug Fixes

  • Fixed ActiveRecord and Sequel adapters to include disabled features for get_all (flippercloud#327).

0.12

Additions/Changes

  • Added Flipper.instance= writer method for explicitly setting the default instance (flippercloud#309).
  • Added Flipper::UI configuration instance for changing text and things (flippercloud#306).
  • Delegate memoize= and memoizing? for Flipper and Flipper::DSL (flippercloud#310).
  • Fixed error when enabling the same group or actor more than once (flippercloud#313).
  • Fixed redis cache adapter key (and thus cache misses) (flippercloud#325).
  • Added Rollout adapter to make it easy to import rollout data into Flipper (flippercloud#319).
  • Relaxed redis gem dependency constraint to allow redis-rb 4 (flippercloud#317).
  • Added configuration option for Flipper::UI to disable feature removal (flippercloud#322).

0.11

Backwards Compatibility Breaks

Additions/Changes

0.10.2

  • Add Adapter#get_multi to allow for efficient loading of more than one feature at a time (flippercloud#198)
  • Add DSL#preload for efficiently loading several features at once using get_mutli (flippercloud#198)
  • Add :preload and :preload_all options to memoizer as a way of efficiently loading several features for a request in one network call instead of N where N is the number of features checked (flippercloud#198)
  • Strip whitespace out of feature/actor/group values posted by UI (flippercloud#205)
  • Fix bug with dalli adapter where deleting a feature using the UI or API was not clearing the cache in the dalli adapter which meant the feature would continue to use whatever cached enabled state was present until the TTL was hit (1cd96f6)
  • Change cache keys for dalli adapter. Backwards compatible in that it will just repopulate new keys on first check with this version, but old keys are not expired, so if you used the default ttl of 0, you'll have to expire them on your own. The primary reason for the change was safer namespacing of the cache keys to avoid collisions.

0.10.1

  • Add docker compose support for contributing
  • Add sequel adapter
  • Show confirmation dialog when deleting a feature in flipper-ui

0.10.0

0.9.2

  • GET /api/v1/features
  • POST /api/v1/features - add feature endpoint
  • rack-protection 2.0.0 support
  • pretty rake output

0.9.1

  • bump flipper-active_record to officially support rails 5

0.9.0

  • Moves SharedAdapterTests module to Flipper::Test::SharedAdapterTests to avoid clobbering anything top level in apps that use Flipper
  • Memoizable, Instrumented and OperationLogger now delegate any missing methods to the original adapter. This was lost with the removal of the official decorator in 0.8, but is actually useful functionality for these "wrapping" adapters.
  • Instrumenting adapters is now off by default. Use Flipper::Adapters::Instrumented.new(adapter) to instrument adapters and maintain the old functionality.
  • Added dalli cache adapter (flippercloud#132)

0.8

  • removed Flipper::Decorator and Flipper::Adapters::Decorator in favor of just calling methods on wrapped adapter
  • fix bug where certain versions of AR left off quotes for key column which caused issues with MySQL flippercloud#120
  • fix bug where AR would store multiple gate values for percentage gates for each enable/disable and then nondeterministically pick one on read (flippercloud#122 and flippercloud#124)
  • added readonly adapter (flippercloud#111)
  • flipper groups now match for truthy values rather than explicitly only true (flippercloud#110)
  • removed gate operation instrumentation (https://github.com/flippercloud/flipper/commit/32f14ed1fb25c64961b23c6be3dc6773143a06c8); I don't think it was useful and never found myself instrumenting it in reality
  • initial implementation of flipper api - very limited functionality right now (get/delete feature, boolean gate for feature) but more is on the way
  • made it easy to remove a feature (flippercloud#126)
  • add minitest shared tests for adapters that work the same as the shared specs for rspec (flippercloud#127)

0.7.5

  • support for rails 5 beta/ rack 2 alpha
  • fix uninitialized constant in rails generators
  • fix adapter test for clear to ensure that feature is not deleted, only gates

0.7.4

  • Add missing migration file to gemspec for flipper-active_record

0.7.3

  • Add Flipper ActiveRecord adapter

0.7.2

  • Add Flipper::UI.application_breadcrumb_href for setting breadcrumb back to original app from Flipper UI

0.7.1

  • Fix bug where features with names that match static file routes were incorrectly routing to the file action (flippercloud#80)

0.7

  • Added Flipper.groups and Flipper.group_names
  • Changed percentage_of_random to percentage_of_time
  • Added enable/disable convenience methods for all gates (enable_group, enable_actor, enable_percentage_of_actors, enable_percentage_of_time)
  • Added value convenience methods (boolean_value, groups_value, actors_value, etc.)
  • Added Feature#gate_values for getting typecast adapter gate values
  • Added Feature#enabled_gates and #disabled_gates for getting the gates that are enabled/disabled for the feature
  • Remove Feature#description
  • Added Flipper::Adapters::PStore
  • Moved memoizable decorator to instance variable storage from class level thread local stuff. Now not thread safe, but we can make a thread safe version later.

UI

  • Totally new. Works like a charm.

Mongo

  • Updated to latest driver (~> 2.0)

0.6.3

  • Minor bug fixes

0.6.2

  • Added Flipper.group_exists?

0.6.1

  • Added statsd support for instrumentation.

0.4.0

  • No longer use #id for detecting actors. You must now define #flipper_id on anything that you would like to behave as an actor.
  • Strings are now used instead of Integers for Actor identifiers. More flexible and the only reason I used Integers was to do modulo for percentage of actors. Since percentage of actors now uses hashing, integer is no longer needed.
  • Easy integration of instrumentation with AS::Notifications or anything similar.
  • A bunch of stuff around inspecting and getting names/descriptions out of things to more easily figure out what is going on.
  • Percentage of actors hash is now also seeded with feature name so the same actors don't get all features instantly.