Commit Graph

44 Commits (e970aae77824c7be6358f0e5544b2a71e88559e4)

Author SHA1 Message Date
Stuart Carnie 42aabb28fc chore: Do not use global viper APIs, which breaks testing 2020-11-13 08:47:52 +11:00
George 3d643e0681
refactor(notification): move rule service into own package (#19804)
* refactor(notification): move rule service into own package

* chore(launcher): fix tests to use clients as opposed to direct kv service

* chore(influx): update task cli to consume core domain model task from client

* chore(kv): remove rule service behaviours from kv

This also introduces the org id resolver type. Which is transplanted
from the kv service. As this one function coupled all resource
capabilities onto the kv service. Making removing these capabilities
impossible. Moving this type out into its own package which depends on
each service explicitly ensures we don't have one type which has to
implement all the service contracts.

* fix(launcher): remove double reference to influxdb package
2020-10-27 11:45:05 +00:00
Johnny Steenbergen db97f1c1f6
fix(influx): update default value of list tasks influx command to 100 (#19732) 2020-10-12 17:05:56 -06:00
Johnny Steenbergen 52cd625687 fix(influx): drop global flags and replace with locals
many spots in the CLI that global flags show up cause confusion or just
add overhead with no value. This cleans that up. Other commands may
have token removed if it does not pertain.

commands that do not have global flags:
  * influx
  * influx completion
  * influx config (all sub commands as well)
  * influx template
  * influx template validate
  * influx transpile
  * influx version
  * all root commands that have no actions, aka influx organization
2020-06-24 15:33:06 -07:00
Johnny Steenbergen 5bef654062 fix(influx): remove references to local
all CLI interactions are now to go through the front door (API).

closes: #18616
2020-06-18 17:29:16 -07:00
Johnny Steenbergen d1af15c399 chore: remove extranenous fields on http.Task type
also drops a skipped test that has been skipped for over a year. Tried
unskipping it, but now it fails for all sorts of reasons, without the
race flag enabled.
2020-04-20 15:34:58 -07:00
Pavel Závora 9cca99d0a4
Merge branch 'master' into 17356/influx-cli-file 2020-04-06 21:04:44 +02:00
Pavel Zavora 37b3673733 chore(cmd/influx): apply proofreading comments #17356 2020-04-04 13:00:41 +02:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Pavel Zavora 4f1953cea5 feat(cmd/influx/task): add --file option #17356 2020-04-03 08:00:56 +02:00
Johnny Steenbergen 77900b39cc fix: add missing flag register to task run list cmd for json out and hide header flags 2020-03-27 13:47:31 -07:00
Johnny Steenbergen 3cb44a0301 feat(influx): add jsonout and hide headers support to task cmd 2020-03-27 12:33:24 -07:00
Johnny Steenbergen 36d99bfbf8 chore(influx): make runE middleware application explicit from caller 2020-03-25 12:41:11 -07:00
Kelvin Wang c511f06fa5 feat(cmd/influx): add profile management 2020-03-12 11:09:54 -04:00
Jade McGough fec0a021fd
fix(cmd): use list instead of find in cli (#16805) 2020-03-04 15:39:04 -08:00
Alirie Gray 3120b4c47e
refactor(tasks): add Client to http TaskService (#16912) 2020-02-24 11:41:21 -08:00
Johnny Steenbergen 80751314bc chore(influx): refactor influx cmd to use builder
refators test to use full call paths where possible
2020-02-20 11:27:44 -08:00
Johnny Steenbergen 89939dea4e fix(influx): add env vars to cli usage and normalize usage and flag/env var priority
also rids us of the cobra tutorial code and encapsulates things into funcs
2020-01-10 15:20:15 -08:00
Kelvin Wang f8c0ea032c fix(cmd/influx): show see help, instead of usage 2019-12-31 14:52:55 -05:00
Johnny Steenbergen f1b5e19776 feat(influx): add hide headers flag to influx cli task cmd 2019-12-27 14:41:55 -08:00
Deary Hudson III d5f8a5fc9f
feat(cmd): apply env vars consistently across cmd (#16225) 2019-12-17 13:55:35 -06:00
Deary Hudson III 336961c757
feat(cmd): bucket create to accept org name as flag (#16187)
* enables the user to specify an organization name when creating a bucket.
2019-12-10 17:46:36 -06:00
Johnny Steenbergen ab50e18695 feat: add support for insecure skip verify on cli http clients 2019-11-14 16:48:13 -08:00
Lyon Hill bb6aa1df3b
feat(task): Add a latestScheduled field for tasks (#15785)
Previously we overwrote the tasks existing latestCompleted to be used for latestCompleted as well as latestScheduled.
For obvious reasons this is confusing and missleading. I believe by seperating the two fields we can have a clear seperation
of concerns.
2019-11-06 15:10:52 -07:00
Alirie Gray 552168d3ae
refactor(tasks): use Go time objects for timestamps on task Runs (#15406) 2019-10-17 17:23:45 -07:00
Alirie Gray 04a427e99e feat(tasks): add runID to Log struct 2019-06-06 11:24:38 -07:00
Lyon Hill b3f450eca9
Allow the CLI to find tasks by org name (#12202)
* Allow the CLI to find tasks by org name
2019-02-27 08:56:32 -07:00
zhulongcheng 126d3edef7 feat(cmd/influx): show AuthorizationID of task 2019-02-22 00:07:45 +08:00
Mark Rushakoff cbef811c63 refactor(task): remove explicit org from run/log lookup
Task ID is now a required value on run and log filters. It was
effectively required by all implementations before anyway, so now those
types reflect that requirement.

Organization ID was removed from those same fields. The TaskService
looks up the organization ID via the task in cases where we need it at a
lower layer.
2019-02-16 14:34:49 -08:00
Mark Rushakoff 954cea93bc fix(cmd/influx): don't set authorizer context when creating task
Setting the authorizer from the HTTP client wasn't necessary, and
looking up the token to do so didn't work as written.

Fixes #11903.
2019-02-14 17:27:31 -08:00
Mark Rushakoff 007f5059c7 refactor(task): extract TaskCreate struct
With the ongoing authorization work, creation arguments will differ from
what's returned on reads. More specifically, creation will accept a
token, but reads will report back a token ID.

This refactor facilitates that authorization work, and also brings the
code closer to the swagger definition, for the TaskCreateRequest type in
particular.
2019-02-12 15:10:03 -08:00
Mark Rushakoff 84f8f8d88c chore(task): move 'task retry' command to 'task run retry'
Runs are retried; tasks aren't.

Closes #11170.
2019-01-23 16:34:10 -08:00
Michael Desa 81875c78b2 feat(cmd/influx): check if instance has been setup if error encountered 2019-01-22 10:19:26 -08:00
Lyon Hill 523e52d662
Show organization names in task api actions (#11223)
* Show organization names on task actions.

closes #10876
2019-01-18 09:10:14 -07:00
Leonardo Di Donato 9ef3ce8f9b chore(cmd/influx): command descriptions and parameters start with uppercase now
Fixes #10995

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 16:33:56 +01:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
j. Emrys Landivar (docmerlin) 7ffd18c7b8 remove requestedAt param from retry call and refactor TaskService interface 2018-11-30 13:14:21 -06:00
zhulongcheng d8c80fa50c add limit param to task service 2018-11-30 10:02:41 +08:00
docmerlin (j. Emrys Landivar) 57fe285e56 add run return to rerun 2018-11-27 11:48:32 -06:00
Mark Rushakoff b0b0d965ff feat(task): integrate task logs with system buckets
- Brought over enterprise's QueryLogReader, with small adjustments
  - Time filters are for the run's ScheduledFor field, per spec
- Adjusted run log timestamps for consistent formatting:
  - ScheduledFor is RFC3339 because it's a whole-second timestamp
  - StartedAt, FinishedAt use RFC3339Nano for high precision
- Several test adjustments to use relative time, for easier integration
  with storage retention
2018-11-15 08:59:15 -08:00
Michael Desa 459f2cbfbb feat(cmd/influx): add local flag for operating directly with boltdb
feat(internal/fs): move influxDir function to internal package in base of repo

feat(cmd/influx): add local flag that operates on local file system

feat(cmd/influx): add local support for org command

feat(cmd/influx): add local support for user command

eat(cmd/influx): add local support for bucket command

feat(cmd/influx): add error for local with query/task/setup cmds

fix(cmd/influx): unshadow error in delete bucket command

fix(cmd/influx): update copy for local flag commands
2018-11-02 14:34:48 -04:00
Mark Rushakoff cd80e41220 feat(task): add ability to retry runs
This also adjusts the TaskService interface's RetryRun method to accept
a task ID rather than an org ID. Internally, we still look up runs by
organization, and maybe that will change later, but this is a more
natural way for clients to look it up.
2018-10-30 09:20:40 -07:00
Lyon Hill 0894d5a3e3
fix task create (#1192)
fixes #1190
2018-10-25 13:57:17 -06:00
Lyon Hill 19b7709bad
Add tasks to the influx cli (#1163) 2018-10-23 11:51:13 -06:00