Commit Graph

498 Commits (master)

Author SHA1 Message Date
Lyon Hill 7aa98ca84f
feat(task): add limit function for task concurrency (#15266)
* feat(task): add limit function for task concurrency

The new task executor handles limit's differently then the old executor
instead of front loading limits by creating a runner for every task that might run
the new executor has a large worker pool and queue. This allow's us to have a unlimited
concurrency per task and helps us avoid a back log of task's execution based on a
arbitrary execution limit. This add's the ability to add an optional task execution limit
so a user can still have the advantages of limiting concurrency.
2019-09-25 12:02:04 -06:00
elbehery 663d4bb901 test(tasks): skip flaky test 2019-09-25 18:17:59 +02:00
Brandon Farmer d83fabeabc feat(influxdb): user disabling 2019-09-23 11:57:16 -07:00
Lyon Hill 9d6b9555ac
feat(task): add functions to the task executor to allow for coordinator control (#15218)
We needed the coordinator to be able to execute manual runs and resume runs.
These two functions have been added, but we also needed to allow for the executor to be
mocked out. To do that we needed to return a Promise interface instead of an actual
struct. Both these changes are to facilitate coordinator work and testing.
2019-09-20 10:36:44 -06:00
Lorenzo Affetti 053836e5a5
Merge pull request #15203 from influxdata/flux-staging-v0.48.x
build(flux): update to Flux v0.48.0
2019-09-20 18:24:02 +02:00
Lyon Hill 11b9a6fb28
fix(task): Update task executor to match the expected executor interface. (#15205)
I chose to add a execute function that allow's the task executor to match expectation from
the scheduler but I left in the existing executor method that return's promises. This is
because I like to be able to have the accountablilty and visiblity inside what's happening
with each execution even though the promise isn't required for the scheduler. This function signature
will be used by the coordinator and potentially other's that want to ensure a 'execution' is completed.
2019-09-20 08:20:05 -06:00
Lorenzo Affetti 3f50cd2af9 Merge branch 'master' into flux-staging-v0.48.x 2019-09-19 17:20:40 +02:00
Jonathan A. Sternberg cbd04f2884
refactor: http error serialization matches the new error schema (#15196)
The http error schema has been changed to simplify the outward facing
API. The `op` and `error` attributes have been dropped because they
confused people. The `error` attribute will likely be readded in some
form in the future, but only as additional context and will not be
required or even suggested for the UI to use.

Errors are now output differently both when they are serialized to JSON
and when they are output as strings. The `op` is no longer used if it is
present. It will only appear as an optional attribute if at all. The
`message` attribute for an error is always output and it will be the
prefix for any nested error. When this is serialized to JSON, the
message is automatically flattened so a nested error such as:

    influxdb.Error{
        Msg: errors.New("something bad happened"),
        Err: io.EOF,
    }

This would be written to the message as:

    something bad happened: EOF

This matches a developers expectations much more easily as most
programmers assume that wrapping an error will act as a prefix for the
inner error.

This is flattened when written out to HTTP in order to make this logic
immaterial to a frontend developer.

The code is still present and plays an important role in categorizing
the error type. On the other hand, the code will not be output as part
of the message as it commonly plays a redundant and confusing role when
humans read it. The human readable message usually gives more context
and a message like with the code acting as a prefix is generally not
desired. But, the code plays a very important role in helping to
identify categories of errors and so it is very important as part of the
return response.
2019-09-19 10:06:47 -05:00
Lorenzo Affetti ab835c8e0e
refactor(dependencies): use new dependency injection framework (#15174)
refactor(dependencies): use new dependency injection framework
2019-09-19 17:01:17 +02:00
docmerlin (j. Emrys Landivar) baaf93dbbc fix(tasks): fixes duration validation for every and offset, so people will get feedback if they are using durations that tasks doesn't currently support 2019-09-18 09:07:43 -05:00
Stuart Carnie 7240d21e20
fix(task): PR feedback to fix docs 2019-09-17 12:02:04 -07:00
Stuart Carnie 57a710bb9c
fix(task): Improve Executor#Execute error consistency
Implementations of the backend.Executor produce errors limited to
querying the KV store. The remainder of the errors will be processed
in the implementation of a `RunPromise`.

Fixes #15161
2019-09-16 17:10:02 -07:00
Alirie Gray aef199bcc1
fix(tasks): use influxdb errors in scheduler (#15145) 2019-09-16 13:55:39 -07:00
Stuart Carnie a8d1fd0deb
Merge pull request #15123 from influxdata/sgc/scheduler
feat(task): Change interfaces defining scheduler and executor behavior
2019-09-12 15:10:17 -07:00
Alirie Gray 067305c148
feat(tasks): add WithMaxConcurrency to configure scheduler (#15121) 2019-09-12 11:47:27 -07:00
Stuart Carnie 9389b41c6e
feat(task): Change interfaces defining scheduler and executor behavior
See #14183
2019-09-11 17:02:28 -07:00
Lyon Hill 243e946697
fix(task): execution metric now shows correct data (#15112)
The first pass failed to save the correct execution metrics,
it will now compare the difference between start and finish.
2019-09-11 13:22:22 -06:00
Alirie Gray 21e14de7aa
feat(tasks): use env variable for concurrency (#15110) 2019-09-10 16:05:50 -07:00
Alirie Gray 645df57102
feat(tasks): use influxdb errors for executor metrics (#14926) 2019-09-10 12:48:55 -07:00
Lyon Hill cc84a43cea
feat(task): add run duration to task metrics (#15102)
We need to be able to see how long its taking task's to run as well
be able to see the start delta time per task.
2019-09-10 12:30:17 -06:00
docmerlin (j. Emrys Landivar) 03215c0028 chore(tasks): up concurrency to 11, this is a temporary workaround till we get a new scheduler 2019-09-09 17:13:14 -05:00
docmerlin (j. Emrys Landivar) c91ef8e398 fix(alerts and notifications): updates latest completed when status goes from inactive->active 2019-09-06 17:36:16 -05:00
Lyon Hill 2b75d20570
fix(task): Update task in scheduler to show updated logs. (#15008)
The current behavior is that the update is pushed into the scheduler,
and the scheduler cherry pick's what it needs. This leaves the task itself out
meaning any logging the scheduler did was not going to have the new task information in it.
2019-09-06 10:38:56 -06:00
Lyon Hill 5d6bb3fced
fix(task): clean up offset when removed in script (#14961)
When the flux script removes a offset it should be removed from the task
2019-09-06 08:26:50 -06:00
Stuart Carnie 15aaae5dd4
fix(task): Create tags using NewTags to ensure they are sorted 2019-09-04 15:25:44 -07:00
Lyon Hill 5fe3600126
feat(task): Task execution will accurately measure queue delta (#14913)
When a task is told to execute it can be enqueued waiting for a worker.
This statistic will be superior to the existing delta based on scheduled for,
the current system can be effected by a user having slow queries or a long "delay" on the task.
This new way of measuring the same thing should allow us to accuratly measure when it is the task system's fault.
2019-09-03 12:55:33 -06:00
Lyon Hill 5d1c4d814b
fix(task): Remove allowance for duplicate run's in run list (#14875)
If we are caching run's in the kv storage system it is possible to get
the the cached version from the kv store and the recently completed run
from the analytical store. We just need to only show analytical results if
we find a duplicate.
2019-08-29 14:56:55 -06:00
Michael Desa 7c8988f4f7
Merge pull request #14777 from influxdata/fix/misc-check-flux
fix(checks): generate exact flux for threshold checks and notifications
2019-08-27 17:17:16 -04:00
Lyon Hill f8f8a3cf55
fix(task): fix panic when failing to update on startup (#14825)
* fix(task): fix panic when failing to update on startup

Additionally we have no need to claim tasks that are inactive
2019-08-27 13:16:18 -06:00
Michael Desa b26ed76d6a
fix(notification/check): ensure cloud integration works
fix(notification/check): include tags in check object in generated flux

Closes https://github.com/influxdata/influxdb/issues/14769

fix(notification/check): use selected field in threshold functions

Closes https://github.com/influxdata/influxdb/issues/14776

fix(testing): add selected field for check tests

fix(check): use real flux for threshold check

feat(notification/check): generate flux for deadman checks

chore(endpoint): rename webhook endpoint to http endpoint

fix(notification/rule): fetch url for flux script off of endpoint

fix(notification/rule): clean up slack and http rules

fix(notification/rule): change MessageTemp to MessageTemplate

fix(rules): pass endpoint in to rule during create

fix(ui): rename webhook to http

feat(notification/check): namespace deadman under alerts

fix(notification/check): nest tags under tags key in data object in flux

wip

feat(kv): log error if urm cannot be deleted for notification rule

fix(notification/rule): remove name from notify call in slack rule

chore(ui/cypress/e2e): skip rule create test
2019-08-27 15:02:53 -04:00
Lyon Hill ee9e622c6d
feat(task): Add task middleware's for checks and notifications (#14809)
To have checks and notifications happen transactionally we need to be
able to alert the task system when a new task was created using the checks and notifications systems.
These two new middlewares allow us to inform the task system of a update
to a task that was created through the check or notification systems.
2019-08-26 16:54:52 -06:00
Nathaniel Cook dfc28335ea refactor(query/dependencies): update to new Flux dependencies defaults 2019-08-26 16:46:17 -06:00
Jonathan A. Sternberg c7bbfbe293 refactor(notification): rename alerts package to monitor in flux (#14788) 2019-08-26 16:46:17 -06:00
Adam 945b68b8fd fix(query): finish refactoring the repl and inject the secret service as a dependency 2019-08-26 16:46:17 -06:00
Nathaniel Cook 6303e2dcc5 test(query): skip holt_winters_panic test
added executor dependencies where needed
2019-08-26 16:46:17 -06:00
Michael Desa 0e28ee71be
test(task/backend/middleware): skip flaky test TestCoordinatingTaskService_ClaimTaskUpdatesLatestCompleted
Opened https://github.com/influxdata/influxdb/issues/14797
2019-08-26 07:55:40 -04:00
George 0cc9caa1d4
refactor(tasks): separate coordinator and middleware (#14779) 2019-08-23 19:05:13 +00:00
docmerlin (j. Emrys Landivar) 19fe098888 chore(ci): update go-tools 2019-08-22 10:55:05 -05:00
Nathaniel Cook 1b8ab3c2f2 fix(query): remove http.to and update test cases that used it 2019-08-21 09:59:01 -06:00
Lyon Hill 0b247cce5b
feat(task): Remove token's from task structures (#14712)
* feat(task): Remove token's from task structures

We had previously removed token's from the task api but left the token in place in several locations in the stack.
Now we can cleanly remove the extra tokens.
2019-08-20 08:42:40 -06:00
Lyon Hill a8d7870689
feat(task): impersonate user on task execution (#14675)
* feat(task): impersonate user on task execution

Passing tokens to tasks is cumbersome and we needed a way to more easily create tasks. With this change we no longer need a token on task create. We take the user that created the task and pass that in as the "owner". As far as the task is concerned the owner is the source of permissions.

This is done by adding an additional field on task create that is OwnerID. We will no longer respect the token passed in and it will be deprecated soon.

Things to do still:
Task updates need to allow for owners to be set.
2019-08-15 18:31:52 -06:00
Lyon Hill f4fb6a1753
fix(task): Unify task scheduling across create and query (#14668)
Current behavior is that the first execution of a task happens based on the create time
of the task when using a 'every' schedule. If you create a task at 12:02 and want
the task to run every 15m. The first execution would happen at 12:17, and the 2nd would happen
at 12:30.

To fix this behavior I refactored the kv task to give a single source of knowledge.
We now have one function for finding exactly what the last scheduled task was.
We also now have a single method that calculates when the next schedule is due.
By unifying the logic it should always work the same way weather your asking when to run
or when creating a task.
2019-08-15 15:28:35 -06:00
Lyon Hill 9c0ee9e789
fix(task): Make runs sorting and limits work (#14663)
Because we were grouping by taskID and status we are returning limit(n) results for
"success" and limit(n) results for "failed" runs.
2019-08-15 07:27:42 -06:00
Lyon Hill 28043bcab5
fix(task): Fix inconsistancies in run query (#14661)
We currently have some data that has both a status tag and a status field
because of that we need to exclude the status field from the query results
2019-08-14 14:35:30 -06:00
Lyon Hill e671c71e69
fix(task): Remove the tag and field status duplication (#14643) 2019-08-13 14:58:50 -06:00
Alirie Gray 16c400c0d0 feat(tasks): sort runs by most recently scheduled 2019-08-12 12:32:17 -07:00
Alirie Gray ca6625c261 fix(tasks): add run limit check to analytical store 2019-08-12 08:51:05 -07:00
Lyon Hill e922c8a26f
feat(task): add task types (#14567) 2019-08-06 10:27:52 -06:00
Alirie Gray 30abb1b1b0 feat(tasks): add new executor prometheus metrics 2019-07-31 14:29:05 -07:00
Alirie Gray c04f3a2b30 chore(tasks): remove old auth code and allow only token auth 2019-07-26 09:51:32 -07:00
Sebastian Borza 95b834ca2a
push task backend logging messages back to debug 2019-07-25 17:17:19 -05:00
Alirie Gray da4615ea17
test(tasks): add test for ReadTable in analytical store (#14428) 2019-07-23 14:26:21 -07:00
Sebastian Borza 0653043353
move logger facility back to Info from Debug 2019-07-23 07:35:57 -05:00
Chris Goller 986f2eaa75
fix(task/backend): add auth id for marshaling (#14413) 2019-07-22 20:45:03 -05:00
Lyon Hill 3c3e6172a5
fix(task): eliminate unneccesary auth checking when communicating to internal systems (#14411) 2019-07-22 16:44:49 -06:00
Lyon Hill 10bfc91562
fix(task): fix an issue where tasks fail to resume on claim (#14356) 2019-07-16 14:10:28 -06:00
Alirie Gray c7f09d6a56
chore(tasks): use pointers for task errors (#14343) 2019-07-15 13:57:51 -07:00
Lyon Hill bf460ef4d2
fix(tasks): Add a log message for run transition clairity (#14321)
* fix(tasks): Add a log message for run transition clairity

We on occasion will see a run in chronograf with missing run data.
We need to find out if we are submitting incomplete data or if we submit full data and somethinge else is happening
2019-07-12 10:10:11 -06:00
Lyon Hill 1cd3705576
fix(task): force the scheduler to use the correct success when updating metrics (#14313) 2019-07-11 13:44:21 -06:00
George 61e35a8554
fix(tasks) report errors found when iterating over flux query (#14287)
* Report errors found when iterating over flux query in task

* Add failing test for tasks executor result iterator exhaust failure

* Ensure errors exhausting tasks query result iterator are surfaced as task failure

* Update CHANGELOG with task result iteration error surfacing fix
2019-07-11 17:45:45 +01:00
Alirie Gray 0344e98798
Tasks/remove option caching (#14283)
chore(tasks): remove option caching from tests
2019-07-09 10:46:13 -07:00
Alirie Gray 9303f14726 feat(tasks): add last and checkpoint functions 2019-07-08 14:06:15 -07:00
Lyon Hill c8becfd4a2
feat(task): Create a new task executor for the new modular scheduler (#14252)
* feat(task): create new executor for modular scheduler
2019-07-08 08:13:29 -06:00
Lyon Hill 89acf847ea
feat(task): Build interfaces for a generic scheduler. (#14163)
* feat(task): Build interfaces for a generic scheduler.
2019-06-21 10:31:43 -06:00
Lyon Hill 83d9b8e89b
feat(task): Add traceID to new run's (#14150) 2019-06-18 11:29:25 -06:00
Alirie Gray 66157c9d44 chore(tasks): consolidate task errors into task_errors.go 2019-06-17 16:03:18 -07:00
Lyon Hill 435c8bbed5
fix(task): add logging into the task analytical store (#14124)
* fix(task): add logging into the task analytical store

* add in more detail around log structure
2019-06-12 20:01:41 -06:00
Alirie Gray 0ae2d318b1 chore(tasks): update run limits in swagger and FindRuns 2019-06-12 14:48:32 -07:00
Lyon Hill 68e9b30423
fix(task): Apply grease to the analtic system (#14112) 2019-06-11 13:43:33 -06:00
Alirie Gray 04a427e99e feat(tasks): add runID to Log struct 2019-06-06 11:24:38 -07:00
Lyon Hill ab79b68840
fix(task): Remove older unused task store code. (#14068)
* fix(task): Remove older unused task store code.
2019-06-06 10:05:27 -06:00
Lyon Hill 27fd7ece2d
fix(tasks): move debug task logs to debug (#14053) 2019-06-03 14:11:11 -06:00
Jonathan A. Sternberg 21c80f3e93
refactor(query/control): move the controller from flux to influxdb (#13991)
The controller implementation is primarily used by influxdb so it
shouldn't be part of the flux repository. This copies the code from flux
to influxdb so it can be removed from the next flux release.
2019-05-29 09:04:34 -05:00
Lyon Hill 6c11be0304
fix(task): Remove timeout on task run updates (#13965)
Now that the run status updates are transactional actions
We no longer have to add a timer to keep things on track.

This is causing a problem where some runs are showing up without a start or stop time if the system is busy.
I would rather have the scheduler hang on the update then leave a run action without required fields.
2019-05-20 09:47:20 -06:00
Lyon Hill a049faca19
fix a race condition in the mock task scheduler (#13885) 2019-05-10 16:57:20 -06:00
zhulongcheng 91b0741698 fix(task): filter tasks by after param 2019-05-09 20:05:42 +08:00
Lyon Hill 69b26c3df6
fix(task): fix metrics for tasks currently running tasks (#13832) 2019-05-07 13:42:49 -06:00
Lyon Hill e4b69914c9
feat(task): Track queue duration (#13805)
* feat(task): Track queue duration
Track the time it takes for a task to go from it's dueAt time until it actually starts
2019-05-07 10:03:30 -06:00
Chris Goller 510f7bb057 fix(task): lookup fully hydrated task after creation (#13709)
* fix(task): lookup fully hydrated task after creation

* ci(circle): save go race and litmus test results artifact
2019-05-01 14:54:27 -06:00
Jacob Marble 8c269e0153
chore(log): Put trace_id back in logs (#13712)
* chore(log): Put trace_id back in logs

* fix tests
2019-04-30 18:51:22 -07:00
Lyon Hill 166e50f594
Fix inactive task scheduling (#13721) 2019-04-30 16:30:02 -06:00
Alirie Gray cf2c9668fc test(tasks): added coverage for ListTasks with OrgID 2019-04-30 14:20:46 -07:00
Lyon Hill 8fa86488c3
Newly activated tasks should not attempt to 'catch up' (#13700)
* Newly activated tasks should not attempt to 'catch up'
2019-04-29 15:28:34 -06:00
Lyon Hill 7796af7160
task(fix): Tasks should no longer have inaccurate response data (#13641)
* task(fix): Tasks should no longer have inaccurate response data
tasks should be able to pull from a table with both success and failed results

Co-authored-by: AlirieGray <alirie@influxdata.com>
Co-authored-by: docmerlin <emrys@influxdata.com>
2019-04-26 00:40:04 -06:00
Alirie Gray 9f39ddfbef refactor(tasks): move validator to authorizer package 2019-04-24 11:36:54 -07:00
Nathaniel Cook a49d1696dc Merge branch 'master' into flux-staging 2019-04-22 14:25:33 -06:00
Christopher M. Wolff c9f94d4ee8
refactor(query): add parameters to query controller config (#13554)
Recently added to controller config:
  ConcurrencyQuota
  MemoryBytesQuotaPerQuery
  QueueSize
2019-04-22 12:11:32 -07:00
Lyon Hill 5b8c4ea0e8
fix task limit in kv and add tests Also fix a minor race condition in task scheduler (#13538)
* fix task limit in kv and add tests Also fix a minor race condition in task scheduler

* update comment
2019-04-22 13:09:19 -06:00
Delmer 429baf5ca7
test(task/scheduler): skip flakey parallel tests (#13516) 2019-04-19 16:40:28 -04:00
Lyon Hill 726fbefe9a
Integrate the new changes to tasks (#13473)
* Integrat the new changes to tasks
2019-04-19 08:37:59 -06:00
Nathaniel Cook 4c77e3598b Merge branch 'master' into flux-staging 2019-04-18 11:01:22 -06:00
Todd Persen cd64ec8718 Fix typos in miscellaneous packages 2019-04-17 13:30:22 -07:00
Nathaniel Cook 8b918539db Merge branch 'master' into flux-staging 2019-04-17 12:26:10 -06:00
Lyon Hill 9a41cc46e4
Create an analytical storage middleware layer (#13418)
* Create an analytical storage middleware layer
2019-04-17 08:41:05 -06:00
Christopher M. Wolff 6c3f1a05b9 refactor(query): allow code to compile despite BucketsAccessed (#13282)
BucketsAccessed doesn't work currently with a private flux.Spec.
See this issue: https://github.com/influxdata/influxdb/issues/13278

This set of changes just allows code to compile until #13278 is fixed.
Note that preauthorization is not working in the meantime.

Fixes #13275.
2019-04-12 07:15:27 -07:00
Jonathan A. Sternberg b68b5053db refactor: replace usages of the spec compiler with the ast compiler (#13222)
This replaces usages of the spec compiler with the ast compiler and it
removes the error message referencing the spec compiler as an available
input.

It does not remove any of the code using the spec compiler that is
involved for proxying requests and it does not remove it from the API.
2019-04-12 07:15:27 -07:00
Christopher M. Wolff c3d0122a75 fix(task): fix go fmt failure (#13224) 2019-04-12 07:15:27 -07:00
Christopher M. Wolff 16b9158b39 refactor(task): make tasks use new Query interface (#13219)
Fixes #12883.
2019-04-12 07:15:27 -07:00
Jacob Marble f56c42794b
chore(tracing): Cleanup (#13296)
* chore(tracing): Cleanup

* broken test

* fix unused var

* fix test
2019-04-10 19:28:21 -07:00
Lyon Hill c29e77e6e4
build kv based TaskService (#13228)
* chore(tasks): task kv

* WIP

* get the kv task service complete and passing test
2019-04-09 16:52:54 -06:00
Lyon Hill dad731ceb2
Allow coordinator to skip task claiming in startup (#13264)
fixes #13261
2019-04-09 14:35:32 -06:00
kelwang be674622c6
Revert "fix(inmem): remove the old inmem implementation" 2019-04-09 14:24:40 -04:00
zhulongcheng cacd6a8223 fix(inmem): replace inmem.Service with kv.Service 2019-04-08 15:18:38 +08:00
Jorge Landivar fa470ef926
Merge pull request #13165 from influxdata/fix/rpc-options-panic
chore(tasks): more task tests
2019-04-05 14:24:38 -05:00
docmerlin (j. Emrys Landivar) cc408e9e78 chore(tasks): more task tests 2019-04-05 13:27:48 -05:00
Jeff Wendling 5dc3e52fd9 chore: bump gogo/protobuf and regenerate
It had been bumped previously from v1.1.1 to v1.2.0 and nothing was
regenerated. This bumps it to v1.2.1 and regenerates.
2019-04-03 15:42:33 -06:00
Lyon Hill 986a1acdbe
Update task executor to use a TaskService (#13099) 2019-04-02 15:55:31 -06:00
Lyon Hill 83000361c3
Update task coordinator to act as a TaskService middleware (#13068)
* Update task coordinator to act as a TaskService middleware
2019-04-01 16:45:44 -06:00
docmerlin (j. Emrys Landivar) 492d8406aa fix(tasks): make durations visibly show up nicely 2019-03-29 13:50:26 -05:00
Lyon Hill 1d405f90b1
Ensure requested at is only set when a task was manually requested (#13013) 2019-03-29 09:58:38 -06:00
Lyon Hill c78344c441
update task schedler to use the new task control service (#12949) 2019-03-28 16:52:25 -06:00
Mark Rushakoff 7ecb7a23a4 chore: update staticcheck to latest
And fix newly discovered errors.
2019-03-25 10:20:59 -07:00
Lyon Hill 291319483d
Update task servicetest to move dependency to the new TaskControlService (#12817)
* Update task servicetest to move dependency to the new TaskControlService

closes #12724

We will now have the capability to write new task services that dont have to implement the backend.Store or LogReader or LogWriters
2019-03-21 15:11:22 -06:00
Lyon Hill 49d025ba64
add mutex around modifying runner count (#12778) 2019-03-20 10:40:13 -06:00
Lyon Hill 2ae969b31d
fix(task): Fix flakey tests introduced by slower task updates (#12753)
Task updates now attempt to keep the existing runners working.
This causes the system to be slightly slower after a task update and caused a flakey test.
2019-03-20 09:39:44 -06:00
Mark Rushakoff d04b9e516a feat(task): reject unknown task options 2019-03-20 08:11:32 -07:00
Mark Rushakoff 9541fbb859 fix(task): report query statistics correctly
The synchronous executor was missing a call to ResultIterator.Release.
The asynchronous executor wasn't even calling Query.Statistics.

Also add a test that the scheduler records the statistics to the run
log, and that the statistics are visible from the launcher test. The
launcher test is the most likely place to catch if something goes wrong
in the full stack.
2019-03-20 08:11:14 -07:00
Jorge Landivar e86a7d0a79
Merge pull request #12370 from influxdata/feat/task-delete-options
Feat/task delete options
2019-03-19 16:18:39 -05:00
docmerlin (j. Emrys Landivar) ea82893abd feat(tasks): remove removable options 2019-03-19 10:24:42 -05:00
Lyon Hill b796033287
Add a task control service to facilitate a new structure for tasks (#12657)
* Add a task control service to facilitate a new structure for tasks
2019-03-19 08:36:54 -06:00
Mark Rushakoff 0168d3107e fix(task): only claim active tasks at startup 2019-03-18 20:40:02 -07:00
Mark Rushakoff c8e2339d61 fix(task): filter by measurement early in query logreader
The late measurement filter, after a pivot, had the potential to result
in empty groups without a runID, which would cause a runtime error,
which would cause the whole query to fail.

Experimentation has shown that those empty tables will no longer arrive
by filtering early on measurement.
2019-03-15 22:28:13 -07:00
Mark Rushakoff 50b5b25f71 feat(task): include run errors in task log
This should considerably simplify debugging when things go wrong with
the tasks, as this error can be displayed from the UI or CLI. Prior to
this change, you would have to view the console output from influxd.

Fixes #12548.
2019-03-15 08:12:39 -07:00
Mark Rushakoff ce7b53ef37 feat(task): log authorization errors
This should simplify debugging when a user isn't allowed to do something
with a task, that they expect to be able to do.
2019-03-14 14:04:37 -07:00
Lyon Hill fca6a9c412
Ensure when a manual run is called we run it as soon as possible (#12593)
* Ensure when a manual run is called we run it as soon as possible
2019-03-14 10:25:45 -06:00
Lyon Hill 69db8099d4
Fix requested at for task runs (#12559)
* Fix requested at for task runs

* add short delay to allow storage propigation
2019-03-13 15:01:05 -06:00
kelwang 020c4bc093
Merge pull request #12465 from influxdata/preauthorizer_confusing_bucket_name
fix(query): fix same bucket name with different orgs
2019-03-08 21:31:26 -05:00
Kelvin Wang dcc052b1c2 fix(query): fix same bucket name with different orgs 2019-03-08 20:37:05 -05:00
Chris Goller 639fb5d768 fix(task): set query request authorization
Co-authored-by: Mark Rushakoff <mark@influxdata.com>
2019-03-08 17:48:48 -06:00
Lyon Hill a1ed6e3cec
Return empty list of runs and logs when none are found (#12432)
* Return empty list of runs and logs when none are found
2019-03-07 14:55:19 -07:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00
Lyon Hill bea47b1a7e
Respect the incoming flux script (#12390) 2019-03-06 09:30:11 -07:00
Mark Rushakoff ceaed4c31e fix(task): only update authorization when requested
The previous code was mistakenly updating the task's authorization even
when it wasn't part of the update request.
2019-03-06 08:27:05 -08:00
Lyon Hill 17026c2053
change task logs from a string to a struct (#12363)
* change task logs from a string to a struct
2019-03-05 15:58:33 -07:00
Mark Rushakoff 6591191359 test(task): allow log reader/writer test harness to provide authz
This is particularly relevant when the backing systems (like a real
query service) check authorizations.
2019-03-05 09:02:22 -08:00
Jacob Marble b9c7ec439e
feat(influxd): Tracing refactor (#12318)
* feat(launcher): Tracing to log disabled by default

* remove traceLogger and use opentracing directly

* add Jaeger tracing

* go vet && go fmt
2019-03-04 11:48:11 -08:00
Mark Rushakoff 3307276be1 fix(task): don't error when URM task disappears
In the platform adapter, we ask the URM for a list of tasks the user
owns, and then we look up each task individually.

The task service tests uncovered a legitimate bug where FindTasks would
return a "task not found" error, originating from looking up a task that
was present when we interrogated the URM but was deleted before we could
find it in the task store.

This change also removes duplicated URM logic from the HTTP handler
which has since been pushed down into the platform adapter.
2019-03-04 08:35:04 -08:00
docmerlin (j. Emrys Landivar) 46cb3a2fef chore(task): Clean up comments. 2019-03-01 09:42:13 -06:00
docmerlin (j. Emrys Landivar) 80242b3446 fix(tasks): fix task update validation 2019-03-01 09:00:53 -06: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
Jonathan A. Sternberg 78430df2bb
refactor(task/backend): replace a removed interface with the method name (#12203) 2019-02-26 14:20:37 -06:00
Jorge Landivar 8b7aac2bba
Merge pull request #12152 from influxdata/bug/cron-and-every
fix(tasks): allow switching between cron and every options
2019-02-26 12:00:24 -06:00
docmerlin (j. Emrys Landivar) df75f9b9a0 fix(tasks): allow switching between cron and every options 2019-02-26 11:12:56 -06:00
Lyon Hill 049e8f8c90
Add stats to the run log (#12157) 2019-02-26 08:53:36 -07:00
Michael Desa 10dc061dc0
Merge pull request #12143 from influxdata/chore/pw-context
Add context to storage.PointsWriter
2019-02-25 12:31:46 -05:00
Michael Desa 0d3d0d4d78
chore(influxdb): add context to storage.PointsWriter 2019-02-25 11:11:20 -05:00
Lyon Hill 65c711c350
Fix task meta latest created bug (#12114)
* Fix task meta latest created bug

* include list tasks in testing

* Align tasks to run on the hour
2019-02-25 09:04:21 -07:00
Lyon Hill c78477314a
Allow tasks to skip catchup (#12068) 2019-02-22 09:47:04 -07:00
Mark Rushakoff 9ee640766a fix(task): validate permissions on specific tasks
The previous behavior specifically looked for organization-wide task
read/write permissions. Now we allow permissions on specific tasks.
2019-02-21 10:45:28 -08:00
Lyon Hill 3665feef38
Populate organization name on task create action (#12004)
* Populate organization name on task create action

* Move the responsiblity of organization lookup to the platform adaptor
2019-02-20 13:36:35 -07:00
Michael Desa 6a8a1fce32 feat(kv): implemented key/value store with end-to-end integration tests
* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* fix(http): s/platform/influxdb/ for user service

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* feat(kv): implement labels generically on kv

* refactor(passwords): rename from BasicAuth to Passwords

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(http): initial support for flushing all key/values from kv store

* feat(kv): rename macro to variable

* feat(cmd/influxd/launcher): user kv services where appropriate

* refactor(passwords): rename from BasicAuth to Passwords

* feat(kv): implement macro service

* test(ui): introduce cypress

* test(ui): introduce first typescript test

* test(ui/e2e): add ci job

* chore: update gitignore to ignore test outputs

* feat(inmem): in memory influxdb

* test(e2e): adding pinger that checks if influxdb is alive

* hackathon

* hack

* hack

* hack

* hack

* Revert "feat(inmem): in memory influxdb"

This reverts commit 30ddf032003e704643b07ce80df61c3299ea7295.

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* chore: lint ignore node_modules

* hack

* hack

* hack

* add user and flush

* hack

* remove unused vars

* hack

* hack

* ci(circle): prefix e2e artifacts

* change test to testid

* update cypress

* moar testid

* fix npm warnings

* remove absolte path

* chore(ci): remove /home/circleci proto mkdir hack

* wip: crud resources e2e

* fix(inmem): use inmem kv store services

* test(dashboard): add first dashboard crud tests

* hack

* undo hack

* fix: use response from setup for orgID

* chore: wip

* add convenience getByTitle function

* test(e2e): ui can create orgs

* test(e2e): add test for org deletion and update

* test(e2e): introduce task creation test

* test(e2e): create and update of buckets on org view

* chore: move types to declaration file

* chore: use route fixture in dashboard tests

* chore(ci): hack back

* test(ui): update snapshots

* chore: package-lock

* chore: remove macros

* fix: launcher rebase issues

* fix: compile errors

* fix: compile errors

* feat(cmd/influxdb): add explicit testing, asset-path, and store flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* fix(cmd/influxd): set default HTTP handler and flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* build(Makefile): add run-e2e and PHONY

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv): rename macro to variable

* refactor(kv): auth/bucket/org/user unique checks return errors now

* feat(inmem): add way to get all bucket names from store

* feat(inmem): Buckets to return slice of bytes rather than strings

* feat(inmem): add locks around Buckets to avoid races

* feat(cmd/influx): check for unauthorized error in wrapCheckSetup

* chore(e2e): add video and screenshot artifcats to gitignore

* docs(ci): add build instructions for e2e tests

* feat(kv): add id lookup for authorized resources
2019-02-19 17:47:19 -06:00
Mark Rushakoff abd6fee757 fix(task): use HTTP 404 for no results when listing runs, logs 2019-02-19 11:00:43 -08:00
Lyon Hill c7f60271fd
remove task owner from task struct (#11968)
* remove task owner from the payload

* clean user references in store and tests
2019-02-19 11:19:06 -07: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
Lyon Hill 48cc643992
Clean out user from the task store's (#11882)
* Clean out user from the task store's
2019-02-15 15:50:09 -07:00
Mark Rushakoff 12292a4983 fix(task): recover when call to execute fails
This was a missed case from #11817.

This case currently occurs when creating a task through the UI, using a
session rather than a full-fledged authorization. It doesn't fix that
case yet, but at least it will log an informative message.
2019-02-15 08:32:04 -08:00
Brandon Farmer e8290276d3 Allow session authorization for tasks 2019-02-14 14:36:18 -08:00
Mark Rushakoff d562d6bdde feat(task): pass authorizer to query service
Immediately before the executor calls out to the query service, the
executor loads the authorizer associated with the task, and associates
that authorizer with the context used to execute the query.
2019-02-14 08:53:40 -08:00
Mark Rushakoff caf08b5078 feat(task): store authorization ID with task
Accept token when creating or updating a task, but only report back the
authorization ID.

This means the executor and the platform adapter are now both aware of
an Authorization Service.
2019-02-14 08:53:40 -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 4b80fc43c4 test(task): deflake test for CreatedAt, UpdatedAt
The earliest time needed to be captured before creating the task, not
after; otherwise a test running close to a second boundary would fail.

Also make the failure message slightly more readable.
2019-02-12 11:35:55 -08:00
Mark Rushakoff 3a9b3a521a fix(task): clean up run state after a run fails
Previously the DesiredState would not be cleared after an individual run
failed.

Fixes #11816.
2019-02-12 10:53:37 -08:00
Lyon Hill 512af6e4b3
Add createdAt and updatedAt to tasks api (#11794)
fixes #11061
2019-02-12 11:06:23 -07:00
Jonathan A. Sternberg e0e3a17ed9
Merge branch 'master' into flux-staging 2019-02-07 10:26:21 -06:00
Lorenzo Affetti c0ba465604 fix: multiple compatibility issues with flux@master 2019-02-05 17:46:54 +01:00
Mark Rushakoff 211d28567d fix(task): set run status to failed if execution fails
Previously a run that started successfully and then failed, would be
incorrectly marked as a success.
2019-02-04 15:51:11 -08:00
Mark Rushakoff 559cbc776e fix(task): return ErrRunNotFound when finding run by ID
This is necessary to return 404 from the HTTP handler.
2019-01-31 12:04:06 -08:00
Mark Rushakoff a0ff60c075 fix(task): respect limit when finding runs 2019-01-24 15:32:16 -08:00
Lyon Hill bdf65f5dfe
Remove owner from task json responses (#11504)
* Remove owner from task json responses

* allow for crud to run in parallel with other tests

To be parallel we just cant assume we only have 1 task.
2019-01-24 16:05:24 -07:00
Mark Rushakoff 882750c751 fix(task): populate created task response, the same as finding
The response from a created task was missing the name field; now a test
ensures that response matches what is returned when listing tasks.
2019-01-22 11:32:17 -08:00
Mark Rushakoff 6bda17c673 fix(task): use formal errors during task creation
The client expects influxdb.Error, so use them on the server.

Also clarify the message when the task option is missing.
2019-01-22 09:40:51 -08:00
Chris Goller 49782c3be4 feat(bolt): add metrics for resources stored in boltdb 2019-01-18 17:45:45 -06: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
Mark Rushakoff f93ecaa137 refactor(task): look up runs more efficiently
This switches run status from a tag to a field. This is likely a
breaking change to existing task logs.

Using a one-off local query, for 250 records, the previous approach took
around 10 seconds and the new approach is about 30 milliseconds. At 1000
records, the previous approach was roughly 110 seconds and the new
approach is around 70 milliseconds.
2019-01-16 13:25:28 -08:00
Lyon Hill 382de51683
Make task validation errors more clear (#11093)
* fix task validation errors to be more clear
fixes #10987
2019-01-15 13:35:04 -07:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Nathaniel Cook d0603457b7 refactor(flux): make packages mirror Flux namespaces 2019-01-14 18:00:45 -07:00
Nathaniel Cook 622106caaa Merge branch 'master' into flux-staging 2019-01-14 17:03:57 -07:00
Lyon Hill dfbbfc53cd
Merge pull request #11015 from influxdata/feat/task-validation
feat(task): Add validations for all task actions
2019-01-14 08:16:27 -07:00
Lyon Hill bc9755ae75 fix a naming typo 2019-01-12 10:02:57 -07:00
Jorge Landivar f8f1c1e7b6
Merge pull request #10954 from influxdata/feature/update_task_options
feat(tasks): update task options from api
2019-01-11 14:58:10 -06:00
Nathaniel Cook 3a2231be98 Merge branch 'master' into flux-staging 2019-01-11 13:47:49 -07:00
Lyon Hill d1fc5dc58c vet code 2019-01-11 13:34:30 -07:00
Nathaniel Cook 1708a41fa7 refactor: update query functions for Flux builtins 2019-01-11 13:11:57 -07:00
Lyon Hill 6967734cda feat(task): Add validations for all task actions 2019-01-11 13:09:31 -07:00
j. Emrys Landivar (docmerlin) a2674fa03d feat(tasks): update task options from api 2019-01-11 11:55:46 -06:00
Michael Desa 944de4157a fix(influxdb): add org id to permissions
filter out resources that have mission IDs

fix(influxdb): simplify auth check in PermissionAllowed

review(platform): update as noted in review

fix(influxdb): ensure permission has valid org id
2019-01-11 12:23:28 -05:00
jlapacik 5266cba346
deps: updates for packages and imports (#10962) 2019-01-10 14:33:25 -08:00
Jonathan A. Sternberg a59e6b8d25 refactor: rename DoArrow to Do (#2372)
See influxdata/flux#783 for details.
2019-01-10 10:30:25 -07:00
Jonathan A. Sternberg 6ccb8e8c75 refactor: convert usages of ColReader to ArrowColReader 2019-01-10 10:25:10 -07: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
Michael Desa ad75185629 fix(task): update the permission checked in CreateTask
CreateTasks now check that the user has the write permission to the
tasks resource belonging to an organization. This change comes after
https://github.com/influxdata/platform/pull/2157 modified the structure
of authorization.
2019-01-09 10:36:25 -05:00
Andrew Watkins 3429e8d0c6
feat(auth): rewrite authorization service (#2157)
* feat(view-token-overlay): add view token overlay

* test(tokens): update tests

* chore(auths): rename mock data file

* feat(token-view): clicking on description opens token view modal

* feat(token-view): add ability to close overlay

* feat(token-view): display token permissions with updated permissions shape

* feat(token-view): wip update authorization and permission shapes

* feat(auth): wip refactor auth permissions

* fix(auth): generate permissions via functions

* fix(auth): make Id ID

* chore(types): update generated client

* feat(auth): wip add user and org names to auth

* fix(user): didnt save rebase

* feat(auth): WIP refactor auth

* feat(auth): check for user existence during auth creation

* feat(auth): org must exist during auth creation

* fix(auth): pluralize telegrafs resource type

* docs(http): update swagger definition for the Authorization

* test(auth): fix broken tests

* docs(swagger): update cur_swagger Authrorizations

* fix(api): remove trace from cur_swag

* test(ui/token): update components with new generated type definitions

* feat(http): add lookup service adding names for permissions

* fix(http): remove debugging panics

* chore: go tidy

* fix: unsaved rebase

* test(idpe): add ids to Authorizations for log tests
2018-12-28 15:02:19 -08:00
Mark Rushakoff 0e41f240f2 feat(task): support forcing a run with arbitrary timestamp
Also rename RetryAlreadyQueuedError by running:

gorename -from '"github.com/influxdata/platform/task/backend".RetryAlreadyQueuedError' -to RequestStillQueuedError

and some further manual cleanup for comments.
2018-12-21 14:37:53 -05:00
Chris Goller 31518b7022
Merge pull request #1562 from bednar/task_service
Fixed the task id path, Added RunController instance to pAdapter
2018-12-21 08:48:01 -06:00
Nathaniel Cook 61e36cbee6 chore(Makefile): add target to check generated files are accurate
A standard Makefile is used now in all subdirs that run go generate.
Make will only generate the file if its source files changed.
The checkgenerate target runs clean to ensure all targets a generated
fresh.
2018-12-18 12:54:17 -07:00
Lyon Hill f7ae8c3524
feat(api/task): Add validation for both tasks and buckets on task create (#1900)
fixes #1622
2018-12-12 16:07:40 -07:00
Mark Rushakoff 2e81dd31b4 refactor(task): enable high-frequency WithTicker option
Previously, the WithTicker option would call TickScheduler.Tick every
time the underlying time.Ticker sent a time on its channel. This meant
we used a 1s period, which meant that in the worst case, we would see a
tick at about 999ms after the second rollover.

This change increases the underlying time.Ticker frequency, but only
calls TickScheduler.Tick after a second rolls over. Since we now use a
tick frequency of 100ms, during normal operation, TickScheduler.Tick
will be called within 0.1s after the second rolls over.
2018-12-07 08:38:59 -08:00