64 Commits

Author SHA1 Message Date
Jeffrey Smith II
02a094a4b1
chore: update openapi (#488) 2023-04-03 16:20:33 -04:00
Jeffrey Smith II
625273adf9
feat: Add new replication field to better show queue sync progress (#480)
* chore: update openapi

* feat: update replication field names to match influx changes

* feat: add new field to show replication queue sync progress

* chore: update to master openapi
2023-03-10 09:13:35 -05:00
Fernando Benayas
4ce9053ddb
fix: updated api for deleting secrets so "influx secret delete" command works again (#469)
* fix: updated api for deleting secrets

* fix: reversed code comments update
2023-01-09 08:35:09 -05:00
Jeffrey Smith II
ae62da0b32
chore: update to go 1.19 (#465) (#467)
* chore: upgrade go releaser to v1.13.1 (#464)

* chore: update goreleaser and actually use go 1.19

* chore: format for go 1.19

Co-authored-by: Brandon Pfeifer <bpfeifer@influxdata.com>

Co-authored-by: Brandon Pfeifer <bpfeifer@influxdata.com>
2023-01-03 16:16:12 -05:00
Jeffrey Smith II
41059f52b4
chore: update to openapi 5.1.1 to enable arm builds (#453) 2022-11-15 12:17:48 -05:00
Dane Strandboge
3285a03e9e
fix: do not require remoteOrgID for remote connection creation (#451) 2022-10-28 11:16:53 -05:00
Jeffrey Smith II
5c7c34f16d
feat: replication bucket name (#440)
* chore: gofmt

* chore: update openapi gen files

* feat: add replication-bucket-name flag

* fix: fix tests

* chore: rename to replication-bucket

* feat: show remote bucket name or id

* chore: fmt fixup

* chore: update openapi to master

* chore: fix openapi generation
2022-08-18 14:21:50 -04:00
Greg
65ff49fedf
chore(tasks): support looking up tasks by script id (#437) 2022-08-15 10:19:09 -06:00
Andrew Lee
7bdad28ee0
feat: add virtual column to DBRP printing (#435)
* feat: add virtual column to DBRP printing

* fix: update DBRP tests with new virtual column

* chore: update to latest openapi
2022-08-03 16:14:07 -06:00
Jeffrey Smith II
f34e6a888f
feat: add username and password login (#418)
* feat: add username and password login

* fix: make sure cookie is not empty

* chore: go mod tidy

* fix: prevent local config from influencing tests

* fix: small cleanup on error handling

* fix: remove unnecessary trim
2022-07-28 10:53:19 -04:00
Andrew Depke
0de05ed3e4
feat: updated openapi to support tasks containing scripts (#430) 2022-07-27 15:21:11 -06:00
Andrew Lee
e5707cd63c
feat: allow setting membership type in influx org members add (#402)
* add owners endpoints to cli.yml

* run make openapi and mock

* add owner listing, adding and removing

* fix: update tests to remove getUser indirection
2022-06-28 16:06:58 -06:00
Andrew Depke
760f07ed9e
feat: invokable scripts (#387)
* basic list, create, and invoke working

* all commands working

* added support for create script body from file and invoke params from file

* linter cleanup

* update defaults to existing parameters if not provided

* updated generated mock files, added mock files for scripts, added basic script create test

* added mock script list

* cleanup pass, fixed not using params in list call

* added update mock test

* fixed mock tests requiring go 1.18

* updated openapi, integrated overrides upstream, added new override to fix codegen bug

* added nil check

* fixed routes
2022-06-22 14:08:55 -06:00
Andrew Lee
c695e601a5
Add REPL autocompletion & go-prompt (#392)
* add v1-compatible query path and refactor other paths to de-duplicate "/query"

* add initial influxQL repl

* add ping endpoint to schema

* improve prompt UX, implement some commands

* fix json column type in schema and improve completion

* feat: add table formatter and move to forked go-prompt

* improve formatting and add table pagination

* implement more REPL commands, including insert and history

* implement "INSERT INTO"

* move repl command to "v1 repl"

* refactor and improve documentation

* clean up v1_repl cmd

* update to latest openapi, use some openapi paths instead of overrides

* remove additional files that were moved to openapi

* compute historyFilePath at REPL start

* clean up REPL use command logic flow

* clean up comments for TODOs now in issues

* move gopher (chonky boi)

* remove autocompletion for separate PR

* run go mod tidy

* add back autocompletion & go-prompt

* add rfc3339 precision option

* allow left and right column scrolling to display whole table

* add error to JSON query response

* add tags and partial to JSON response series schema

* fix csv formatting and add column formatting

* remove table format for separate PR

* fix getDatabases

* move from write to legacy write endpoint for INSERT

* remove history vestiges

* allow multiple spaces in INSERT commands

* add precision comment

* remove auth for separate PR

* separate parseInsert and add unit test

* add additional test case and improve error messages

* fix missing errors import

* fix format suggestion

* re-add history implementation with history limit

* build: upgrade to Go 1.18.3 (#395)

* feat: add back the InfluxQL REPL (#386)

* add v1-compatible query path and refactor other paths to de-duplicate "/query"

* add initial influxQL repl

* add ping endpoint to schema

* improve prompt UX, implement some commands

* fix json column type in schema and improve completion

* feat: add table formatter and move to forked go-prompt

* improve formatting and add table pagination

* implement more REPL commands, including insert and history

* implement "INSERT INTO"

* move repl command to "v1 repl"

* refactor and improve documentation

* clean up v1_repl cmd

* update to latest openapi, use some openapi paths instead of overrides

* remove additional files that were moved to openapi

* compute historyFilePath at REPL start

* clean up REPL use command logic flow

* clean up comments for TODOs now in issues

* move gopher (chonky boi)

* remove autocompletion for separate PR

* run go mod tidy

* add rfc3339 precision option

* allow left and right column scrolling to display whole table

* add error to JSON query response

* add tags and partial to JSON response series schema

* fix csv formatting and add column formatting

* remove table format for separate PR

* fix getDatabases

* move from write to legacy write endpoint for INSERT

* remove history vestiges

* allow multiple spaces in INSERT commands

* add precision comment

* remove auth for separate PR

* separate parseInsert and add unit test

* add additional test case and improve error messages

* fix missing errors import

* print rfc3339 precision

* add rfc3339 to help output

* run tidy

* restructure autocomplete and handle review items

* improve autocompletion with leftover handling

* improve comments and add autocomplete for DELETE & DROP MEASUREMENT

* rename repl to shell

* remove unsupported CREATE & DROP autocompletions

* additional refactor for autocompletion

Co-authored-by: Dane Strandboge <dstrandboge@influxdata.com>
2022-06-14 15:18:27 -06:00
Andrew Lee
fc529745a5
feat: add back the InfluxQL REPL (#386)
* add v1-compatible query path and refactor other paths to de-duplicate "/query"

* add initial influxQL repl

* add ping endpoint to schema

* improve prompt UX, implement some commands

* fix json column type in schema and improve completion

* feat: add table formatter and move to forked go-prompt

* improve formatting and add table pagination

* implement more REPL commands, including insert and history

* implement "INSERT INTO"

* move repl command to "v1 repl"

* refactor and improve documentation

* clean up v1_repl cmd

* update to latest openapi, use some openapi paths instead of overrides

* remove additional files that were moved to openapi

* compute historyFilePath at REPL start

* clean up REPL use command logic flow

* clean up comments for TODOs now in issues

* move gopher (chonky boi)

* remove autocompletion for separate PR

* run go mod tidy

* add rfc3339 precision option

* allow left and right column scrolling to display whole table

* add error to JSON query response

* add tags and partial to JSON response series schema

* fix csv formatting and add column formatting

* remove table format for separate PR

* fix getDatabases

* move from write to legacy write endpoint for INSERT

* remove history vestiges

* allow multiple spaces in INSERT commands

* add precision comment

* remove auth for separate PR

* separate parseInsert and add unit test

* add additional test case and improve error messages

* fix missing errors import

* print rfc3339 precision

* add rfc3339 to help output
2022-06-10 08:54:07 -06:00
Dane Strandboge
35279515e9
build: upgrade to Go 1.18.1 (#373) 2022-04-13 15:50:35 -05:00
Dane Strandboge
88ba3464cd
feat: add max age to replications create and update (#367) 2022-03-18 17:21:12 -05:00
Dane Strandboge
85a33adf71
chore: update to API spec for new template endpoint response (#362) 2022-02-17 14:46:05 -06:00
Dane Strandboge
981be7872d
chore: upgrade to latest OpenAPI (#357) 2022-02-01 14:53:34 -06:00
William Baker
7af0b2ae73
feat: enhanced error messages for cloud and oss specific commands (#347)
* feat: enhanced error messages for cloud and oss specific commands

* chore: rename test
2021-12-28 10:03:29 -05:00
William Baker
178c7546b1
feat: add server-config command (#346)
* feat: added server-config command

* chore: update openapi to latest
2021-12-23 09:32:31 -05:00
William Baker
68ac116959
chore: update openapi ref to latest (#345)
* chore: update openapi ref to latest

* chore: update to openapi master
2021-12-21 15:15:50 -05:00
Marko Mikulicic
becbe8f7b8
fix: Use influx-debug-id header (#338)
Influxdata cloud2 uses a different mechanism to enable tracing.
You need to pass a `influx-debug-id` header (the value is ignored) and if the response contains
`trace-sampled: true` then the response's `trace-id` header contains a valid trace ID that can be
used to jump to the trace in jaeger.

If the request has been sampled, we print the trace-id to stderr.

Since modern terminals allow to click on hyperlinks, we could avoid a copy&paste of the trace id
if the `influx` binary wrote a the link to the jeager trace.
However, we don't want to hardcode the URL of the internal jaeger endpoint in the binary.

I tried adding a wrapper script on my machine that would just capture the trace-id and render it, but it's
hard to do without messing with the ordering of the stderr and stdout lines.
Thus I preferred adding a secret env var that controls the formatting of the trace-id and can be used
by our devs to generate links to our internal jaeger instance.

```console
$ export INFLUX_CLI_TRACE_PRINT_PREFIX="Trace: https://jaeger.my.cloud/trace/"
$ influx query --trace-debug-id 123 -f query.flux
Trace: https://jaeger.my.cloud/trace/f39a69354a3acca6
Result: _result
Table: keys: [_measurement]
...
```
2021-12-03 17:54:47 +01:00
William Baker
4c0fae3a4c
feat: add ExecuteWithHttpInfo methods for generated API (#336)
* feat: add `ExecuteWithHttpInfo` methods for generated API

* chore: update templates README

* chore: update comment to explain usage of response body

* chore: update template README

* chore: fix formatting
2021-11-29 15:42:29 -06:00
William Baker
a408c02bd4
chore: remove remote validation (#333) 2021-11-19 09:00:52 -07:00
William Baker
f32a55f3bf
feat: add drop-non-retryable-data to replications commands (#330)
* feat: add drop-non-retryable-data to replications commands

* refactor: use drop vs nodrop flags

* chore: use the built-in PtrBool
2021-11-17 14:16:58 -07:00
Daniel Moran
99791bafd3
feat: add flags for remotes, replications, and functions to auth create (#325) 2021-11-10 11:33:01 -05:00
Sam Arnold
714a73d9eb
feat: all-access and operator token from CLI (#285)
* chore: include enum values in openapi generated code

* chore: add enum template to list of template overrides

* chore: update template and generated code

* feat: generate permissions list from openapi spec

* feat: all-access and operator token from CLI

Closes #22510

* fix: cloud fixed the resources endpoint

* fix: all access and operator permissions cannot be composed

* fix: review comments from dan-moran
2021-10-05 14:33:02 -04:00
mcfarlm3
b7627a33c8
feat: added functionality for remote delete command (#283)
* feat: added functionality for remote delete command

* chore: pulled recent openapi changes and ran make fmt
2021-10-04 10:02:36 -07:00
Daniel Moran
d0640ad6c4
fix: regenerate using new openapi to fix health API client (#284) 2021-09-24 14:27:19 -04:00
Daniel Moran
f17f21410c
fix: allow explicit empty request bodies (#281) 2021-09-24 11:35:29 -04:00
Daniel Moran
e609d4462d
fix: update openapi and regenerate to pull in fix for replications API (#280) 2021-09-23 15:04:08 -04:00
Daniel Moran
9076a65d1e
feat: generate clients for replications APIs (#278) 2021-09-23 09:09:36 -04:00
mcfarlm3
dcf9f5bc9a
feat: added functionality for remote create subcommand (#268)
* feat: implement remote create subcommand

* chore: generate mocks for testing remote command

* refactor: separated out test code, made small changes to remote create code

* chore: ran make fmt

* chore: removed excess print statements

* refactor: made changes suggested in code review

* refactor: added name and remote id to printed table
2021-09-14 13:03:17 -07:00
Daniel Moran
13799e7662
refactor: use updated API in restore client (#226) 2021-08-13 13:50:02 -04:00
Daniel Moran
d615694ee9
refactor: replace uses of ioutil with io and os (#223) 2021-08-04 14:45:22 -04:00
Daniel Moran
c3feea5900
feat: update restore to support InfluxDB 2.0.x (#185) 2021-07-09 15:36:44 -04:00
Daniel Moran
4452aac87d
feat: update codegen to include legacy backup/restore routes (#182) 2021-07-08 14:00:42 -04:00
Daniel Moran
3ca681b1dd
feat: implement template command (#169) 2021-07-02 10:19:51 -04:00
Daniel Moran
8126bd8397
chore: fix up openapi codegen after multi-merge (#166) 2021-06-30 15:24:53 -04:00
Daniel Moran
aaf99da0a9
feat: add stacks APIs to codegen (#163) 2021-06-30 14:47:35 -04:00
William Baker
d7b2983dd4
fix: cloud or oss only error msg for parsable responses (#165)
* fix: cloud or oss only error msg for parsable responses

* fix: add code text to error message

* fix: keep the last part of the error msg

* chore: make the error code a little more succinct

* fix: corrected errors for non-server specific commands

* chore: sync openapi submodule with main
2021-06-30 12:37:31 -04:00
Daniel Moran
69dedbcaa9
fix: correct more details in templates/apply API (#159) 2021-06-29 15:08:36 -04:00
Daniel Moran
93d628dd04
fix: correct mismatches between template-apply spec and impl (#157) 2021-06-29 09:38:03 -04:00
Dane Strandboge
a058fe7e0b
feat: port influx auth command (#152) 2021-06-28 14:06:29 -05:00
Daniel Moran
7ea63d6a96
fix: add yaml tags to models so we can unmarshal camelCase (#148) 2021-06-28 10:18:41 -04:00
Dane Strandboge
a1921e1e59
feat: port influx v1 auth command (#138) 2021-06-28 09:03:33 -05:00
Daniel Moran
1183d3780b
feat: add API & override specs for template application (#144) 2021-06-24 11:31:08 -04:00
William Baker
d519890f03
feat: improved error messages for cloud- or oss-only commands (#140)
* feat: set logging info for cloud- or oss-only commands

* fix: add cloud-only to BucketSchemasApi

* fix: api-only flagging and %w for return error wrapping

* fix: keep the model assignment
2021-06-23 10:41:35 -04:00
Dane Strandboge
a3408e031a
chore: refactor password code for StdIO (#139) 2021-06-22 15:34:38 -05:00