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
Creating a customer #87
Conversation
dexhorthy
commented
Jan 16, 2020
•
edited
edited
- add customer create command - expand list customer query to pull expiration date and license type - remove {shipclient,kotsclient,platformclient}.Client interfaces, they were not adding anything, and made code navigation difficult - Refactor get-or-create-channel logic from `replicated release create --promote` into a Client-level `GetChannelByName` with an optional `create` flag to create the channel
) | ||
|
||
type Client interface { |
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 have removed these interfaces because they don't add a ton, and I have some thoughts about how to restructure this whole client thing.
I also short-circuited directly to the implementations to improve code nav.
@laverya looks like a failure in your pact test, which might be my fault, but hard to tell from the NPE: Let me know if you have any ideas off the top of your head otherwise I can try to dig in deeper on the failure.
|
KotsClient kotsclient.Client | ||
PlatformClient *platformclient.HTTPClient | ||
ShipClient *shipclient.GraphQLClient | ||
KotsClient *kotsclient.GraphQLClient |
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 simplify codenav
if appType == "platform" { | ||
return nil, errors.New("ensure-channel operations are not supported for platform applications") | ||
} else if appType == "ship" { | ||
return nil, errors.New("ensure-channel operations are not supported for ship applications") |
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.
do we not have GetChannelByName without the ensure-channel bits for these schedulers?
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.
this isn't a regression though, so not a blocker
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.
Just, didn't feel like implementing it. This is partially because the current code structure requires a lot of code dupe to do so