-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Start API server only once #2382
Start API server only once #2382
Conversation
Codecov Report
|
b9f5324
to
5920a42
Compare
WDYT? @nkubala |
5920a42
to
3b5ccdf
Compare
3b5ccdf
to
68a486c
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.
this LGTM, but someone more familiar with the event API should probably take a look!
// Start API Server | ||
if cmd.Use == "dev" { | ||
// TODO(dgageot): api server is always started in dev mode, right now. | ||
// It should instead default to true. |
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 you mean default to false, if the api server is always started right now?
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 mean it should default to true for dev mode but the user should be able to disable it. Currently, it's always on for dev mode
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 see, thanks!
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.
how about either
- changing the
--enable-rpc
flag to a*bool
, so we can tell if the user didn't provide the flag (vs. explicitly providing--enable-rpc=false
, or - adding a separate flag
--disable-rpc
, and checking that here e.g.if cmd.Use == "dev" && opts.DisableRPC == false
. we'd have to have a way to make sure users don't set--enable-rpc
and--disable-rpc
at the same time though (don't know if there's an easy way to do this using cobra)
I'm fine with this being out of scope for this PR though.
Signed-off-by: David Gageot <david@gageot.net>
68a486c
to
c1cd11c
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.
LGTM
// Start API Server | ||
if cmd.Use == "dev" { | ||
// TODO(dgageot): api server is always started in dev mode, right now. | ||
// It should instead default to true. |
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.
how about either
- changing the
--enable-rpc
flag to a*bool
, so we can tell if the user didn't provide the flag (vs. explicitly providing--enable-rpc=false
, or - adding a separate flag
--disable-rpc
, and checking that here e.g.if cmd.Use == "dev" && opts.DisableRPC == false
. we'd have to have a way to make sure users don't set--enable-rpc
and--disable-rpc
at the same time though (don't know if there's an easy way to do this using cobra)
I'm fine with this being out of scope for this PR though.
Signed-off-by: David Gageot david@gageot.net