influx-cli icon indicating copy to clipboard operation
influx-cli copied to clipboard

feat: Add --version option to influx query

Open jsternberg opened this issue 2 years ago • 4 comments

The --version option will execute a query against influxdb that returns the current flux version on the server.

It uses the query from the docs: https://docs.influxdata.com/influxdb/v2.2/query-data/flux/flux-version/

jsternberg avatar May 23 '22 16:05 jsternberg

Thanks, @jsternberg ! Whoever reviews, can you verify that this flag only applies for the query subcommand? I'm fine with having this be universal to influx but would then likely need its name changed to something like --flux-version.

samhld avatar May 23 '22 19:05 samhld

... can you verify that this flag only applies for the query subcommand? I'm fine with having this be universal to influx but would then likely need its name changed to something like --flux-version.

It is currently only on the influx query subcommand, though I do wonder if a new subcommand for this, like influx flux-version would be even better. I'll leave it up to you @jsternberg

serenibyss avatar May 23 '22 20:05 serenibyss

@DStrand1 I had the same thought. In my experience, a flag usually means I'm modifying/configuring a command in some way. It may make more sense to make this its own subcommand, similar to how version is for the version of the DB and the CLI. That said, I'd rather leave that to be democratically decided by developers with more of a frame reference for standards.

@jsternberg thoughts on making this its own subcommand?

samhld avatar May 23 '22 21:05 samhld

@jsternberg A quick poll was taken on the above options and making this its own subcommand won. Would it be trouble to make this its own subcommand instead of a flag to the query subcommand?

samhld avatar May 24 '22 22:05 samhld