[SERVER-50266] Unfriendly formatting for setParameter help Created: 12/Aug/20 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 4.0.19, 4.2.8, 4.4.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Ramon Fernandez Marina | Assignee: | Backlog - Security Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Security
|
| Sprint: | Security 2020-09-21 |
| Participants: |
| Description |
|
Reproduces in 4.4.0:
|
| Comments |
| Comment by Judah Schvimer [ 01/Jun/21 ] | |||||
|
Thanks kelsey.schubert! This behavior is not intended, but also is in the Server, not the Shell, so mongosh is not the appropriate home. We're putting this back on the backlog as a future minor improvement. | |||||
| Comment by Kelsey Schubert [ 26/May/21 ] | |||||
|
Reopening to get clarity around whether this behavior is intended? I think so, but then I would expected this ticket to be closed as "Works as Designed" If it is intended, it probably make make sense to move this ticket to mongosh to be considered against their backlog since that shell is the one we are focusing efforts on making more user-friendly. | |||||
| Comment by Ramon Fernandez Marina [ 12/Aug/20 ] | |||||
Problem solved – I can now run runCommandHelp({setParameter:1}). | |||||
| Comment by Eric Sedor [ 12/Aug/20 ] | |||||
|
A workaround is:
Perhaps the right behavior is for the runCommand wrapper to return .help when help:true is included in the command body? | |||||
| Comment by Ramon Fernandez Marina [ 12/Aug/20 ] | |||||
|
No, not a regression – I just tested with 2.6.0 and the behavior is the same. I get the part of it being proper json, but it would be nice if there was a way to display help in the shell nicely. Maybe the answer is not to change this in any way, but to have a shell helper? I'd be surprised if there was not one hanging around somewhere that I can put on my .mongorc.js and close this as WaD... | |||||
| Comment by Bruce Lucas (Inactive) [ 12/Aug/20 ] | |||||
|
Is this a regression? Quick test seems to show similar behavior in 4.2, or am I mistaken? Is help:true intended be used in raw form like that, or is it meant to be used from the shell via db.help() or the like? | |||||
| Comment by Eric Sedor [ 12/Aug/20 ] | |||||
|
Thanks ramon.fernandez; Other less verbose help is still technically impacted by this; for example:
This is probably the right behavior when logging response json in the shell, so we may need to explore how help is formatted for shell purposes. |