Skip to content

Commit

Permalink
fix(cmd/influx): fix bug that causes long startup when running 'influ…
Browse files Browse the repository at this point in the history
…x help' or related commands
  • Loading branch information
Faith Chikwekwe authored and Faith Chikwekwe committed Nov 6, 2019
1 parent 7b758a4 commit bdd6c6e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Bug Fixes

1. [15777](https://github.com/influxdata/influxdb/pull/15777): Fix long startup when running 'influx help'
1. [15731](https://github.com/influxdata/influxdb/pull/15731): Ensure array cursor iterator stats accumulate all cursor stats

## v2.0.0-alpha.19 [2019-10-30]
Expand Down
8 changes: 7 additions & 1 deletion cmd/influx/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import (
"context"
"fmt"

"github.com/influxdata/flux"

"github.com/influxdata/flux/repl"
_ "github.com/influxdata/flux/stdlib" // Import the stdlib
platform "github.com/influxdata/influxdb"
_ "github.com/influxdata/influxdb/query/builtin"
_ "github.com/influxdata/influxdb/query/stdlib" // Import the stdlib
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -40,6 +43,9 @@ func init() {
}

func fluxQueryF(cmd *cobra.Command, args []string) error {

flux.FinalizeBuiltIns()

if flags.local {
return fmt.Errorf("local flag not supported for query command")
}
Expand Down
6 changes: 5 additions & 1 deletion cmd/influx/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (

"github.com/influxdata/flux"
"github.com/influxdata/flux/repl"
_ "github.com/influxdata/flux/stdlib" // Import the stdlib
platform "github.com/influxdata/influxdb"
"github.com/influxdata/influxdb/http"
"github.com/influxdata/influxdb/query"
_ "github.com/influxdata/influxdb/query/builtin"
_ "github.com/influxdata/influxdb/query/stdlib" // Import the stdlib
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -41,6 +42,9 @@ func init() {
}

func replF(cmd *cobra.Command, args []string) error {

flux.FinalizeBuiltIns()

if flags.local {
return fmt.Errorf("local flag not supported for repl command")
}
Expand Down

0 comments on commit bdd6c6e

Please sign in to comment.