Commit 426081b
Add hybrid-rrf pipeline check and improve embedding error reporting (#26936)
* Add hybrid-rrf pipeline check and improve embedding error reporting in status validation
- Add isHybridSearchPipelineAvailable() to OpenSearchVectorService and SearchRepository
to verify the hybrid-rrf search pipeline exists in OpenSearch
- Update getEmbeddingsValidation in SystemRepository to also validate the pipeline
when embeddings are enabled, failing with actionable message if missing
- Retry vector service initialization during validation to surface the actual
failure reason (embedding client vs OpenSearch vector service) instead of
the generic "not configured properly" message
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address PR review feedback from Copilot and Gitar
- Fix bug: retry path now validates embedding generation before checking
the hybrid pipeline (gitar)
- Return Optional<String> from checkHybridSearchPipeline instead of
boolean, differentiating 404 (missing) from 5xx/connectivity errors
with specific messages (copilot)
- Include initialization exception message in StepValidation so
operators don't need to hunt logs (copilot)
- Return Optional.empty() for non-OpenSearch implementations since
hybrid pipeline is OpenSearch-specific (gitar)
- Add test for 5xx response case in pipeline check
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Store vector service init error for status reporting
initializeVectorSearchService() catches exceptions internally and never
rethrows, so the try-catch in retryInitAndReportError never captured the
error. Store the exception message in vectorServiceInitError field and
read it in the validation to include in the health check message.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add unit tests for embeddings validation paths in SystemRepository
Cover the new validation branches: pipeline available, pipeline missing
(404), pipeline 5xx, embedding client init failure with error message,
vector service init failure with embedding client OK, retry with no
recovery, and Elasticsearch not supported.
Make getEmbeddingsValidation package-private for testability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Clear vectorServiceInitError on successful initialization
Prevents stale error state after a successful retry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Make vectorServiceInitError volatile and skip redundant init retries
- Add volatile to vectorServiceInitError for thread-safe reads from
the unsynchronized getter
- Skip calling initializeVectorSearchService() during validation when
a previous init error is already recorded, avoiding expensive retries
and log spam on every /system/validate call
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address review: @VisibleForTesting, e.toString(), mock Bedrock config
- Annotate getEmbeddingsValidation with @VisibleForTesting to document
the package-private visibility is intentional for testing
- Use e.toString() instead of e.getMessage() for vectorServiceInitError
and pipeline check errors to avoid null messages
- Mock Bedrock config in tests instead of null to eliminate noisy
ERROR logs during test runs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Allow transient failure recovery, include response body, fix test style
- Remove guard that prevented init retries after a previous error,
allowing recovery from transient failures (e.g., OpenSearch restart).
initializeVectorSearchService() is already idempotent.
- Include truncated response body in non-404 pipeline check errors
for actionable diagnostics (e.g., 403 permission details)
- Rename testEmbeddingsPassButPipelineMissing to
testEmbeddingsFailWhenPipelineMissing for clarity
- Use imported Optional instead of fully qualified in tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent ca170ff commit 426081b
5 files changed
Lines changed: 374 additions & 7 deletions
File tree
- openmetadata-service/src
- main/java/org/openmetadata/service
- jdbi3
- search
- vector
- test/java/org/openmetadata/service
- jdbi3
- search/vector
Lines changed: 96 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
560 | 561 | | |
561 | 562 | | |
562 | 563 | | |
563 | | - | |
| 564 | + | |
| 565 | + | |
564 | 566 | | |
565 | 567 | | |
566 | 568 | | |
| |||
576 | 578 | | |
577 | 579 | | |
578 | 580 | | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
| 581 | + | |
| 582 | + | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
587 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
588 | 599 | | |
589 | 600 | | |
590 | 601 | | |
| |||
594 | 605 | | |
595 | 606 | | |
596 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
597 | 686 | | |
598 | 687 | | |
599 | 688 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| |||
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
| 427 | + | |
425 | 428 | | |
426 | 429 | | |
427 | 430 | | |
| |||
430 | 433 | | |
431 | 434 | | |
432 | 435 | | |
| 436 | + | |
433 | 437 | | |
434 | 438 | | |
435 | 439 | | |
| |||
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
474 | 485 | | |
475 | 486 | | |
476 | 487 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
108 | 155 | | |
109 | 156 | | |
110 | 157 | | |
| |||
0 commit comments