[SERVER-43951] Shell Help Collection Examples Inconsistent Created: 10/Oct/19 Updated: 29/Oct/23 Resolved: 06/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4 |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Michael Doliner (Inactive) | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Security 2019-11-18, Security 2019-12-02, Security 2020-02-10 | ||||
| Participants: | |||||
| Description |
|
When you type "help" in the Mongo shell, a list of potential help methods gets printed out. In this list, we refer to collections by an arbitrary collection name. This collection name is inconsistent throughout the help menu and therefor introduces unnecessary confusion. We refer to collections as both "mycoll" (in "db.mycoll.help()") and "foo" (in "db.foo.find()" and "db.foo.find( { a : 1 })"). I suggest we standardize on either "mycoll" or an unknown third option ("foo" is not very readable). I have opened a PR standardizing on "mycoll": https://github.com/mongodb/mongo/pull/1330 |
| Comments |
| Comment by Githook User [ 06/Feb/20 ] |
|
Author: {'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}Message: |
| Comment by Githook User [ 05/Feb/20 ] |
|
Author: {'name': 'Michael Doliner', 'username': 'mdoliner', 'email': 'michael.doliner@mongodb.com'}Message: |
| Comment by Mark Benvenuto [ 07/Nov/19 ] |
|
The PR looks good. Our current commit queue infrastructure does not support me submitting on behalf of another user. This means that if I submit the PR to the commit queue, it will appear that I wrote it. When EVG-6591 is complete, I will merge this PR. |
| Comment by Michael Doliner (Inactive) [ 14/Oct/19 ] |
|
In terms of standardizing, I think it's worth considering all contexts - however in this ticket, I was mostly focused on standardizing within a specific feature, the help menu. From the user's perspective, the help section is the only Mongo Shell view that would require this type of standardization. Looking across all help menus, we use three terms: mycollection (once), mycoll (once), and foo (twice) As noted earlier, I don't have a strong inclination on what we should standardize to in this menu - though I do think that foo doesn't contribute to an understanding of what information the user should be filling in which might be detrimental in a help screen. It's good to note that we use foo the most in our code base, but I think foo has a more general use in writing test code or providing example variables, which is not necessarily equally applicable in a help screen. Regardless of this inclination, I'm happy for us to use any of these three terms or a yet-to-be-identified fourth term. I do think changing it between different lines of the help screen provides unnecessary tension though. |
| Comment by Danny Hatcher (Inactive) [ 14/Oct/19 ] |
|
We use "foo" as a stand-in across the overall code base; I count 3865 uses in master src/mongo/ with admittedly most of them in the testing infrastructure. "mycoll" or "mycollection" only appears 71 times and the majority of that is in map reduce testing code. As far as I can tell, the only time we ever use "mycoll" in a customer facing manner is that single help line item. I would be inclined to actually change the "mycoll" here as opposed to changing everything to "mycoll". However, I personally don't feel that strongly about it and would be fine making this specific change as its a very small one. You mention "standardize"; how do you imagine that going? Would we eventually be changing every instance of a stand-in for a collection to "mycoll"? |
| Comment by Danny Hatcher (Inactive) [ 10/Oct/19 ] |
|
Does Docs have a standard? I imagine that should be what we use if so. cc: kay.kim |