Commit Graph

327 Commits (719f296d2d78d7d5559471a42fc4820076e660c5)

Author SHA1 Message Date
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