Start API server only once#2382
Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom Jul 1, 2019
Merged
Conversation
Codecov Report
|
b9f5324 to
5920a42
Compare
Contributor
Author
|
WDYT? @nkubala |
5920a42 to
3b5ccdf
Compare
3b5ccdf to
68a486c
Compare
priyawadhwa
approved these changes
Jul 1, 2019
Contributor
priyawadhwa
left a comment
There was a problem hiding this comment.
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. |
Contributor
There was a problem hiding this comment.
do you mean default to false, if the api server is always started right now?
Contributor
Author
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
how about either
- changing the
--enable-rpcflag 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-rpcand--disable-rpcat 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
nkubala
approved these changes
Jul 1, 2019
| // 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. |
Contributor
There was a problem hiding this comment.
how about either
- changing the
--enable-rpcflag 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-rpcand--disable-rpcat 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: David Gageot david@gageot.net