[Merged by Bors] - Add fluvio connector config to cli to get connector configs.#2464
[Merged by Bors] - Add fluvio connector config to cli to get connector configs.#2464simlay wants to merge 11 commits intofluvio-community:masterfrom
Conversation
3333335 to
32549ef
Compare
sehz
left a comment
There was a problem hiding this comment.
Generally looks good. Unfortunately, I think we don't seem to have an existing framework for describe which we should start
| return Err(CliError::ConnectorNotFound(connector_name)); | ||
| }; | ||
| let connector: ConnectorConfig = connector.into(); | ||
| let connector = serde_yaml::to_string(&connector)?; |
There was a problem hiding this comment.
We should support all output types right? (YAML,JSON, Text) We should probably have trait for it so can standardize it.
There was a problem hiding this comment.
We do actually kinda already have this. If you were to do fluvio connector list -O [json|yaml] you'll get the connectors spec as json/yaml. The issue is that it's pretty much just the CRD as json or yaml. Not the connector yaml which the user will want to copy and paste for a fluvio connector create or fluvio connector update command.
There was a problem hiding this comment.
I forgot, we already have this: https://github.com/infinyon/fluvio/blob/master/crates/fluvio-extension-common/src/output/describe.rs.
There was a problem hiding this comment.
Should I try to make use of this it? I'm sure we'll want this for stuff like for fluvio table-format.
tjtelan
left a comment
There was a problem hiding this comment.
Can we have a CLI test that starts a connector and just runs the describe command and tests that it exits appropriately?
059e947 to
464b7a9
Compare
|
bors r+ |
Closes #2458. ~Notes from discussion with @ajhunyady: add json output type option.~ We chose to move to using `fluvio connector config <name> [-o output-file]`
|
Pull request successfully merged into master. Build succeeded: |
Closes #2458.
Notes from discussion with @ajhunyady: add json output type option.We chose to move to using
fluvio connector config <name> [-o output-file]