Skip to content

Conversation

@addaleax
Copy link
Collaborator

chore(cli-repl): clean autocomplete implementation up a bit

Best viewed as a whitespace-diff-disabled change, doesn't include
any functional work.

chore(cli-repl): fix flaky autocompletion test MONGOSH-1960

Our current autocomplete logic does not always wait for the collection
or database name caches to be filled, in case it takes longer than 200ms
to do so. By ensuring that the caches are filled before we run the test,
we get consistent results.

chore(cli-repl,shell-api): filter autocompletions for CCs MONGOSH-1908

Collection and database names, as well as other completion items, can
mostly contain arbitrary characters with only a few exceptions.
Since some characters may mess with our REPL input, we should filter
those autocompletions out.

Best viewed as a whitespace-diff-disabled change, doesn't include
any functional work.
Our current autocomplete logic does not always wait for the collection
or database name caches to be filled, in case it takes longer than 200ms
to do so. By ensuring that the caches are filled before we run the test,
we get consistent results.
Collection and database names, as well as other completion items, can
mostly contain arbitrary characters with only a few exceptions.
Since some characters may mess with our REPL input, we should filter
those autocompletions out.
@addaleax addaleax merged commit a280bf6 into main Jan 15, 2025
131 of 133 checks passed
@addaleax addaleax deleted the 1908-dev branch January 15, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants