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

local status -o X should always emit valid yaml | json #71

Open
foxish opened this issue Jul 17, 2023 · 3 comments
Open

local status -o X should always emit valid yaml | json #71

foxish opened this issue Jul 17, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@foxish
Copy link
Member

foxish commented Jul 17, 2023

./signadot local status -o json
Error: signadot is not connected

This is not valid JSON, which will make it hard to stitch this command into a workflow

@foxish foxish added the bug Something isn't working label Jul 17, 2023
@foxish
Copy link
Member Author

foxish commented Jul 17, 2023

cc @daniel-de-vera @scott-cotton

@foxish
Copy link
Member Author

foxish commented Jul 17, 2023

Same issue exists on connect and disconnect as well.

@davixcky davixcky self-assigned this Feb 14, 2024
@scott-cotton
Copy link
Member

It sounds like we might not have the same expectations, so I'd suggest discussing this issue more.

Here is what I'd expect for facilitating stitching this into a workflow:

  1. -o refers to output, NOT stderr.
  2. local status should NOT consider being disconnected an command invocation error, nor should it consider an error in communicating with locald a command invocation error, rather, these should be part of the status and local status should almost never exit non-zero.
  3. Upon command invocation error, the error messages are placed on stderr, and the output is not necessarily coherent.
  4. local connect and local disconnect should return errors/exit non-zero when already connected or respectively already disconnected to help the wrapper confirm the expected state.

For reference, here is a related issue to using the cobra framework.

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