flippercloud/flipper · error · RuntimeError
#{data_type} is not supported by this adapter
Error message
#{data_type} is not supported by this adapter What it means
flipper-sequel persists features in the flipper_features and flipper_gates tables, choosing the write per the gate's data type; enable, disable, and result_for_feature route unknown data types to unsupported_data_type, which raises (lib/flipper/adapters/sequel.rb:173-176). The supported set is :boolean, :integer, :set and :json — the expression gate reports :json. flipper-sequel is a separate gem from flipper core, so the usual cause is a lockfile pairing newer core (expression gates) with an older adapter release lacking the :json branch.
Source
Thrown at lib/flipper/adapters/sequel.rb:175
when :boolean
clear(feature)
when :integer
set(feature, gate, thing)
when :json
delete(feature, gate)
when :set
@gate_class.where(gate_attrs(feature, gate, thing, json: gate.data_type == :json)).delete
else
unsupported_data_type gate.data_type
end
true
end
private
def unsupported_data_type(data_type)
raise "#{data_type} is not supported by this adapter"
end
def set(feature, gate, thing, options = {})
clear_feature = options.fetch(:clear, false)
json_feature = options.fetch(:json, false)
raise VALUE_TO_TEXT_WARNING if json_feature && value_not_text?
@gate_class.db.transaction do
clear(feature) if clear_feature
delete(feature, gate)
begin
@gate_class.create(gate_attrs(feature, gate, thing, json: json_feature))
rescue ::Sequel::UniqueConstraintViolation
end
end
endView on GitHub (pinned to 1f86de3ec9)
Solutions
- Align versions: bundle update flipper flipper-sequel so the adapter release matches flipper core (they ship in lockstep).
- Assert at boot that Gem.loaded_specs['flipper-sequel'].version equals Gem.loaded_specs['flipper'].version.
- If a newer writer already stored expression rows, clear those features (feature.delete via a current-version process) so old readers stop raising on get.
- Avoid expression rollouts until every process touching the database runs the aligned versions; map custom gates to supported data types.
Example fix
# before gem 'flipper', '~> 0.28.0' gem 'flipper-sequel', '~> 0.25.0' # after gem 'flipper', '~> 0.28.0' gem 'flipper-sequel', '~> 0.28.0'
Defensive patterns
Strategy: validation
Validate before calling
def assert_flipper_gems_aligned!
core = Gem.loaded_specs.fetch('flipper').version
adapter = Gem.loaded_specs.fetch('flipper-sequel').version
raise "flipper-sequel #{adapter} != flipper #{core}; align both gems" unless core == adapter
end
assert_flipper_gems_aligned! # at boot, before any expression operations Type guard
def expression_writable?
Gem.loaded_specs.fetch('flipper-sequel').version == Gem.loaded_specs.fetch('flipper').version
end Try / catch
begin
feature.enable_expression(expr)
rescue RuntimeError => e
raise unless e.message.end_with?('is not supported by this adapter')
Flipper.logger.warn('flipper-sequel lacks :json support; using percentage rollout instead')
feature.enable_percentage_of_time(10)
end Prevention
- Pin flipper and flipper-sequel to identical versions and bump them atomically.
- Boot-assert version equality in web and job processes that share the database.
- Sequence rollouts: upgrade all Sequel-reading processes before enabling expressions anywhere.
- Run bundle exec rake with a spec that calls feature.enabled? after upgrades to catch read-path raises early.
When it happens
Trigger: feature.enable_expression(...) / feature.add_expression (or Cloud/UI-driven expression writes) while flipper-sequel resolves older than flipper core — enable/disable raise ':json is not supported by this adapter'; feature.enabled? on a feature that already has expression rows raises via result_for_feature. Custom gates with data types outside %i[boolean integer set json] trigger it on any release.
Common situations: Rails apps that bump flipper but not flipper-sequel; multi-process setups (web + background jobs) sharing the same database where one process already wrote expression gate rows; adding a custom gate type to a fork.
Related errors
- #{data_type} is not supported by this adapter
- #{data_type} is not supported by this adapter
- #{gate} is not supported by this adapter yet
- Group #{name.inspect} has already been registered
- Your database needs to be migrated to use the latest Flipper
AI-assisted analysis of flippercloud/flipper@1f86de3ec9 (2026-08-23).
Data as JSON: /api/errors/3fe868f926218058.
Report an issue: GitHub.