feat: Add C bindings for Redis Big Segments store#574
Merged
Conversation
beekld
force-pushed
the
beeklimt/SDK-2529/big-segments-c-bindings
branch
from
July 1, 2026 18:56
a42553c to
bb517aa
Compare
beekld
force-pushed
the
beeklimt/SDK-2628/redis-big-segments-c-binding
branch
from
July 1, 2026 19:06
2ce9c92 to
e06f24a
Compare
beekld
force-pushed
the
beeklimt/SDK-2529/big-segments-c-bindings
branch
from
July 1, 2026 23:43
bb517aa to
2f888ea
Compare
beekld
force-pushed
the
beeklimt/SDK-2628/redis-big-segments-c-binding
branch
from
July 1, 2026 23:45
e06f24a to
c0acca8
Compare
beekld
marked this pull request as ready for review
July 2, 2026 00:08
kinyoklion
reviewed
Jul 22, 2026
Member
There was a problem hiding this comment.
Do we need to note that the error massages may contain things like query parameters and you may want to consider sanitizing them?
kinyoklion
approved these changes
Jul 22, 2026
Base automatically changed from
beeklimt/SDK-2529/big-segments-c-bindings
to
main
July 24, 2026 20:29
beekld
force-pushed
the
beeklimt/SDK-2628/redis-big-segments-c-binding
branch
from
July 24, 2026 20:33
ede2c19 to
d72a78b
Compare
Merged
beekld
added a commit
that referenced
this pull request
Jul 24, 2026
## Summary Introduces DynamoDB C bindings. Before this PR, none of the DynamoDB integration was reachable from C -- neither LazyLoad source nor Big Segments store. This PR covers the LazyLoad source and the shared `DynamoDBClientOptions` surface; the Big Segments store follow-on will reuse the options builder introduced here. New public surface: - `LDServerDynamoDBClientOptionsBuilder` opaque handle for AWS DynamoDB client configuration. - `LDServerDynamoDBClientOptionsBuilder_New` / `_Free`, and setters for `_Region`, `_Endpoint`, `_AccessKeyId`, `_SecretAccessKey`, `_SessionToken`. - `LDServerLazyLoadDynamoDBSource` opaque handle. - `struct LDServerLazyLoadDynamoDBResult` with `source` and `error_message` fields, plus `LDSERVER_LAZYLOAD_DYNAMODBSOURCE_ERROR_MESSAGE_SIZE`. - `LDServerLazyLoadDynamoDBSource_New(table_name, prefix, options, out_result)` factory and `LDServerLazyLoadDynamoDBSource_Free(source)`. Tests: - Unit tests for the options builder (create, set every field, free). - Unit tests for successful source creation with and without the options builder (NULL means "AWS SDK default provider chain"). - End-to-end test against DynamoDB Local: creates a table, writes flags through the existing `PrefixedDynamoDBClient` fixture, wires the source through the C API, and verifies `LDServerSDK_AllFlagsState` reads the flags back. Mirrors the Redis LazyLoad e2e. Design decisions worth flagging: the source type name uses config-section-first word order (`LazyLoad` + `DynamoDB` + `Source`) to match the existing Redis LazyLoad binding `LDServerLazyLoadRedisSource`. The client options type is named `LDServerDynamoDBClientOptionsBuilder` (with `Builder` suffix) even though the C++ side is a plain struct rather than a builder -- the C surface is builder-like from the caller's perspective (`_New` + setters + consumed by a factory), which matches the sibling `LDServerHttpPropertiesTlsBuilder` precedent in the same shape. Stacked on #574 (Redis Big Segments store). Please review that PR first. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > New public C surface and thin wrappers over existing DynamoDB integration; credential validation and error handling follow established Redis LazyLoad binding patterns. > > **Overview** > Exposes the existing C++ DynamoDB Lazy Load data source to **C callers**, which previously could not wire DynamoDB into the server SDK at all. > > Adds **`LDServerDynamoDBClientOptionsBuilder`** (region, endpoint, and AWS credential setters; optional fields fall back to the AWS default provider chain) and **`LDServerLazyLoadDynamoDBSource_New`** / **`_Free`**, with **`LDServerLazyLoadDynamoDBResult`** carrying either a source handle or a fixed-size **`error_message`**. The options builder is **consumed** by the source factory when non-NULL, matching the intended reuse for future Big Segments bindings. Implementation delegates to **`DynamoDBDataSource::Create`**. > > **Tests** cover the options builder, successful creation with and without options, rejection of partial credentials, and an e2e path through **`LDServerConfigBuilder_DataSystem_LazyLoad`** and **`LDServerSDK_AllFlagsState`** against DynamoDB Local. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 54d16d8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
beekld
added a commit
that referenced
this pull request
Jul 24, 2026
## Summary Adds a C binding for `DynamoDBBigSegmentStore` so C callers can wire the existing DynamoDB Big Segments integration into the SDK's Big Segments config. New public surface: - `LDServerBigSegmentsDynamoDBStore` opaque handle. - `struct LDServerBigSegmentsDynamoDBResult` with `store` and `error_message` fields. - `LDSERVER_BIGSEGMENTS_DYNAMODBSTORE_ERROR_MESSAGE_SIZE` macro. - `LDServerBigSegmentsDynamoDBStore_New(table_name, prefix, options, out_result)` factory. - `LDServerBigSegmentsDynamoDBStore_Free(store)`. Tests: - Unit tests for successful creation with and without the options builder (NULL means "AWS SDK default provider chain"). - End-to-end test against DynamoDB Local: primes a sync timestamp via `PrefixedDynamoDBClient::PutBigSegmentSyncTime`, wires the store through the C API, and verifies the SDK reports the store available via the Big Segment status listener. The type name uses config-section-first word order (`BigSegments` + `DynamoDB` + `Store`), matching the sibling Redis Big Segments binding `LDServerBigSegmentsRedisStore` (#574) and the sibling DynamoDB LazyLoad binding `LDServerLazyLoadDynamoDBSource` (#576). The `options` parameter reuses the `LDServerDynamoDBClientOptionsBuilder` introduced in #576. Stacked on #576 (DynamoDB LazyLoad source). Please review that PR first. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > New C API surface and tests only; behavior delegates to existing `DynamoDBBigSegmentStore::Create` with no changes to core evaluation or auth paths. > > **Overview** > Exposes the existing **DynamoDB Big Segments** integration to C callers via a new public header and thin C++ shim, aligned with `LDServerBigSegmentsRedisStore` and the DynamoDB LazyLoad C API. > > **`LDServerBigSegmentsDynamoDBStore_New`** takes table name, prefix, and optional `LDServerDynamoDBClientOptionsBuilder` (NULL uses the AWS default provider chain; non-NULL builder is consumed on entry). Results land in **`LDServerBigSegmentsDynamoDBResult`** (`store` + fixed-size `error_message`). **`LDServerBigSegmentsDynamoDBStore_Free`** is for callers who do not hand ownership to **`LDServerBigSegmentsBuilder`**. > > The dynamodb-source library build now compiles **`bindings/dynamodb/dynamodb_big_segment_store.cpp`**. C binding tests cover creation with/without options, partial-credentials rejection, and a DynamoDB Local E2E path that wires the store into the SDK and asserts Big Segment store status becomes available. Comment typos (**Explicitely** → **Explicitly**) are fixed in related Redis/DynamoDB binding files. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 8978c77. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
beekld
pushed a commit
that referenced
this pull request
Jul 24, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-cpp-client: 3.11.3</summary> ## [3.11.3](launchdarkly-cpp-client-v3.11.2...launchdarkly-cpp-client-v3.11.3) (2026-07-24) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/cpp-internal bumped from 0.14.0 to 0.14.1 </details> <details><summary>launchdarkly-cpp-internal: 0.14.1</summary> ## [0.14.1](launchdarkly-cpp-internal-v0.14.0...launchdarkly-cpp-internal-v0.14.1) (2026-07-24) ### Bug Fixes * Redact anonymous context attributes in server-side custom events ([#583](#583)) ([55f7eaf](55f7eaf)) </details> <details><summary>launchdarkly-cpp-server: 3.13.0</summary> ## [3.13.0](launchdarkly-cpp-server-v3.12.0...launchdarkly-cpp-server-v3.13.0) (2026-07-24) ### Features * Add C bindings for Big Segments ([#573](#573)) ([948878e](948878e)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/cpp-internal bumped from 0.14.0 to 0.14.1 </details> <details><summary>launchdarkly-cpp-server-dynamodb-source: 0.3.0</summary> ## [0.3.0](launchdarkly-cpp-server-dynamodb-source-v0.2.1...launchdarkly-cpp-server-dynamodb-source-v0.3.0) (2026-07-24) ### Features * Add C bindings for DynamoDB Big Segments store ([#579](#579)) ([fc6c075](fc6c075)) * Add C bindings for DynamoDB LazyLoad source ([#576](#576)) ([65efc69](65efc69)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/cpp-server bumped from 3.12.0 to 3.13.0 </details> <details><summary>launchdarkly-cpp-server-otel: 0.1.4</summary> ## [0.1.4](launchdarkly-cpp-server-otel-v0.1.3...launchdarkly-cpp-server-otel-v0.1.4) (2026-07-24) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/cpp-server bumped from 3.12.0 to 3.13.0 </details> <details><summary>launchdarkly-cpp-server-redis-source: 2.4.0</summary> ## [2.4.0](launchdarkly-cpp-server-redis-source-v2.3.1...launchdarkly-cpp-server-redis-source-v2.4.0) (2026-07-24) ### Features * Add C bindings for DynamoDB Big Segments store ([#579](#579)) ([fc6c075](fc6c075)) * Add C bindings for DynamoDB LazyLoad source ([#576](#576)) ([65efc69](65efc69)) * Add C bindings for Redis Big Segments store ([#574](#574)) ([52a1898](52a1898)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/cpp-server bumped from 3.12.0 to 3.13.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). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Mechanical release-only edits; the notable behavioral change (custom-event redaction) ships via internal 0.14.1 but is not modified in this PR’s diff. > > **Overview** > Release Please **version bump** across the C++ monorepo: updates `.release-please-manifest.json`, `package.json` workspace deps, CMake `VERSION`, embedded `kVersion` strings, version tests, and **CHANGELOG** entries for the packages being published. > > **Server SDK 3.13.0** documents **C bindings for Big Segments** ([#573]). **Internal 0.14.1** documents a **privacy fix** that **redacts anonymous context attributes in server-side custom events** ([#583]). **DynamoDB source 0.3.0** and **Redis source 2.4.0** document new **C bindings** for Big Segments stores and DynamoDB LazyLoad; **client 3.11.3** and **otel 0.1.4** are dependency-aligned releases on **internal 0.14.1** / **server 3.13.0**. > > There is **no application logic in this diff**—only release metadata reflecting changes already on `main`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 05b4327. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Adds a C binding for
RedisBigSegmentStoreso C callers can wire the existing Redis Big Segments integration into the SDK's Big Segments config.New public surface:
LDServerBigSegmentsRedisStoreopaque handle.struct LDServerBigSegmentsRedisResultwithstoreanderror_messagefields.LDSERVER_BIGSEGMENTS_REDISSTORE_ERROR_MESSAGE_SIZEmacro.LDServerBigSegmentsRedisStore_New(uri, prefix, out_result)factory.LDServerBigSegmentsRedisStore_Free(store).Tests:
Design decision worth flagging: the type name uses config-section-first word order (
BigSegments+Redis+Store) to mirror the existing Redis LazyLoad C binding'sLDServerLazyLoadRedisSource(LazyLoad+Redis+Source). This differs from the C++ class nameRedisBigSegmentStore-- a literal C++ mirror would have beenLDServerRedisBigSegmentStore. Chose consistency with the sibling C binding in the same header directory over C++ class-name parity.Stacked on #573 (Big Segments C bindings). Please review that PR first.
Note
Low Risk
Additive public C surface and binding glue over existing C++ store logic; main risk is caller misuse of ownership (free vs hand off to SDK), which is documented and covered by tests.
Overview
Exposes the existing C++
RedisBigSegmentStoreto C callers via a new public header and thin wrapper, following the same result struct +_New/_Freepattern asLDServerLazyLoadRedisSource.The new API adds
LDServerBigSegmentsRedisStore_New(uri, prefix, out_result)(returns store pointer or copies a truncated error into a fixed buffer),LDServerBigSegmentsRedisStore_Free, and documents ownership transfer when the handle is passed intoLDServerBigSegmentsBuilder_New. The binding implementation delegates toRedisBigSegmentStore::Createand is wired into theserver-sdk-redis-sourcelibrary build.Tests cover success/failure creation behavior and an end-to-end path: Redis is primed with
big_segments_synchronized_on, the store is attached through the C Big Segments config builder, and the SDK’s Big Segment store status listener is asserted to report available.Reviewed by Cursor Bugbot for commit d72a78b. Bugbot is set up for automated code reviews on this repo. Configure here.