Commit Graph

92 Commits (4e3025efe02473423f20fc5571ae065f1296bfff)

Author SHA1 Message Date
Kelvin Wang 43fa754087 fix(kv): fix extra \x00 secret decoding 2019-08-15 21:56:20 -04:00
Kelvin Wang 61628671ed feat(kv): add notification endpoint
Co-authored-by: Jade McGough <jade@thezets.com>
2019-08-15 21:56:18 -04: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
Kelvin Wang f3dcdee504 fix(notification/rule): remove authID requirement 2019-08-15 19:31:45 -04: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
Deniz Kusefoglu e1508ac2e1
feat(checks): add first pass at creating tasks from checks
First pass at flux AST generation from check

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): format call expression

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): cleanup CheckDefinition

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): clean up threshold functions

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): clean up message function

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): misc fixes

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): remove dead code

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): move threshold flux generation to check pkg

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): move base ast generation to its own package

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

fix(notification/check): add comment for GenerateFluxAST

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

docs(notification/flux): add comments to each exported function

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

feat(notification/check): add tests for GenerateFlux

Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>

feat(notification/check): add task options to generated flux

fix(notification/check): use flux compatible duration type

test(notification/check): add task option to task definition

test(http): use check Duration in checks http handlers

feat(check): add TaskID to checks base

fix(notification/check): hack around issue with formatting ast package
wtih multiple files

test(check): create task when check is created

A lot of little changes had to happen as a result of this. This change
was rather painful.

feat(checks): add update and delete of task for check

fix(notifications/check): hack around the alerts package not being
available

test(kv): temporarily skip check tests while we merge the pr above
2019-08-15 15:07:09 -04:00
Lyon Hill e922c8a26f
feat(task): add task types (#14567) 2019-08-06 10:27:52 -06:00
zhulongcheng 17de20e80f fix(task): check ErrTaskNotFound err (#14489) 2019-08-06 10:17:30 -06:00
Jade McGough 0e5091ed21 feat(kv): add check kv 2019-07-31 18:52:13 -04:00
kelwang ab241b1332
Merge pull request #11741 from influxdata/task-members
fix: task members endpoints
2019-07-29 11:30:06 -04:00
Jade McGough 254680f094 fix(kv): add task organization ID lookup 2019-07-28 22:07:03 -07:00
zhulongcheng ce4d5a9852 feat(http): patch notification rule 2019-07-28 22:08:23 +08:00
Alirie Gray c04f3a2b30 chore(tasks): remove old auth code and allow only token auth 2019-07-26 09:51:32 -07:00
Kelvin Wang aaa84617d8 feat(kv): add notification rule kv 2019-07-25 15:15:35 -04:00
Alirie Gray a73d9a2b77
refactor(tasks): remove Checker from KV Service struct (#14367) 2019-07-17 15:21:16 -07:00
Alirie Gray 2202b61032
feat(tasks): add health check to kv service (#14364) 2019-07-17 11:24:50 -07:00
Alirie Gray c7f09d6a56
chore(tasks): use pointers for task errors (#14343) 2019-07-15 13:57:51 -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
lisale0 2187bf345b fixed bolt and inmem tests 2019-06-20 16:25:38 -07:00
Jade McGough 2cd14c7cdb fix failures in variable http testing 2019-06-20 16:25:38 -07:00
lisale0 3330d38984 feat(http): adding createdAt variable 2019-06-20 16:25:38 -07:00
Alirie Gray 66157c9d44 chore(tasks): consolidate task errors into task_errors.go 2019-06-17 16:03:18 -07:00
Lyon Hill 411d904b64
fix(task): bug when urm's are left in the database for task lookup (#14141)
* fix(task): allow us to skip tasks with crufty maps
2019-06-14 16:21:38 -06:00
Alirie Gray 0ae2d318b1 chore(tasks): update run limits in swagger and FindRuns 2019-06-12 14:48:32 -07:00
Lyon Hill b7078f5510
fix(task): Ensure tasks clean up user resource maps (#14109)
* fix(task): Ensure tasks clean up user resource maps
fixes #14108
2019-06-11 10:28:09 -06:00
Alirie Gray 04a427e99e feat(tasks): add runID to Log struct 2019-06-06 11:24:38 -07:00
Kelvin Wang 18a0f3f542 fix(influxdb): rename telegraf orgID 2019-06-03 16:20:53 -04:00
Kelvin Wang b8c2cd6c05 feat(influxdb): add org create and update time 2019-05-20 17:36:29 -07:00
kelwang b4a55d500a
Merge pull request #13889 from zhulongcheng/id-decode-err
fix(influxdb): use influxdb.Error in ID.Decode
2019-05-19 13:55:21 -04:00
Kelvin Wang b18fa5b5b5 fix(kv): updatedAt should be updated as well 2019-05-18 23:36:48 -04:00
kelwang 7683fbc662
Merge pull request #13954 from influxdata/bucket_audit_log
feat(influxdb): bucket created and updated time
2019-05-17 14:20:19 -04:00
kelwang 497a813044
Merge pull request #13629 from zhulongcheng/upd-org-desc
feat(http): update org description
2019-05-17 12:36:45 -04:00
Kelvin Wang 57ceb9e275 feat(influxdb): bucket created and updated time 2019-05-17 11:49:10 -04:00
Kelvin Wang 4408d0c82d fix(kv): due to merged conflict 2019-05-16 11:30:36 -04:00
kelwang 4bbfa8c6f4
Merge pull request #13552 from influxdata/kv_log_time
feat(http): add audit log
2019-05-16 11:10:56 -04:00
Kelvin Wang f75f27c0bd feat(http): add audit log 2019-05-16 10:57:28 -04:00
zhulongcheng 8d5c7d33a7 feat(http): update org description 2019-05-16 22:33:14 +08:00
Iris Scholten 2e26f23f9e
feat(authentication): Add cli args for specifying session length and renewal (#13924)
Co-authored-by: Jade McGough <jade@influxdata.com>

* Add session renew option to launcher and use in middlewhere
* pass session options to services
* Update SessionAutoRenew to SessionRenewDisabled
* Add test for service constructor defaults
* Update changelog
2019-05-15 10:16:47 -07:00
zhulongcheng 3c1e9ee5f3 fix(influxdb): use influxdb.Error in ID.Decode 2019-05-15 22:53:31 +08:00
Jade McGough c6a0bf93a7
Merge pull request #13661 from influxdata/no_filter_parameters_provided
fix(influxdb): invalid filter error
2019-05-09 15:14:54 -07:00
Alirie Gray 77934b01c6 feat(tasks): add description field to tasks 2019-05-08 13:39:09 -07: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
Kelvin Wang ea54e2c2c8 fix(kv): fix empty org name 2019-04-26 18:16:28 -04:00
Kelvin Wang 2021321186 fix(influxdb): invalid filter error 2019-04-26 12:22:42 -04:00
Kelvin Wang 717fcc44b3 feat(influxdb): add scraper filter 2019-04-25 11:33:34 -04:00
Kelvin Wang 76cc27751b feat(influxdb): add bucket desc 2019-04-24 11:20:05 -04:00
Kelvin Wang 7a72c363f2 remove org from bucket 2019-04-22 18:39:05 -04:00
Kelvin Wang 9d44ac3635 rename bucket organization to org 2019-04-22 18:39:01 -04: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