Repository navigation
Conversation
lucaronca
marked this pull request as ready for review
November 2, 2026 19:22
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On
main,AddDocumentsingests the documents directly and then starts a sync of the whole data source in the same call, which the direct ingestion documentation says not to do. It sleeps between checks of that sync regardless of the context, gives up after about five minutes with "exceeded maximum number of retries" even when the documents were loaded and the sync is still running, and counts a completed sync as success even when some documents failed. There is also no way to upload many documents and sync the data source once.AddDocumentsandAddNamedDocumentsnow ingest the documents directly and wait until each one isINDEXED, and they return an error that lists the documents ending in any other status. A data source that was never synced gets its first sync, which AWS requires for S3 data sources, and a running sync makes them returnErrIngestionJobInProgressbefore anything is uploaded.UploadDocuments,UploadNamedDocumentsandStartSynccover bulk loads, where the documents are uploaded first and the data source is synced once. Every wait now lasts until the caller's context is done, andWithWaitUntilSearchablemakesAddDocumentsalso wait untilSimilaritySearchreturns the documents, which on an OpenSearch Serverless knowledge base took about a minute afterINDEXED.Numeric metadata is returned as
float32again, sincebedrockagentruntimev1.63 and later decode it asfloat64.I tested the first sync, direct ingestion,
ErrIngestionJobInProgresswith a running sync, the cleanup after a failed ingestion, document names with spaces and accents, andWithWaitUntilSearchableagainst a real knowledge base. The package tests mock the AWS clients.PR Checklist
memory: add interfaces for X, Yorutil: add whizzbang helpers).Fixes #123).golangci-lintchecks.