Skip to content

test: exercise FDv2 and FDv1 fallback via the v3 contract tests#315

Merged
kinyoklion merged 2 commits into
mainfrom
rlamb/sdk-2189/fdv2-contract-tests
Jun 29, 2026
Merged

test: exercise FDv2 and FDv1 fallback via the v3 contract tests#315
kinyoklion merged 2 commits into
mainfrom
rlamb/sdk-2189/fdv2-contract-tests

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Jun 25, 2026

Copy link
Copy Markdown
Member

Stacked on #314 (the Flutter FDv2 exposure). Wires the Flutter contract test service for the v3 (FDv2) harness and runs it in CI, so the data system — including FDv1 fallback — is exercised end-to-end.

Changes

  • Contract service: advertise the fdv1-fallback capability; map the harness dataSystem configuration onto LDConfig.dataSystem (including the fdv1Fallback polling config); regenerate the service API model (service_api.openapi.*) for the dataSystem schema.
  • CI (.github/actions/ci/action.yml): add an FDv2 contract-tests run (the launchdarkly/gh-actions/actions/contract-tests action with version: v3, branch: v3) alongside the existing FDv1 run. Because the FDv1 run stops the test service at the end, the FDv2 step restarts it. Modeled on cpp-sdks' contract-tests-fdv2 job.

Validation

The v3 harness passes end-to-end against this service: 816 total / 792 ran / 24 skipped, exit 0 (run locally against this branch on merged main), including the full FDv1 fallback suite. Contract service analyzes clean.

Notes for review

The CI YAML can't be run locally, so a couple of assumptions to sanity-check:

  • The pinned contract-tests@contract-tests-v1.3.0 action supports version: v3 / branch: v3 (cpp uses the same action with v3).
  • FDv1 and FDv2 share testharness-suppressions.txt (the v3 run passes with it; cpp keeps a separate *-fdv2.txt — we can split if preferred).

Note

Low Risk
Changes are limited to CI and the contract-test adapter; production SDK behavior is exercised indirectly via harness mapping, with no auth or customer-facing API changes in this diff.

Overview
Adds FDv2 contract test coverage in shared CI alongside the existing FDv1 run: the FDv1 step is labeled explicitly, then a second pass restarts the Flutter contract test service and invokes contract-tests with version/branch v3 (same suppressions file).

The Flutter contract test service is extended for the v3 harness: it advertises fdv1-fallback (and related) capabilities, accepts a dataSystem block on client creation (OpenAPI + codegen), and _mapDataSystem translates harness shapes (connection mode overrides, initializers/synchronizers, fdv1Fallback) into LDConfig.dataSystem and initial connection mode. Smaller harness fixes include omitting null evaluation value keys, stricter context casts, and Timeout.none on the long-running test server.

pubspec.lock bumps pinned local SDK packages used by the contract app.

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

@kinyoklion kinyoklion force-pushed the rlamb/sdk-2189/fdv2-contract-tests branch from 5d0e2f1 to 55ea665 Compare June 25, 2026 21:59
@kinyoklion kinyoklion force-pushed the rlamb/sdk-2188/expose-fdv2-data-system branch from 0a9b5dd to dd322f6 Compare June 25, 2026 22:59
@kinyoklion kinyoklion force-pushed the rlamb/sdk-2189/fdv2-contract-tests branch from 55ea665 to 89be93f Compare June 25, 2026 23:00
Base automatically changed from rlamb/sdk-2188/expose-fdv2-data-system to main June 29, 2026 16:06
@kinyoklion kinyoklion force-pushed the rlamb/sdk-2189/fdv2-contract-tests branch from 89be93f to 8b829bb Compare June 29, 2026 16:09
Wire the Flutter contract test service for the v3 (FDv2) harness and run
it in CI:
- Advertise the fdv1-fallback capability.
- Map the data system configuration onto LDConfig.dataSystem, including
  the fdv1Fallback polling config.
- Regenerate the service API model for the dataSystem schema.
- Add an FDv2 contract-tests run to the shared CI action (the v3 harness,
  branch v3) alongside the existing FDv1 run; it restarts the test
  service since the FDv1 run stops it at the end.

The v3 harness passes end-to-end against this (816 total, 792 ran).
@kinyoklion kinyoklion force-pushed the rlamb/sdk-2189/fdv2-contract-tests branch from 8b829bb to c2aaa43 Compare June 29, 2026 16:18
@kinyoklion kinyoklion marked this pull request as ready for review June 29, 2026 16:37
@kinyoklion kinyoklion requested a review from a team as a code owner June 29, 2026 16:37
@kinyoklion kinyoklion merged commit 54cc74a into main Jun 29, 2026
8 checks passed
@kinyoklion kinyoklion deleted the rlamb/sdk-2189/fdv2-contract-tests branch June 29, 2026 16:52
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