From 0627ceb34ecf26f945c10cd519b86ca4c709c30f Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Thu, 5 Nov 2026 09:32:04 -0500 Subject: [PATCH] feat!: Remove payload filter support from the FDv2 data system The FDv2 streaming and polling requests, and the FDv1 fallback polling request, no longer send the filter query parameter. FDv2 already logged that payload filtering was unsupported and that the payload_filter_key option had no effect, but the requests still sent it. The behavior now matches the warning. The FDv1 data system keeps its payload filter support until the FDv1 removal deletes it. The contract tests no longer map the payloadFilter data system setting. The filtering capabilities stay, because only harness v2 tests them, against FDv1. --- contract-tests/client_entity.rb | 4 ---- lib/ldclient-rb/impl/data_system/polling.rb | 21 +++---------------- lib/ldclient-rb/impl/data_system/streaming.rb | 1 - .../data_system/streaming_headers_spec.rb | 1 - .../streaming_synchronizer_spec.rb | 1 - 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/contract-tests/client_entity.rb b/contract-tests/client_entity.rb index 5df1f56a..8d061005 100644 --- a/contract-tests/client_entity.rb +++ b/contract-tests/client_entity.rb @@ -52,10 +52,6 @@ def initialize(log, config) data_system.fdv1_compatible_synchronizer(build_fdv1_fallback_builder(fdv1_fallback_config)) end - if data_system_config[:payloadFilter] - opts[:payload_filter_key] = data_system_config[:payloadFilter] - end - opts[:data_system_config] = data_system.build elsif config[:streaming] streaming = config[:streaming] diff --git a/lib/ldclient-rb/impl/data_system/polling.rb b/lib/ldclient-rb/impl/data_system/polling.rb index 078352ef..9613a752 100644 --- a/lib/ldclient-rb/impl/data_system/polling.rb +++ b/lib/ldclient-rb/impl/data_system/polling.rb @@ -309,17 +309,9 @@ def initialize(sdk_key, http_config, config) # @return [Result] # def fetch(selector) - query_params = [] - query_params << ["filter", @config.payload_filter_key] unless @config.payload_filter_key.nil? - - if selector && selector.defined? - query_params << ["basis", selector.state] - end - uri = @poll_uri - if query_params.any? - filter_query = URI.encode_www_form(query_params) - uri = "#{uri}?#{filter_query}" + if selector && selector.defined? + uri = "#{uri}?#{URI.encode_www_form(basis: selector.state)}" end headers = {} @@ -384,7 +376,7 @@ class HTTPFDv1PollingRequester # # @param sdk_key [String] # @param http_config [HttpConfigOptions] HTTP connection settings - # @param config [LaunchDarkly::Config] Used for global header settings and payload_filter_key + # @param config [LaunchDarkly::Config] Used for global header settings # def initialize(sdk_key, http_config, config) @etag = nil @@ -401,14 +393,7 @@ def initialize(sdk_key, http_config, config) # @return [Result] # def fetch(selector) - query_params = [] - query_params << ["filter", @config.payload_filter_key] unless @config.payload_filter_key.nil? - uri = @poll_uri - if query_params.any? - filter_query = URI.encode_www_form(query_params) - uri = "#{uri}?#{filter_query}" - end headers = {} Impl::Util.default_http_headers(@sdk_key, @config).each { |k, v| headers[k] = v } diff --git a/lib/ldclient-rb/impl/data_system/streaming.rb b/lib/ldclient-rb/impl/data_system/streaming.rb index d3c9a5f4..ad00531b 100644 --- a/lib/ldclient-rb/impl/data_system/streaming.rb +++ b/lib/ldclient-rb/impl/data_system/streaming.rb @@ -182,7 +182,6 @@ def sync(ss) client.query_params do selector = ss.selector { - "filter" => @config.payload_filter_key, "basis" => (selector.state if selector&.defined?), }.compact end diff --git a/spec/impl/data_system/streaming_headers_spec.rb b/spec/impl/data_system/streaming_headers_spec.rb index 707db3a2..f7c79417 100644 --- a/spec/impl/data_system/streaming_headers_spec.rb +++ b/spec/impl/data_system/streaming_headers_spec.rb @@ -15,7 +15,6 @@ module DataSystem "Config", logger: logger, stream_uri: "https://stream.example.com", - payload_filter_key: nil, socket_factory: nil, initial_reconnect_delay: 1, instance_id: nil diff --git a/spec/impl/data_system/streaming_synchronizer_spec.rb b/spec/impl/data_system/streaming_synchronizer_spec.rb index 6a7ba32e..261b7368 100644 --- a/spec/impl/data_system/streaming_synchronizer_spec.rb +++ b/spec/impl/data_system/streaming_synchronizer_spec.rb @@ -17,7 +17,6 @@ module DataSystem "Config", logger: logger, stream_uri: "https://stream.example.com", - payload_filter_key: nil, socket_factory: nil, initial_reconnect_delay: 1, instance_id: nil