Skip to content

chore: adds DataSystem and FDv2 contract test service functionality#341

Merged
tanderson-ld merged 5 commits intomainfrom
ta/SDK-1823/fdv2-contract-tests
Apr 9, 2026
Merged

chore: adds DataSystem and FDv2 contract test service functionality#341
tanderson-ld merged 5 commits intomainfrom
ta/SDK-1823/fdv2-contract-tests

Conversation

@tanderson-ld
Copy link
Copy Markdown
Contributor

@tanderson-ld tanderson-ld commented Apr 6, 2026

Requirements

  • I have added test coverage for new or changed functionality
    N/A, this is the test coverage.

  • I have followed the repository's pull request submission guidelines

  • I have validated my changes against all supported platform versions

Related issues

SDK-1823

Describe the solution you've provided

Adds DataSystem control to the contract test service (this is what the SDK test harness connects to).


Note

Medium Risk
Touches SDK runtime translation of FDv2 flag updates and changes how contract-test clients configure data sources, which could affect flag update behavior and test reliability, but scope is limited and changes are straightforward.

Overview
Enables the Android contract test service to configure the SDK’s new DataSystem/connection-mode pipelines via test harness JSON, including custom initializers/synchronizers and explicit connection mode selection, falling back to the prior polling/streaming config when dataSystem is not provided.

Updates the contract test runner to use the sdk-test-harness v2 downloader, adds suppression file plumbing (including a new FDv2 suppression list), and ensures the service is stopped after tests.

Fixes FDv2 changeset translation to always use the envelope key when constructing Flag objects, avoiding reliance on inner JSON that omits key.

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

@tanderson-ld tanderson-ld requested a review from a team as a code owner April 6, 2026 14:43
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"events/disabling" was skipped, but it is supported and has been for some time. I have updated it to not skip this.

-s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/main/downloader/run.sh \
| VERSION=v2 PARAMS="-url http://localhost:8001 -host 10.0.2.2 -skip-from testharness-suppressions.txt -debug $(TEST_HARNESS_PARAMS)" sh
-s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/v2/downloader/run.sh \
| VERSION=v2 PARAMS="-url http://localhost:8001 -host 10.0.2.2 -debug -stop-service-at-end -skip-from $(SUPPRESSION_FILE) $(TEST_HARNESS_PARAMS_V2)" sh
Copy link
Copy Markdown
Contributor Author

@tanderson-ld tanderson-ld Apr 6, 2026

Choose a reason for hiding this comment

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

For reviewers: The above block will be deleted and replaced with the below block after the below block is uncommented in a future PR.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b4efaf. Configure here.

Copy link
Copy Markdown
Contributor

@aaron-zeisler aaron-zeisler left a comment

Choose a reason for hiding this comment

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

Overall it looks good to me. I have a couple curiosity questions, and I think the issue Bugbot pointed out is real.

@tanderson-ld tanderson-ld merged commit 8d3d199 into main Apr 9, 2026
7 of 8 checks passed
@tanderson-ld tanderson-ld deleted the ta/SDK-1823/fdv2-contract-tests branch April 9, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants