Commit Graph

483 Commits (6418f693f7a5eea4508da9a94a33fdc26f2764c8)

Author SHA1 Message Date
Lyon Hill 698200b188
fix(task): make calls to update runs force UTC time (#15945)
It is best to standardize the data we store in etcd and influxdb
2019-11-15 19:36:07 -07:00
Alirie Gray f0ecc0e89d
refactor(tasks): use go Time for Task CreatedAt, UpdatedAt, LatestCompleted, Offset (#15672) 2019-11-12 17:13:56 -08:00
docmerlin (j. Emrys Landivar) 56d406afe8 fix(tasks): fix every parsing 2019-11-12 14:46:19 -06:00
Lyon Hill 7421836a1e
fix(task): add error handling for when a `FinishRun` fails (#15845) 2019-11-11 13:52:04 -07:00
Gavin Cabbage 3e29464d4b fix(tasks): fake flux deps 2019-11-08 09:35:20 -05: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
Lyon Hill d4494273e1
fix(task): Use existing scheduler metrics (#15765) 2019-11-05 10:36:45 -07:00
Lyon Hill 3eacf77bea
fix(task): Set a valid start time for run duration (#15750)
When using a run duration we need a start time that is valid to
obtain a accurate run duration delta
2019-11-04 17:27:44 -07:00
Stuart Carnie b1875d2def
feat(kv): Cursor API accepts hints for improving performance
Implementations of the `kv.Bucket#Cursor` API may use
the hints to instruct the access or read behavior to
the underlying key/value store.

The `findAllTasks` function was also fixed to ensure
that paging works as expected when using a name filter.
Tests were added to verify this behavior.

Redundant error checks were also removed.
2019-11-01 14:48:50 -07:00
docmerlin (j. Emrys Landivar) 71a2590fba fix(tasks): scheduler btree panic 2019-11-01 10:49:47 -05:00
George bb40ca35b8
fix(tasks): thread auth on context when calling FinishRun (#15685) 2019-11-01 10:52:35 +00:00
Gavin Cabbage c60f7dbe6f Revert "fix(flux): use flux.EvalOptions over problematic flux.EvalAST"
This reverts commit d1a0ab85f7.
2019-10-31 16:04:41 -04:00
Gavin Cabbage d1a0ab85f7 fix(flux): use flux.EvalOptions over problematic flux.EvalAST 2019-10-31 12:58:41 -04:00
George 0dde41f895
fix(tasks): wire auth context down to scheduler runner (#15675) 2019-10-31 15:47:12 +00:00
Gavin Cabbage 75147d014c
feat(tasks): expose lastRunStatus and lastRunError in task API 2019-10-30 14:00:22 -04:00
docmerlin (j. Emrys Landivar) 6feae8f3ce feat(tasks): fixes for changeover 2019-10-29 10:36:47 -05:00
docmerlin (j. Emrys Landivar) aa5b094c8d refactor(task): feature flag for nw scheduler 2019-10-29 10:36:47 -05:00
Brandon Farmer bad4751709 fix(influxdb): authorizing system buckets 2019-10-21 15:49:10 -07:00
Brandon Farmer ea82dc3470 fix(tasks): tasks look up system bucket id 2019-10-21 14:48:47 -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
George 975289fba1
refactor(tasks): separate run recording behaviour out from analytical storage (#15412) 2019-10-17 10:37:03 +01:00
Alirie Gray f096605327
fix(tasks): replace deactivation of unrecoverable errors with metric (#15430) 2019-10-16 16:00:58 -07:00
Jonathan A. Sternberg b73870d3ed
test(tasks): skip flaky test in the scheduler 2019-10-15 09:18:41 -05:00
docmerlin (j. Emrys Landivar) 0958c26382 feat(tasks): add scheduler release test 2019-10-14 14:02:25 -05:00
docmerlin (j. Emrys Landivar) b8b8422384 feat(tasks): update new scheduler in response to pr comments 2019-10-14 14:02:25 -05:00
docmerlin (j. Emrys Landivar) 4b732acb3b feat(tasks): switch the new scheduler to use clock instead of custom time mocker 2019-10-14 14:02:25 -05:00
j. Emrys Landivar (docmerlin) 3fd94cbb69 feat(task): new scheduler now with more tests 2019-10-14 14:02:25 -05:00
Lyon Hill 84bc9a8293 feat(task): add scheduler metrics (first pass) 2019-10-14 14:02:25 -05:00
j. Emrys Landivar (docmerlin) 4695eccda5 feat(tasks): new tree-based scheduler 2019-10-14 14:02:25 -05:00
Lyon Hill 3c6779f011
feat(task): Allow tasks to run more isolated from other task systems (#15384)
* feat(task): Allow tasks to run more isolated from other task systems

To allow the task internal system to be used for user created tasks as well
as checks, notification and other future additions we needed to take 2 actions:

1 - We need to use type as a first class citizen, meaning that task's have a type
and each system that will be creating tasks will set the task type through the api.
This is a change to the previous assumption that any user could set task types. This change
will allow us to have other service's white label the task service for their own purposes and not
have to worry about colissions between the types.

2 - We needed to allow other systems to add data specific to the problem they are trying to solve.
For this purpose adding a `metadata` field to the internal task system which should allow other systems to
use the task service.

These changes will allow us in the future to allow for the current check's and notifications implementations
to create a task with meta data instead of creating a check object and a task object in the database.
By allowing this new behavior checks, notifications, and user task's can all follow the same pattern:

Field an api request in a system specific http endpoint, use a small translation to the `TaskService` function call,
translate the results to what the api expects for this system, and return results.

* fix(task): undo additional check for ownerID because check is not ready
2019-10-11 08:53:38 -06:00
Alirie Gray 364e80bc94
fix(tasks): use go errors for scheduler metrics (#15374) 2019-10-10 09:55:30 -07:00
Alirie Gray be28de8fbc
feat(tasks): deactivate task on unrecoverable error (#15369) 2019-10-09 13:51:03 -07:00
Lyon Hill f5e9b5e04f
feat(task): add type to some specific metrics in new execution. (#15340) 2019-10-08 15:58:41 -06:00
Alirie Gray a9df93b1fd
refactor(tasks): create coordinator for new scheduler/executor (#15268) 2019-09-26 13:55:23 -07:00
Mustafa 4fcf4c4ad1
Merge pull request #15248 from influxdata/elbehery-fix#4300
fix(storage): remove level=0 from TSM disk bytes metrics.
2019-09-26 18:21:38 +02:00
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