-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: server-side payload filters #435
Conversation
dbfde41
to
c6fa406
Compare
@@ -6,7 +6,6 @@ | |||
#include "nlohmann/json.hpp" | |||
|
|||
namespace nlohmann { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatter inserted these newlines. The main changes are in Config[Streaming|Polling]Params
adding the new filter key param.
c6fa406
to
a9ffde2
Compare
a9ffde2
to
c7c254c
Compare
} | ||
try { | ||
return regex_search(filter_key, | ||
boost::regex("^[a-zA-Z0-9][._\\-a-zA-Z0-9]*$")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should try to keep these regexes the same and \w
more concisely represents A-Za-z0-9_
.
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-cpp-client: 3.6.4</summary> ## [3.6.4](launchdarkly-cpp-client-v3.6.3...launchdarkly-cpp-client-v3.6.4) (2024-09-04) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.8.1 to 0.8.2 * launchdarkly-cpp-common bumped from 1.7.0 to 1.8.0 </details> <details><summary>launchdarkly-cpp-common: 1.8.0</summary> ## [1.8.0](launchdarkly-cpp-common-v1.7.0...launchdarkly-cpp-common-v1.8.0) (2024-09-04) ### Features * server-side payload filters ([#435](#435)) ([aaff0b8](aaff0b8)) </details> <details><summary>launchdarkly-cpp-internal: 0.8.2</summary> ## [0.8.2](launchdarkly-cpp-internal-v0.8.1...launchdarkly-cpp-internal-v0.8.2) (2024-09-04) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-common bumped from 1.7.0 to 1.8.0 </details> <details><summary>launchdarkly-cpp-server: 3.6.0</summary> ## [3.6.0](launchdarkly-cpp-server-v3.5.3...launchdarkly-cpp-server-v3.6.0) (2024-09-04) ### Features * server-side payload filters ([#435](#435)) ([aaff0b8](aaff0b8)) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.8.1 to 0.8.2 * launchdarkly-cpp-common bumped from 1.7.0 to 1.8.0 </details> <details><summary>launchdarkly-cpp-server-redis-source: 2.1.12</summary> ## [2.1.12](launchdarkly-cpp-server-redis-source-v2.1.11...launchdarkly-cpp-server-redis-source-v2.1.12) (2024-09-04) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-server bumped from 3.5.3 to 3.6.0 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR introduces Payload Filters to the C++ Server-Side SDK. The filter key can be configured individually on the Streaming or Polling data sources.
If an invalid key is provided (empty or not matching regex), a runtime error will be logged at the time of data source construction. The SDK will then request an unfiltered environment as a failsafe.
e2e testing: