Skip to content
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

Migrate influxd binary to cobra Command package #12615

Merged
merged 4 commits into from
Mar 14, 2019
Merged

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Mar 13, 2019

This PR consists of several improvements or changes to the influxd binary:

  • migrate the influxd binary to the cobra CLI package
  • introduce a run subcommand to start the server
  • execute the run command by default, if no sub-command is specified
  • register the run subcommand flags with viper. This ensures compatibility with the existing behavior of automatic binding of flags to environment variables.

Closes #12602

Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 needs a CHANGELOG entry.

cmd/influxd/launcher/launcher.go Outdated Show resolved Hide resolved
@stuartcarnie stuartcarnie self-assigned this Mar 14, 2019
Copy link
Member

@jacobmarble jacobmarble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid!

{
DestP: &l.logLevel,
Flag: "log-level",
Default: "info",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind zapcore.InfoLevel.String() but not important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Permits binary packages to set a global BuildInfo state that
can be inspected by other packages
This commit consists of several improvements or changes:

* migrate the influxd binary to cobra.Command
* introduce a default run sub-command to start the server
* register the run sub-command flags with viper
  to maintain compatibility with the existing behavior of automatic
  binding of flags to environment variables.

Closes #12602
* Add CHANGELOG entry
* Remote erroneous comment
@stuartcarnie stuartcarnie merged commit df03617 into master Mar 14, 2019
@stuartcarnie stuartcarnie deleted the sgc/cobra-command branch March 14, 2019 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants