feat: warn that payload filtering has no effect with FDv2 - #434
Open
beekld wants to merge 2 commits into
Open
Conversation
Co-Authored-By: Bee Klimt <bklimt@launchdarkly.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…-payload-filter-warning
Contributor
|
The The two examples added by this PR pass consistently. I don't have permission to re-run the failed job; a maintainer re-run should clear it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents and warns that
payload_filter_keyhas no effect when the FDv2 data system is used.Closes SDK-2975.
Config#payload_filter_keydocs now state payload filtering is unsupported with FDv2Requirements
Related issues
SDK-2975, part of SDK-2575. Same change as java-core#209, go-server-sdk#440 and python-server-sdk#518, adapted for the shared option.
Implementation details
Unlike Go and Java, Ruby has no FDv2-specific filter setter —
payload_filter_keyis a top-level option shared by FDv1 and FDv2 — so it cannot be deprecated without also deprecating supported FDv1 usage. Instead theattr_readerdocs call out the FDv2 limitation andImpl::DataSystem::FDv2#initializewarns once when the option is set.The FDv2 initializers/synchronizers still append
?filter=to their requests. That is intentional for now: on the delivery side, FDv2 reads thefilterquery param only for observability and never uses it to select a payload, so the parameter is inert rather than harmful. Dropping it would also break theenvironment_filter_keycontract-test scenarios that the pinned harness (v3.0.0-alpha.6) still runs, requiring suppressions until the harness pin is bumped past sdk-test-harness#431. Removing the parameter belongs with that bump in the removal phase.Testing:
rubocopclean;rspec spec/impl/data_system/fdv2_datasystem_spec.rb. Note two FDv1-fallback examples in that file fail onmainas well under some random seeds (mock doubles leaking across examples) — unrelated to this change.Link to Devin session: https://app.devin.ai/sessions/ed604c6db94d452ea9f2dc35d6acc398
Open in Devin Desktop: https://app.devin.ai/desktop/session/ed604c6db94d452ea9f2dc35d6acc398?variant=devin
Requested by: @beekld
Note
Overview
Clarifies that
payload_filter_keydoes not apply when the FDv2 data system is in use, matching sibling SDKs without deprecating the shared option (FDv1 still honors it).Config#payload_filter_keydocumentation now states that filtering is unsupported for FDv2 requests.Impl::DataSystem::FDv2#initializelogs a one-time warn when a filter key is set so operators know the setting is ignored. Specs cover warn vs no-warn on FDv2 construction.Reviewed by Cursor Bugbot for commit 8f49897. Bugbot is set up for automated code reviews on this repo. Configure here.