-
Notifications
You must be signed in to change notification settings - Fork 489
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
[Merged by Bors] - Add fluvio connector config to cli to get connector configs. #2464
Conversation
3333335
to
32549ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I try to make use of this it? I'm sure we'll want this for stuff like for fluvio table-format
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. a very minor nit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good work!
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]