Commit Graph

225 Commits

Author SHA1 Message Date
88ba3464cd feat: add max age to replications create and update (#367) 2022-03-18 17:21:12 -05:00
c8c7c1c680 fix: json suffix for json template from CLI (#370) 2022-03-14 09:15:21 -04:00
37ec38ac5a fix: rename bucket id parameters to be explicit (#369) 2022-03-11 15:12:34 -05:00
85a33adf71 chore: update to API spec for new template endpoint response (#362) 2022-02-17 14:46:05 -06:00
041ebf65e3 chore: improve logging for creating a new remote (#360)
* chore: improve logging for creating a new remote

* chore: improve error logging for creating remote
2022-02-04 15:06:35 -05:00
9ddf110ad6 fix: template apply uses better diff checking (#358)
* fix: template apply uses better diff checking

Previously, we did a DeepEqual of all the returned data about each changed entity,
but due to our template overrides that is not actually all the information
available for each entity. So we marked trivial things as 'conflicts' (e.g.
telegraf config ID's 'changing' from the empty string to the real, current value)
while not catching important conflicts like flux script changes in checks and tasks.

Changes to make things more straightforward:

 * Change the --force behaviour to be more similar to `apt install`, where even
in non-interactive mode `--force yes` is required to bypass the prompt to apply.

  * Before, there were two stages of diff checking - once to print diffs, and once
after the 'Yes/No' prompt. If any conflicts were detected in the second check,
the user got an inscrutable error message that did not highlight what the difference
was or how to force it to apply. `--force conflict` was required to avoid this error.
Instead, we now have simplified to `--force yes` to bypass the 'Yes/No' prompt, and
we never do a second stage of diff checking.

 * Because we do not currently properly account for more complicated diffs (e.g.
flux tasks), we now assume in the diff printing that every object has changes,
except for Labels, Buckets, Variables, and Label Mappings. This could be improved
in the future.

* fix: when statestatus is 'remove', mark as removed
2022-02-04 10:59:02 -05:00
981be7872d chore: upgrade to latest OpenAPI (#357) 2022-02-01 14:53:34 -06:00
5cd1c9d037 build: automatically generate changelog (#349) 2022-01-10 08:05:38 -08:00
cb3bade38b update: instructions to update openapi (#350)
* Add openapi submodule instructions to README.md

Add instructions for updating the influx-cli/openapi git submodule when regenerating the CLI.

* update: instructions to update openapi

Add instructions to update and regenerate influx-cli/openapi when changing commits.
2021-12-28 14:51:46 -06:00
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
13d0827815 fix: duration parser shows duration missing units on error (#348) 2021-12-23 15:06:29 -05:00
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
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
327f239c6f feat: enable remotes and replication streams feature (#341) 2021-12-13 16:33:28 -06:00
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
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
a408c02bd4 chore: remove remote validation (#333) 2021-11-19 09:00:52 -07:00
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
6a7c4f6d44 fix: v1 auth create supports multiple buckets (#328) 2021-11-11 11:43:14 -05:00
adc58b8441 chore: refactor influxid.ID, cleanup organization checking (#326) 2021-11-10 15:12:59 -06:00
99791bafd3 feat: add flags for remotes, replications, and functions to auth create (#325) 2021-11-10 11:33:01 -05:00
1eadcf12e1 chore: update CHANGELOG (#323) 2021-11-10 09:35:35 -05:00
566dcafae9 chore: update CHANGELOG (#319) 2021-11-09 10:30:02 -05:00
9c9785e359 fix: wrong position of orgID and userID in org members remove (#318) 2021-11-09 10:22:46 -05:00
d861490100 fix: return "unknown command" instead of "no help topic" error when unknown (sub)command is passed (#316)
Co-authored-by: Sam Lai <samuel.lai@gmail.com>
2021-11-02 14:17:42 -04:00
a3af8ca833 revert: "feat: return error if API token required but not found (#310)" (#315)
This reverts commit 81de7e63dd2649cd043c7a66c6698a9f5609552c.
2021-11-01 12:57:30 -04:00
81de7e63dd feat: return error if API token required but not found (#310) 2021-10-22 10:06:12 -04:00
c3690d8584 chore: pin release date in CHANGELOG (#311) 2021-10-21 11:20:21 -04:00
3e76528ed2 build: upgrade protobuf library (#308) 2021-10-18 13:22:54 -05:00
6fda4cceed feat: handle pagination in bucket list (#307) 2021-10-15 15:14:59 -07:00
d92bede8d3 fix: embed tzdata into Windows builds (#305)
Migrate cross-test jobs to use cross-builder so Windows tests run on a system without Go, as a regression test
2021-10-14 08:49:26 -07:00
964bc4fe03 fix: set newly-created config as active in setup (#302) 2021-10-14 07:00:16 -07:00
af631b4da8 build: bump to go1.17.2 (#300) 2021-10-12 09:27:23 -07:00
c49001b412 feat: added functionality for replication update command (#299)
* feat: added functionality for replication update command

* refactor: changed replication update usage text for clarity

* fix: added closing bracket back in

* chore: ran make fmt
2021-10-08 14:08:44 -07:00
eb3ee7631f feat: added functionality for replication delete command (#298)
* feat: added functionality for replication delete command

* refactor: changed naming of remote-id flag to be consistent with other influx commands

* refactor: reduced lines of code and improved error message based on code review
2021-10-07 14:43:03 -07:00
cafae42d3c build: update deb/rpm metadata to ref influxdb2 v2.1.0 (#292) 2021-10-07 09:04:22 -04:00
c4a5a13c8e fix: restore when changing tokens works (#297)
* fix: restore when changing tokens works

* fix: remove cruft

* chore: changelog update

* chore: CHANGELOG word-smithing

Co-authored-by: Dan Moran <dmoran@influxdata.com>
2021-10-07 08:23:39 -04:00
64b1b03f8f feat: added functionality for replication list command (#296)
* feat: added functionality for replication list command

* chore: ran make fmt

* refactor: fixed comment for clarity

* refactor: chained statements together to simplify code
2021-10-06 17:42:16 -07:00
4e8671dcc5 feat: added functionality for replication create command (#289)
* feat: added functionality for replication create command

* refactor: changed replication create flag usage text and eliminated extra conditionals

* refactor: made changes to usage text and output table based on code review

* chore: fixed link to max queue size default value
2021-10-06 10:48:57 -07:00
857e2b356c chore: expose tabwriter so InfluxDB can use it (#295) 2021-10-06 11:27:25 -04:00
25b8bddd56 chore: update CHANGELOG (#291) 2021-10-05 16:11:01 -04:00
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
ade82cc4fe fix: removed unused fmt import in remote cmd code (#287) 2021-10-04 11:04:19 -07:00
3c3d70cc60 feat: added functionality for remote update command (#282)
* feat: added functionality for remote update command

* refactor: removed extra get request for TLS flag and minor changes to help text

* chore: pulled newest changes to openapi and ran make fmt

* refactor: shortened conditional statement to one line
2021-10-04 10:28:07 -07:00
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
d0640ad6c4 fix: regenerate using new openapi to fix health API client (#284) 2021-09-24 14:27:19 -04:00
f17f21410c fix: allow explicit empty request bodies (#281) 2021-09-24 11:35:29 -04:00
e609d4462d fix: update openapi and regenerate to pull in fix for replications API (#280) 2021-09-23 15:04:08 -04:00
9076a65d1e feat: generate clients for replications APIs (#278) 2021-09-23 09:09:36 -04:00
65cca47ded feat: added functionality for remote list subcommand (#273)
* feat: add remote list subcommand functionality

* refactor: removed repeated code and improved help text
2021-09-22 09:18:06 -07:00