Repository navigation
fix: restore document embedding for AstraDB - #6654
Merged
timothycarambat merged 2 commits intoOct 7, 2026
Merged
timothycarambat merged 2 commits into
timothycarambat merged 2 commits into
Conversation
Every document embedded into an AstraDB workspace failed with "this.logger is not a function", and no collection was ever created. The collection check called allNamespaces on the AstraDB class instead of an instance, and its error handler then threw because it used this outside the class. The check now receives the provider instance and uses it for both the lookup and the log.
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.
Embedding into AstraDB failed for every document with
this.logger is not a function. The module-levelcollectionExistshelper still calledAstraDB.allNamespaces(client)after #4787 madeallNamespacesan instance method, and itscatchcalledthis.loggeroutside the class.The helper now takes the provider instance as its first argument and calls
allNamespacesandloggeron it. The one call site ingetOrCreateCollectionpassesthis. Nothing else in the file uses the helper.I ran the real provider and the
@datastax/astra-db-tsclient against a local stand-in for the Data API, embedding two documents into workspacesales:Both the cached-vector path and the fresh embed path fail this way on master and pass on this branch.
Swapping only
this.loggerforconsole.logis not enough. Embedding then succeeds, but the existence check still throws and returns false, so acreateCollectionrequest goes out for every document and the TypeError is logged each time.No test was added, since there is no Astra test suite and a test here would only exercise a mocked Data API. The server test suite passes unchanged, and prettier and eslint pass on the file.
Closes #6653