Skip to content

test: Add Redis, DynamoDB, and Consul stores to the contract test service - #266

Merged
keelerm84 merged 3 commits into
mainfrom
mk/SDK-3620/contract-tests-persistence
Nov 17, 2026
Merged

keelerm84 merged 3 commits into
mainfrom
mk/SDK-3620/contract-tests-persistence

Conversation

@keelerm84

@keelerm84 keelerm84 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

The contract test service now configures a persistent data store when the harness asks for one, and declares the persistent-data-store-redis, persistent-data-store-dynamodb, and persistent-data-store-consul capabilities. It reads the store from the top-level persistentDataStore configuration (v2 harness) and from dataSystem.store.persistentDataStore with its store mode (v3 harness). This replaces the commented-out placeholder in SdkClientEntity.

  • The service uses the published store integrations: launchdarkly-java-server-sdk-redis-store 3.2.0, launchdarkly-java-server-sdk-dynamodb-store 5.0.1, and launchdarkly-java-server-sdk-consul-store 5.0.0. Each excludes its transitive launchdarkly-java-server-sdk, so the tests run against the SDK in this repository.
  • DynamoDB uses the harness's sdk-contract-tests table, region us-east-1, and dummy credentials. The Consul DSN is a bare host:port.
  • Cache modes map to noCaching, cacheSeconds, and cacheForever.
  • A v2 configuration with a store and no data source uses Components.externalUpdatesOnly(), as the Go test service does.
  • The service now reads its port from PORT, which the Makefile sets from TEST_SERVICE_PORT. It still defaults to 8000.

CI starts Redis, DynamoDB, and Consul at the start of the contract test job, and the v2 and v3 runs enable the persistence tests, in both the PR workflow and the nightly workflow. The test service moves to port 9000, because the harness expects DynamoDB on port 8000.

The suppressions cover persistence tests that fail because of SDK behavior, not the test service:

  • With no data source, the SDK returns CLIENT_NOT_READY until the store has the $inited marker. The harness expects the SDK to read whatever the store holds. This fails the no-data-source tests on all three stores: the prefix tests, the v2 daemon mode group, and the v3 no-data-source, collection cardinality, and tombstone groups.
  • The DynamoDB store writes a deleted item as the string null, which the harness does not accept as a tombstone. This fails the DynamoDB data source deletions respect versioning test.

With the suppressions, the v2 suite passes locally with 6,324 tests run and the v3 suite with 6,395 tests run.

Opened from termag


Note

Overview
Enables persistent data store coverage in the Java server SDK contract test service and CI. The test service now advertises Redis, DynamoDB, and Consul persistence capabilities, builds store integrations from harness config (v2 top-level persistentDataStore and v3 dataSystem.store), supports cache modes, and can bind to a configurable port via PORT/TEST_SERVICE_PORT.

CI and local docs start Redis, DynamoDB Local, and Consul before contract runs, turn on harness persistence tests, and move the test service to port 9000 so DynamoDB can stay on 8000. Gradle pulls in the published store modules while excluding their bundled SDK so tests exercise the in-repo SDK.

Suppressions skip persistence scenarios that fail due to known SDK vs harness mismatches (e.g. no-data-source/$inited behavior and DynamoDB tombstone handling).

Reviewed by Cursor Bugbot for commit aa58267. Bugbot is set up for automated code reviews on this repo. Configure here.

termag agent runtime added 3 commits November 17, 2026 14:19
…vice

The test service now reads the persistent store configuration from the top-level
SDK configuration and from the data system configuration, and declares the three
persistent store capabilities. CI starts the stores and runs the persistence tests.
The test service moves to port 9000, because the harness expects DynamoDB on 8000.

Generated-by: termag
… updates only without a data source

The Makefile passes TEST_SERVICE_PORT as PORT, but the service always listened on 8000. A
v2 configuration with a persistent store and no data source now uses external updates
only, so that the SDK reads only from the store.

Generated-by: termag
With no data source, the SDK does not evaluate flags until the store has the init marker.
The DynamoDB store writes a deleted item as the string null, which the harness does not
accept as a tombstone.

Generated-by: termag
@keelerm84
keelerm84 marked this pull request as ready for review November 17, 2026 16:45
@keelerm84
keelerm84 requested a review from a team as a code owner November 17, 2026 16:45
@cursor cursor Bot added the risk:medium label Nov 17, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium.

Automated risk review (dry run): Medium

This PR would not be automatically approved. Human approval required.

Why: CI workflow definitions in .github/workflows/java-server-sdk.yml and nightly-contract-tests.yml are never Low, and this also wires Redis/DynamoDB/Consul into the contract-test service while suppressing persistence tests that still fail. Human review is needed and no reviewers were assigned.

If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

@keelerm84
keelerm84 merged commit a2f563c into main Nov 17, 2026
34 checks passed
@keelerm84
keelerm84 deleted the mk/SDK-3620/contract-tests-persistence branch November 17, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants