CLI structured output cleanups#3633
Conversation
✅ Deploy Preview for golemcloud canceled.
|
…napshotting configurations.
|
📖 Docs preview: https://docs-ba2crlas8-golem-cloud.vercel.app Built from commit |
…ge default to simple JSON
| self.ctx.log_handler().log_view(&env_summaries)?; | ||
| } | ||
|
|
||
| self.ctx.log_handler().log_view(&EnvironmentListView { |
There was a problem hiding this comment.
This will print an empty table after we already logged that "No environments are available", is that the intention?
There was a problem hiding this comment.
Yes, the intention is to always return a structured response, in listing commands too.
There was a problem hiding this comment.
But I'm asking about the human output
There was a problem hiding this comment.
Ah, sorry, will recheck.
| } | ||
| } | ||
|
|
||
| impl CliOutput for SecretCreateView { |
There was a problem hiding this comment.
If I understand correctly, these Secret* views hold the secret value itself in AgentSecretDto and the show_sensitive flag used for text output. If we serialize this to JSON with serde, we are leaking out the secret values regardless of the show-sensitive flag.
There was a problem hiding this comment.
I will recheck all the places where we do sensitive checks, most probably we had mixed filtering for these even before, in non-text modes; but thanks for pointing it out, let's "normalize" handling these.
$typemeta fieldgolem output-schema), which can also be used to list all the types, and to return a focused subschema