-
Notifications
You must be signed in to change notification settings - Fork 3.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
1.x OSS influx cli should take queries, not a REPL #20852
Comments
After discussion, we have decided to make the 1.x flux query CLI similar to the 2.x CLI. See #19038 (comment) for a discussion of why the Flux REPL built into the 1.x CLI was not desirable, and the corresponding 2.x removal: #19040 A Flux REPL similar to the old one is still available from the flux project, see #19986 . |
Closes: influxdata#18947 influxdata#20852 Similarly to 2.x, the flux CLI now only supports the -execute argument or commands on stdin. Examples: ``` ➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()' Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"' Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment ``` Note that tty input is explicitly forbidden, unlike 2.x: ``` ➜ ./influx -type flux Connected to http://localhost:8086 version unknown InfluxDB shell version: unknown Interactive flux is not supported. Provide your flux script via stdin or the -execute argument. ```
Closes: influxdata#18947 influxdata#20852 Similarly to 2.x, the flux CLI now only supports the -execute argument or commands on stdin. Examples: ``` ➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()' Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"' Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment ``` Note that tty input is explicitly forbidden, unlike 2.x: ``` ➜ ./influx -type flux Connected to http://localhost:8086 version unknown InfluxDB shell version: unknown Interactive flux is not supported. Provide your flux script via stdin or the -execute argument. ```
Closes: influxdata#18947 influxdata#20852 Similarly to 2.x, the flux CLI now only supports the -execute argument or commands on stdin. Examples: ``` ➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()' Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"' Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment ``` Note that tty input is explicitly forbidden, unlike 2.x: ``` ➜ ./influx -type flux Connected to http://localhost:8086 version unknown InfluxDB shell version: unknown Interactive flux is not supported. Provide your flux script via stdin or the -execute argument. ```
Closes: influxdata#18947 influxdata#20852 Similarly to 2.x, the flux CLI now only supports the -execute argument or commands on stdin. Examples: ``` ➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()' Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"' Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment ``` Note that tty input is explicitly forbidden, unlike 2.x: ``` ➜ ./influx -type flux Connected to http://localhost:8086 version unknown InfluxDB shell version: unknown Interactive flux is not supported. Provide your flux script via stdin or the -execute argument. ```
Closes: #18947 #20852 Similarly to 2.x, the flux CLI now only supports the -execute argument or commands on stdin. Examples: ``` ➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()' Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"' Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment ``` Note that tty input is explicitly forbidden, unlike 2.x: ``` ➜ ./influx -type flux Connected to http://localhost:8086 version unknown InfluxDB shell version: unknown Interactive flux is not supported. Provide your flux script via stdin or the -execute argument. ```
Flux REPL has been removed from 2.x, 1.x should follow suit. See also #20767 (comment) .
This is a placeholder issue until we can gather some more data on what the replacement will look like.
The text was updated successfully, but these errors were encountered: