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

telepresence version --format=json should output structured version info #3173

Open
nicks opened this issue May 9, 2023 · 3 comments
Open
Labels
feature New feature or enhancement request

Comments

@nicks
Copy link
Contributor

nicks commented May 9, 2023

Please describe your use case / problem.
I want to make sure that everyone on my team has a minimum version of telepresence installed, so want to parse out the version in scripts.

Describe the solution you'd like

telepresence version --output=json

should print a json spec of the version

Here's what it currently prints:

{"cmd":"version","stdout":"Client         : v2.13.1\nRoot Daemon    : v2.13.1\nUser Daemon    : v2.13.1\nTraffic Manager: not connected\n"}

😐

Describe alternatives you've considered
none

Versions (please complete the following information)
see above

@thallgren
Copy link
Member

I would like this changed too. The problem is that a long time ago, we invented json output as a generic thing for all commands, and some tools then adopted that, which means that adding proper structure now will be a breaking change.

The solution might be to actually deprecate (but retain) --output in favor of a new flag like --format.

@cindymullins-dw cindymullins-dw added the feature New feature or enhancement request label May 15, 2023
@drewfish
Copy link

Given that telepresence version --output=json is just wrapping a blob of text, I suspect that not many people are writing scripts that use it, so it might be "safe" to change it to structured output instead.

That's true for me -- in my script I looked at using telepresence version --output=json but since that made it slightly harder to parse than the output of --output=default, I just used --output=default.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and will be closed label Aug 16, 2024
@thallgren thallgren removed the stale Issue is stale and will be closed label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

4 participants