Commit 54cc74a
authored
test: exercise FDv2 and FDv1 fallback via the v3 contract tests (#315)
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).
<!-- CURSOR_SUMMARY -->
---
> [!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.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
db18961. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 2144c78 commit 54cc74a
6 files changed
Lines changed: 544 additions & 185 deletions
File tree
- .github/actions/ci
- apps/flutter_client_contract_test_service
- bin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
| |||
Lines changed: 161 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
292 | 440 | | |
293 | 441 | | |
294 | 442 | | |
| |||
315 | 463 | | |
316 | 464 | | |
317 | 465 | | |
318 | | - | |
319 | | - | |
| 466 | + | |
| 467 | + | |
320 | 468 | | |
321 | 469 | | |
322 | 470 | | |
| |||
364 | 512 | | |
365 | 513 | | |
366 | 514 | | |
367 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
368 | 521 | | |
369 | 522 | | |
370 | 523 | | |
| |||
385 | 538 | | |
386 | 539 | | |
387 | 540 | | |
388 | | - | |
| 541 | + | |
389 | 542 | | |
390 | 543 | | |
391 | 544 | | |
| |||
453 | 606 | | |
454 | 607 | | |
455 | 608 | | |
456 | | - | |
| 609 | + | |
457 | 610 | | |
458 | 611 | | |
459 | 612 | | |
| |||
0 commit comments