Commit 7c9fc68
committed
fix(cli): wait for model actions before dispatching conformance tests
genkit dev:test-model dispatched test requests immediately after the
runtime appeared, without checking whether the target model actions
were actually registered. This caused 404 errors on /api/runAction
for models that hadn't finished registering yet (especially with
non-JS runtimes that may have slower startup).
Add waitForActions() that polls /api/actions after the runtime is
detected and waits until all model keys referenced in the test
suites are present before starting tests. Polls every 500ms for
up to 30 seconds, with periodic progress logging.
Fixes #45991 parent 952ee90 commit 7c9fc68
1 file changed
+54
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
487 | 537 | | |
488 | 538 | | |
489 | 539 | | |
| |||
655 | 705 | | |
656 | 706 | | |
657 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
658 | 712 | | |
659 | 713 | | |
660 | 714 | | |
| |||
0 commit comments