Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: Playground no longer suggests collections with a . in the name when typing db. #513

Closed
benatshippabo opened this issue Apr 19, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@benatshippabo
Copy link

benatshippabo commented Apr 19, 2023

Bug Report

Current Behavior

Currently, the MongoDB playground will not suggest all the collections when typing:

use('mydb')
db.

Some collections are suggested, but they disappear after typing a matching string. Example:

  1. type db.
  2. animals.humans is a suggested collection
  3. continue typing db.ani
  4. suggestion disappears

Code/Gist

Expected Behavior/Code

Environment

  • node.js / npm versions: v18.16.0
  • OS: MacOS 13.3.1 (22E261)

Possible Solution

Previously, mongo would suggest all the collections and pressing tab would complete the expression. Example:

  1. type db.ani
  2. animals.humans collection is suggested
  3. pressing tab completes with db['animals.humans']

Additional Context/Screenshots

vscode info:

Version: 1.77.3
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:41:48.638Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.4.0
Sandboxed: No

extension version: v0.11.1

@benatshippabo benatshippabo changed the title Bug Report: Playground no longer suggests collections when typing db. Bug Report: Playground no longer suggests collections with a . in the name when typing db. Apr 19, 2023
@alenakhineika
Copy link
Contributor

Hey, sorry to hear you are seeing troubles with completions. Trying this myself with a standalone cluster and unfortunately can not reproduce it. Which version of the extension and VSCode are you using? Do you see all these collections on the sidebar? Is any of the collections being properly completed on tab?

@benatshippabo
Copy link
Author

benatshippabo commented Apr 19, 2023

Hi @alenakhineika I just updated the description. I seem to be able to isolate this to collection names with a . in them. I tested other collections names without a . and they work fine

I can see all the collections in the sidebar

@alenakhineika
Copy link
Contributor

alenakhineika commented Apr 19, 2023

Could you try disconnecting and connecting to a cluster? I am wondering if you just created the collection and trying to use it right away. We currently do not update completions on the fly and a refresh is required to make them show up. I've just tried with the same collection name animals.humans and after refreshing this works. One thing that needs to be changed tho is to remove the extra . after db when converting it to db['animals.humans'].

@benatshippabo
Copy link
Author

Hmm, it's still not working after reconnecting. I am also on MongoDB 5.0.14

@alenakhineika
Copy link
Contributor

Would be very nice if you were able to share a screen recording to see exactly what is happening (make sure that there is no sensitive information on the screen if you do the recording).

@benatshippabo
Copy link
Author

Okay here is the reproduction video:

mongo-suggestion-bug.mov

@alenakhineika
Copy link
Contributor

Could you try to use Disconnect/Connect instead of Refresh? (no need to record this again)

@benatshippabo
Copy link
Author

Disconnect and connect also did not fix it

@alenakhineika
Copy link
Contributor

alenakhineika commented Apr 19, 2023

Thank you very much for helping to catch this bug! Was able to reproduce and created tickets:

  • VSCODE-407 A collection with . in the namespace disappears from the suggestions list
  • VSCODE-408 Clear completions cache on Refresh action on the sidebar

@Anemy
Copy link
Member

Anemy commented May 19, 2023

This is fixed in the 1.0.1 release - thanks again for opening the issue.

@Anemy Anemy closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants