[SERVER-49373] Provide json and non-json version output Created: 08/Jul/20 Updated: 06/Dec/22 Resolved: 24/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.0-rc12 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Oleg Pudeyev (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Service Arch
|
||||
| Participants: | |||||
| Description |
|
In 4.4, the version output changed from being plain text to being a mix of plain text and json. 4.2 --version output:
4.4 --version output:
While the 4.4 output can be read by humans and can, kind of, be read by machines, I think it is suboptimal for the following reasons:
> mongo --version | sed -E 's/Build Info: |MongoDB shell.*//' Since the format is not documented, there is no guarantee this sed command will work in future versions. Additionally, having to perform text transforms on output is awkward.
I believe a better implementation would be to provide two version outputs:
The second output could be obtained via, say, --json-version switch. |
| Comments |
| Comment by Lauren Lewis (Inactive) [ 24/Feb/22 ] |
|
We haven’t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket. |