Commit Graph

1346 Commits (3139b0424a604c866162be0ac3f44e4e48a3142c)

Author SHA1 Message Date
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
Michael Desa add4bcb873
fix(http): remove non-txn task Create/Update/Delete for nofitication rules 2019-08-26 07:55:43 -04:00
Michael Desa df628f21de
fix(http): remove non-txn task Create/Update/Delete for checks 2019-08-26 07:55:43 -04:00
Jakub Bednář 2e746d8179
docs(http): update suggestions swagger definition to reflect reality (#14725) 2019-08-26 08:12:39 +02:00
Jakub Bednář 094d8e3174
docs(http): update swagger for easily use in clients (#14724)
* added missing Permission types: notificationRules, notificationEndpoints, checks
* Authorization links use Link as a type
* Run's logs are readonly
* TaskCreateRequest and TaskUpdateRequest has description property to update Task description
2019-08-26 08:11:52 +02:00
Deniz Kusefoglu 0bee8ac0eb
Feat/monitoring labels (#14751)
* add labels to alerting swagger

* Add labels to checks

* Add labels to rules

* Add labels to endpoints

* Fix endpoint swagger bugs

* Update endpoint swagger to reflect reality

* Add endpoint delete and update to cards

* add equality

* Add rule patch

* Update endpoint should put

* Update http/swagger.yml

Co-Authored-By: Christopher Henn <chris@chrishenn.net>

* Apply suggestions from code review

Co-Authored-By: Christopher Henn <chris@chrishenn.net>

* fix updateEndpoint
2019-08-22 16:22:01 -07:00
Kelvin Wang 4a7679b693 feat(http): checks query endpoint 2019-08-22 14:40:42 -04:00
docmerlin (j. Emrys Landivar) 19fe098888 chore(ci): update go-tools 2019-08-22 10:55:05 -05:00
Michael Desa c433f50cec
chore(alerts_notifications): add misc changes to alerts ui for demo
Create view with checkID in NewVEO

fix ruleToDraftRule bug

Fix no thresholds error

Get correct view status for rendering cell

Fix editVEO flow

Add notification endpoint ID to initRule

Remove task type from check and notification rule

mock generate AST

use check query in EditCheckEO

wip

Create default http notification endpoint

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

Dont save view if no dashboardID in saveCheck

Execute queries in editCheckEO

Fix check remove bug

Disable Advanced view and multiple queries in check builder

Disable alerting button if draftQuery is not alertable

chore(kv/check): remove createCheckTask from KV as the result of #14728
2019-08-21 17:28:49 -04:00
kelwang 99cebbbdc1
Merge pull request #14714 from influxdata/create_task_in_stack
chore(http): split taskservice from check and notification
2019-08-20 11:20:15 -04: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
Kelvin Wang 03f6214d0e chore(http): split taskservice from check and notification 2019-08-19 18:56:17 -04:00
Andrew Watkins 286d57b0ba
feat(notifications): create notification endpoint overlay (#14693)
* chore: update swagger definitions

* feat(endpoints): introducer endpoint overlay

* wip: change endpoint type

* feat(endpoint): add inputs for supported endpoint types

* wip: connect create endpoint to API

* feat: implement create endpoint

* alerts(e2e): add createEndpoint command

* chore: update swagger
2019-08-19 10:57:20 -07:00
Michael Desa ed853290a3
Merge pull request #14695 from influxdata/feat/notification-flux
feat(notifiction_rule): create notification rule task
2019-08-19 07:51:18 -04:00
Michael Desa 8e56c36737
feat(notification_rule): create notification rule task
feat(notification_rule): generate base flux for notification rule

wip: saving state

fix(notification/endpoint): add comment about weird requirements

feat(notification_rule): create notification rule task
2019-08-16 15:43:15 -04:00
Alirie Gray 28089fdb59 feat(tasks): add ability to find tasks by name 2019-08-16 12:07:11 -07:00
Michael Desa a2a9eb5e49
feat(check): pass ownerID to task on create 2019-08-16 07:12:28 -04:00
Kelvin Wang bbb4fbc50d fix(notification/check): remove authorizationID 2019-08-16 00:00:55 -04:00
Kelvin Wang c5100f3eae feat(http): add notification endpoint 2019-08-15 21:56:21 -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
kelwang d01b91667d
Merge pull request #14679 from influxdata/notification_auth_id
fix(notification/rule): remove authID requirement
2019-08-15 19:54:18 -04:00
Kelvin Wang f3dcdee504 fix(notification/rule): remove authID requirement 2019-08-15 19:31:45 -04:00
Christopher Henn 33a5d8ff5d feat(ui): integrate notification rule overlays with API 2019-08-15 16:24:52 -07:00
Kelvin Wang f688697ca6 fix(notification/check): convert threshold type 2019-08-15 16:53:46 -04: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
Michael Desa c355e62a27
Revert "feat(notification/check): convert threshold type" 2019-08-15 13:53:44 -04:00
Kelvin Wang d8a88e1865 feat(notification/check): convert threshold type 2019-08-15 12:11:22 -04:00
Russ Savage 8a5d0e6230
feat(templates): adding new templates, removing calls to create templates (#14631)
* adding new templates; removing calls to create templates

* fixing quickstart dashboard creation

* Type dashboard template

* bump templates repo version

* add templateID to template meta in swagger

* Add templateID to document meta type in UI

* add templateID to telegrafPlugin and telegrafplugin info types

* Instantiate templates from static templates

* Get tests to pass

* Fix type conflicts

* Bump templates version

* update changelog
2019-08-14 11:01:19 -07:00
Deniz Kusefoglu 17c40a75de
Visualize check view with check plot (#14599)
* Use CheckPlot to visualize check view

* Revert to add threshold types

* Disable view type dropdown in checkView

* Add proper equality

* Add errors in default cases
2019-08-08 12:25:58 -07:00
Jonathan A. Sternberg cb9d8eafe7
fix(http): use the content type header to determine how to parse http errors (#14596)
This will only attempt to parse an error as JSON if it has the content
type `application/json` so that it stops trying to parse the result as
JSON when it isn't JSON.

While the real error message is included, the addition of the "could not
parse json" makes it very confusing to read and distracts from the real
issue.
2019-08-08 14:23:43 -05:00
Andrew Watkins 7d9ec64eec
build(client): generate client on each build (#14591)
* chore: add new types for NotiicationRules

* build(client): remove client and build each build

* chore: update gitignore to exclude generated client

* fix: allow client dir to be empty

* docs: add README to client dir

* fix(build): add autogen client to eslintignore

* build: gen client for ci js tests
2019-08-07 13:42:35 -07: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
Jakub Bednář b6b5befad7
fix(http): The org parameter takes either the ID or Name interchangeably (#14540) 2019-08-06 06:20:26 +02:00
Deniz Kusefoglu bca1af25a9
feat: alerting - Add alert builder (#14550)
* Add check saving flows and change activeTab type

* Add first pass at alertBuilder

* Change TimeMachineEnum type

* Add xy view properties to checks, and convert to and from check View type

* Add Column Header to checks column

* Add change current check type action

* Access view type through properties

* Load xy view options for check view

* Add orgID to check in createCheck

* Clear current check on close CheckEO

* Create Check Alerting Button

* Create check view on edit and new check EO

* Fix edit check eo action bug

* Update threshold types

* When switch schedule from every to cron change the inputs that are visible

* save Current Check from VEO if view type is check

* Add description component to checks

* TimeMachineIDs to TimeMachineID

* Remove bracketed object decleration

* Remove as Threshold type

* Use ViewType instead of typeof

* Create CheckType type

* Remove time machine reducer tests

* Remove check view properties that come from xyView

* Fix EditCheck hooks

* Move status calculations to body of function

* Update redux store when performing check CRUD

* Create add and remove check actions in timeMachine

* Remove trailing space
2019-08-05 17:38:49 -07:00
Christopher Henn 5104cc1f11 fix(ui): handle rate limited and error Flux responses 2019-08-02 13:50:22 -07:00
Jade McGough 5d826961db feat(http): add checks http handler 2019-07-31 19:00:26 -04:00
George b2fe0d1d63
fix(tasks): surface flux errors on pre-auth check (#14492) 2019-07-31 11:46:28 +02:00
Christopher Henn 1250be5f80 refactor(ui): inline API type generation
Part of #14482
2019-07-30 09:35:05 -07:00
Deniz Kusefoglu bbc37b4c68
feat: Alerting add alert builder veo state (#14499)
* Define new check, edit check and check view routes with VEO

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

* Add task status to other task types

* Put editAlerting route behind feature flag

* add action and reducer for update current check

* Add init edit and new check editor overlay

* Split VEO in to two for new and edit view

* get edit and new CheckEO's ready

* Create getViewForTimeMachine action

* current check should be a partial check

* Fix view typing

* Fix linter errors

* Fix equality

* Catch save VEO errors
2019-07-29 15:54:35 -07:00
Chris Goller 837a410bea
feat(http): gzip compress the query CSV response. (#14495)
If client requests with Accept-Encoding: gzip, then
compress response and return with Content-Encoding: gzip.

This increases the server-side load by about 12%, but saves network bandwidth.

benchmark                     old ns/op     new ns/op     delta
Benchmark_Query_no_gzip-4     123609        137885        +11.55%

benchmark                     old allocs     new allocs     delta
Benchmark_Query_no_gzip-4     149            150            +0.67%

benchmark                     old bytes     new bytes     delta
Benchmark_Query_no_gzip-4     14297         15205         +6.35%
2019-07-29 14:47:55 -05:00
zhulongcheng ce4d5a9852 feat(http): patch notification rule 2019-07-28 22:08:23 +08:00
zhulongcheng 41a8174dca docs(http): patch notification rule
/notificationRules/{ruleID}
2019-07-28 22:04:04 +08:00
Alirie Gray 7b96bd95f0 test(tasks): fix cypress tests for task creation with token 2019-07-26 09:51:33 -07: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 dcda49d1d0 feat(http): add notification rule handler 2019-07-25 15:15:35 -04:00
Kelvin Wang de7f5dd8e0 fix(http): replace patch n rule to put 2019-07-25 15:15:35 -04:00
Deniz Kusefoglu 613aef698f
Add alerting cards (#14429)
* bump to client 0.5.3

* export Query type from client and create alerting mock

* Bump client to 0.5.5

* Merge all status enums to one type

* Fix threshold visualization types

* Add extra underscore to notification rules

* Use check view type from client

* Add description field to checks, notificationrules and endpoints

* Add init check cards

* Add check card actions

* Correct component name

* Add check card context and toggle

* Add id to notification rule base

* Add notification rule cards

* add checks reducer tests

* user immer for checks reducer

* add tests and immer to notification rule reducer
2019-07-24 00:34:42 -07:00
Jorge Landivar 47cd6df834 fix(http): task runs and logs no longer use task token (#14416)
* fix(http): task runs and logs no longer use task token

* test(http): skip session tests

These tests are not using checking authorization correctly.
2019-07-23 10:31:39 -05:00
Jorge Landivar 9dd27067e8
Merge pull request #14009 from influxdata/cancel-runs-schema
chore(tasks): add swagger for canceling task runs
2019-07-23 02:55:06 -05:00
Deniz Kusefoglu e399e656ce
Fix aggregate window: change name parameter to period (#14407) 2019-07-22 13:39:31 -07:00
Jonathan A. Sternberg 47b032464f
refactor(query): handle flux errors in the query controller instead of http (#14368)
If we handle the flux errors in the query controller, it makes it so we
are handling the errors in the location where the happen rather than at
a layer further up the stack.

This should simplify it so the errors are handled in this single
location instead.
2019-07-18 11:43:15 -05:00
Deniz Kusefoglu 6e77b64da9
Fix dashboard query swagger definition to reflect reality (#14370) 2019-07-17 19:23:51 -07:00
Deniz Kusefoglu cd4b048ac7
Fix alert types and discriminators (#14358)
* Add discriminator and enum to check types

* Add threshold discriminators and type enum

* Add notification rule discriminators and type enum

* Remove description field

* Fix reference to threshold base

* Move types to ViewBase type from each View Property

* Fix view properties

* Add monotonex to swagger options

* Add empty to view types

* remove whitespace
2019-07-17 11:15:01 -07:00
kelwang 99bfd05820
Merge pull request #14339 from influxdata/add_debug_log
feat(http): add auth debug log
2019-07-15 17:08:41 -04:00
Deniz Kusefoglu b03e887c37
Fix alerts swagger (#14348)
* Convert operators to strings

* Change queries to query

* fix Check types

* fix notification rules

* fix notification endpoints
2019-07-15 14:07:22 -07:00
Alirie Gray c7f09d6a56
chore(tasks): use pointers for task errors (#14343) 2019-07-15 13:57:51 -07:00
kelwang d45bd1bb83
Merge pull request #14344 from influxdata/auth_create_user_fix
fix(http): fixed auth userid overwrite
2019-07-15 14:19:34 -04:00
Kelvin Wang b4eb32c222 fix(http): fixed auth userid overwrite 2019-07-15 14:06:02 -04:00
Jonathan A. Sternberg 63aeff31b1
feat(http): handle flux errors that are returned from the query service (#14338)
Flux errors that are returned from the query service will be adapted to
an influxdb.Error and then will be written to HTTP correctly.
2019-07-15 12:50:53 -05:00
Kelvin Wang f55cf4c8b3 feat(http): add auth debug log 2019-07-15 12:09:59 -04:00
Deniz Kusefoglu e9081d68a4
WIP Add alerts and notification swagger definitions (#14324)
* Rename check schema to healthcheck

* add alert schema and endpoints

* Add checkView as a view type


Co-Authored-By: Jade McGough <jademcgough@users.noreply.github.com>
2019-07-12 14:34:36 -07:00
Kelvin Wang 1681e3b801 fix(http): use the original error code 2019-07-05 12:34:00 -04:00
Kelvin Wang 0b03ce0e0b fix(http): query handler conflict 2019-06-27 19:16:54 -04:00
kelwang c4fd4d7986
Merge pull request #14213 from influxdata/error_encode_interface
Error encode interface
2019-06-27 18:03:59 -04:00
Christopher M. Wolff cc5afac422
fix(http): add org ID to flux handler (#14225) 2019-06-27 14:33:22 -07:00
Kelvin Wang 9ecada4dce feat(http): convert errorEncode to use interface 2019-06-26 21:41:01 -04:00
Luke Morris 701501d00d feat(http/me): oauthID could in theory be updated 2019-06-26 14:42:29 -07:00
Palak Bhojani b67ea62562 Add oauthID to the user interface instead of session 2019-06-26 11:45:34 -07:00
Luke Morris 1c3b92dacb feat(http/me): name type according to semantics 2019-06-26 11:45:34 -07:00
Luke Morris 03f6d0e521 feat(http/me): name function according to semantics 2019-06-26 11:45:34 -07:00
Luke Morris 225586f83f feat(me): return oauth id with user object 2019-06-26 11:45:34 -07:00
Chris Goller 14e7daa6e4
fix client tracing propagation from doubly recording (#14204)
Closes #14203

* chore(vendor): update to opentracing 1.1.0

* fix(http): finish client span

* fix(http): remove extra span injection
2019-06-26 00:48:15 -05:00
lisale0 1d6a0c5a3c fix pr 2019-06-21 11:55:28 -07:00
lisale0 6206b905a4 set va directly and remove comment 2019-06-20 16:30:25 -07:00
lisale0 63bc965606 fix findvar test 2019-06-20 16:25:38 -07:00
lisale0 8c045ad08a gofmt 2019-06-20 16:25:38 -07:00
lisale0 3d18984c70 fix tests 2019-06-20 16:25:38 -07: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
Adam e4fbaa61e3 Merge remote-tracking branch 'origin/master' into flux-staging 2019-06-18 16:14:00 -04:00
Christopher Wolff 67236ea887 refactor(http): make http.Query use FluxCompiler when query is passed as text 2019-06-18 11:45:17 -07:00
Alirie Gray 66157c9d44 chore(tasks): consolidate task errors into task_errors.go 2019-06-17 16:03:18 -07:00
kelwang 869b29da18
Merge pull request #14071 from zhulongcheng/rename-OrgID
fix(http): rename OrgID to orgID
2019-06-13 12:16:24 -04: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
Christopher Wolff 950d84fee4 chore: skip flaky test
https://github.com/influxdata/influxdb/issues/14108
2019-06-11 08:41:13 -07: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
zhulongcheng 5f1e070a73 fix(http): rename OrgID to orgID 2019-06-06 22:12:32 +08:00
Kelvin Wang 18a0f3f542 fix(influxdb): rename telegraf orgID 2019-06-03 16:20:53 -04:00
docmerlin (j. Emrys Landivar) 15bacd4e60 chore(tasks): add swagger for canceling task runs 2019-05-29 11:28:20 -05:00
kelwang cccdae2421
Merge pull request #13977 from influxdata/org_audit_log
feat(influxdb): add org create and update time
2019-05-28 16:51:18 -07:00
Jade McGough 278da443e6
fix(http): remove accept header from query request swagger (#13625) 2019-05-28 14:44:27 -07:00
Jorge Landivar e6ae9f6231
Fix path: 2019-05-28 16:26:49 -05:00
Jorge Landivar ecd9200302
chore(swagger): fix a few swagger typos 2019-05-28 16:12:44 -05:00
docmerlin (j. Emrys Landivar) 935640cf99 chore(swagger): update swagger to include operationId 2019-05-28 09:24:04 -05:00
Jade McGough 062c02ff8d chore(swagger): split view properties by type 2019-05-24 16:27:56 -07:00
Kelvin Wang b8c2cd6c05 feat(influxdb): add org create and update time 2019-05-20 17:36:29 -07:00
Brandon Farmer ba148f3461 Fix Task schema error, currently preventing client generation 2019-05-20 10:19:11 -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
Alirie Gray 576da8f9d2 fix(swagger): add log property to task runs endpoint docs 2019-05-17 14:08:10 -07:00
Kelvin Wang 57ceb9e275 feat(influxdb): bucket created and updated time 2019-05-17 11:49:10 -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
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
Robert-André Mauchin 5079314ab5 chore(dep): update kin-openapi to v0.2.0
The API slightly changed: LoadSwaggerFromYAMLData is now replaced
by LoadSwaggerFromData.
See: https://github.com/getkin/kin-openapi/pull/67

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2019-05-15 00:23:32 +02:00
Jade McGough 29d2387752
chore(http): update error handling example in readme (#13874) 2019-05-13 12:50:25 -07:00
kelwang 8687cb8039
Merge pull request #13448 from influxdata/create_view_issue
fix(http): create view
2019-05-13 13:33:34 -04:00
Jonathan A. Sternberg 01e3317b02
fix(http): do not discard non-json encoded errors when using `CheckError` (#13844)
If the error returned was normal text instead of JSON, the JSON parsing
would fail and the JSON error would be returned instead of the actual
error.

This has been modified so that when it fails to parse the text as JSON,
it will construct an error with the actual text and then wrap it using
the JSON error.
2019-05-13 12:02:05 -05: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
Adam ae25f0c448 Merge remote-tracking branch 'origin/master' into flux-staging 2019-05-09 15:29:00 -04:00
Christopher M. Wolff c35c15f54d
refactor(http): move queryd http interface to idpe (#13862) 2019-05-09 10:41:14 -07:00
Alirie Gray 77934b01c6 feat(tasks): add description field to tasks 2019-05-08 13:39:09 -07:00
Jade McGough c27a96da9a
chore(http): surface unmarshaling failures in tests (#13855) 2019-05-08 12:51:03 -07:00
Jade McGough 291ac06372
fix(http): return correct response code when dashboard creation fails (#13803) 2019-05-06 16:19:42 -07:00
Mark Rushakoff 46a0a8160b fix(http): use influxdb.Error in FluxHandler 2019-05-05 11:05:00 -07:00
Alirie Gray 6a562757ad test(http): add test coverage for handler.go 2019-05-02 14:04:40 -07:00
Alirie Gray 763fe0a6e5 feat(http): add user-agent metrics to all http endpoints 2019-05-02 11:58:13 -07:00
Jade McGough 7855147241
Merge pull request #13636 from influxdata/delete_invalid_org_id
fix(http): fix delete bad org id
2019-04-29 10:15:36 -07:00
Leo Di Donato 4373392d54
feat(http): Default http transport uses the actual default values (#13437) 2019-04-29 16:57:30 +02:00
Jade McGough e02c859992
Merge pull request #13677 from influxdata/org_name_not_empty
fix(kv): fix empty org name
2019-04-26 15:57:19 -07:00
Kelvin Wang ea54e2c2c8 fix(kv): fix empty org name 2019-04-26 18:16:28 -04:00
Jonathan A. Sternberg 38d9fb8c79
feat(http): pretty stack trace for the http panic recovery handler (#13509)
When printing out a stacktrace with a logged error message, it is better
to set the `Stack` property on the entry than to include it as a string
within the context fields. It is also better than using `zap.Stack()`
too.

This is because certain encoders will perform a pretty print of the
stacktrace. The default zap-logfmt will read this property and include
it as a field so this code is identical when using that encoder, but the
console encoder, which is commonly used in local development because it
is automatically used with a TTY available, will print out a newline and
pretty print the stacktrace if it is included on the entry itself.
2019-04-26 15:06:41 -05:00
Jade McGough 6438999508
Merge pull request #13656 from zhulongcheng/fix-document-panic
fix document service panic
2019-04-26 12:30:27 -07:00
Kelvin Wang 2021321186 fix(influxdb): invalid filter error 2019-04-26 12:22:42 -04:00
Mark Rushakoff 9a8426c3f0 fix(http): use influxdb.Error in ProxyQueryHandler
In our internal use of this handler, some of these errors weren't
wrapped in the expected influxdb.Error type.
2019-04-26 08:19:00 -07:00
zhulongcheng f7635f0552 fix document service panic 2019-04-26 14:46:37 +08:00
Jade McGough e2cac953f5 fix(http): make org param optional in document get request 2019-04-25 14:45:01 -07:00
Kelvin Wang 9fa35961fd fix(http): fix delete bad org id 2019-04-25 15:20:28 -04:00
Kelvin Wang 717fcc44b3 feat(influxdb): add scraper filter 2019-04-25 11:33:34 -04:00
zhulongcheng 382e49b59b fix(http): make org & orgID optional 2019-04-25 11:13:49 +08:00
Jade McGough 8428c3630c fix(http): update bucket swagger to reflect recent changes 2019-04-24 14:11:38 -07:00
kelwang 49230619e6
Merge pull request #12754 from influxdata/swagger_telegraf_default_get
fix(http): fix telegraf get default swagger
2019-04-24 14:12:00 -04:00
kelwang 54fd1f81ce
Merge pull request #12802 from influxdata/swagger_basic_auth
fix(http): swagger define security schemes
2019-04-24 14:11:45 -04:00
kelwang 6261c274aa
Merge pull request #13444 from influxdata/swagger_orgID_not_required
fix(http): make getting labels orgID optional
2019-04-24 14:11:22 -04:00
kelwang 4acad08ea5
Merge pull request #13519 from influxdata/doc_desc
feat(influxdb): add doc description
2019-04-24 14:11:03 -04:00
kelwang 6ef624142b
Merge pull request #13556 from influxdata/org_desc
feat(influxdb): add org desc
2019-04-24 14:10:20 -04:00
Ben Johnson 01bfcf822b
Merge point parse & explode (#12377)
Merge point parse & explode
2019-04-24 10:30:16 -06:00
Ben Johnson 272f340c30
Merge point parse & explode. 2019-04-24 10:12:15 -06:00
kelwang 3bc1c49e91
Merge pull request #13557 from influxdata/bucket_desc
feat(influxdb): add bucket desc
2019-04-24 11:56:52 -04:00
Kelvin Wang 76cc27751b feat(influxdb): add bucket desc 2019-04-24 11:20:05 -04:00
kelwang e23824e32d
Merge pull request #13357 from zhulongcheng/docs-oplog-user
docs(http): add oplog user
2019-04-24 11:18:39 -04:00
kelwang d6001bf8e1
Merge pull request #13356 from zhulongcheng/docs-trace-span
docs(http): add missing Zap-Trace-Span header
2019-04-24 11:18:07 -04:00
Jade McGough 0d81a1ebdd fix(http): don't include nil values when auth responses are skipped 2019-04-23 14:34:04 -07:00
Jade McGough 0124a0c669 fix(http): don't 400 when auth GET decoration fails 2019-04-23 14:12:07 -07:00
Kelvin Wang 4c9f34122c feat(influxdb): add org desc 2019-04-22 22:40:07 -04:00
Kelvin Wang 7a72c363f2 remove org from bucket 2019-04-22 18:39:05 -04:00
Kelvin Wang 3868149a6c fix(http): scraper resp org 2019-04-22 18:39:03 -04:00
Kelvin Wang 9d44ac3635 rename bucket organization to org 2019-04-22 18:39:01 -04:00
Jade McGough b4851d4ecb fix(http): remove incorrect param from labels post 2019-04-19 14:01:24 -07:00
Kelvin Wang 53d95ecf52 feat(influxdb): add doc description 2019-04-19 12:47:31 -04:00
Kelvin Wang 5d195b63e0 fix(http): fix the swagger for cell update 2019-04-19 11:49:39 -04:00
Nathaniel Cook 4c77e3598b Merge branch 'master' into flux-staging 2019-04-18 11:01:22 -06:00
Michael Desa cabb8cbf98
Merge pull request #13490 from influxdata/fix/http-query-metric-org-id
fix(http): set org ID on event metric
2019-04-18 09:23:57 -04:00
Lorenzo Fontana da042eb418
docs(http): default http transport commentary
Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-04-18 11:27:35 +02:00
Lorenzo Fontana 54a15cfe43
feat(http): Default http transport uses the actual default values
Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-04-18 11:27:35 +02:00
Jade McGough 1b50785fb6
Merge pull request #13449 from influxdata/error-429
chore(http): add 429 response to errors
2019-04-17 22:12:34 -07:00
Mark Rushakoff f4937f1884 fix(http): set org ID on event metric
Looks like this field was just mistakenly overlooked when it was
introduced.
2019-04-17 16:08:32 -07: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
Michael Desa e00c071c2c
feat(influxdb): add query/write http event recorders
feat(http): add prometheus counters for tracking write/query usage

feat(http/metric): add metric recoder for recording http metrics

feat(prometheus): implement metric.Recorder for prometheus metrics

fix(prometheus): remove erroneous fmt.Printlns

feat(http): add prometheus registry to API backend

This was done as exposing prometheus metrics to a higher level was quite
difficult. It was much simple to simply pass the registry down to
anything that needs it.

feat(cmd/influxd/launcher): pass prom registry in on api backend

feat(http): collect metrics for write and query endpoints

This was much messier than I would have preferred. Future work is
outlined in TODOs.

review(influxdb): rename metric.Metric to metric.Event
2019-04-17 08:33:31 -04:00
Jade McGough 64ca8b6f08 chore(http): add 429 response to errors 2019-04-16 16:50:35 -07:00
Kelvin Wang bff7b90829 fix(http): create view 2019-04-16 18:06:39 -04:00
Kelvin Wang cbe26c04b7 fix(http): make getting labels orgID optional 2019-04-16 14:04:29 -04:00
kelwang 57ae0857de
Merge pull request #13412 from influxdata/doc_meta_type
feat(influxdb): add doc meta type
2019-04-16 10:59:36 -04:00
Jade McGough e4018fad81 Revert "docs(http): remove view id"
This reverts commit 78063a747d.
2019-04-15 15:00:52 -07:00
Jade McGough 5a1ae7c704 Revert "fix(http): remove view ID"
This reverts commit 1c6bdb6c3e.
2019-04-15 15:00:40 -07:00
Kelvin Wang 75b19dc1ec feat(influxdb): add doc meta type 2019-04-15 15:48:54 -04:00
zhulongcheng 78063a747d docs(http): remove view id 2019-04-15 23:14:06 +08:00
zhulongcheng d5917878d0 feat(http): find auths by org 2019-04-14 18:06:19 +08:00
zhulongcheng 1c6bdb6c3e fix(http): remove view ID 2019-04-14 12:31:35 +08:00
zhulongcheng 4e54bbf21c docs(http): add oplog user 2019-04-13 00:51:12 +08:00
Kelvin Wang a5f53e48c4 fix(http): fix go vet issue 2019-04-12 12:46:26 -04:00
zhulongcheng 7c5755556e docs(http): add missing Zap-Trace-Span header 2019-04-13 00:14:34 +08:00
jlapacik 816bd74af8 refactor(http): change all instances of spec compiler to repl compiler (#13268) 2019-04-12 07:15:27 -07:00
jlapacik fb47b8cd42 fix(http): use lang.Compile 2019-04-12 07:15:27 -07:00
jlapacik fbd7596aaa refactor(http): remove /query/spec from swagger file
Closes #12882.
2019-04-12 07:15:27 -07:00
jlapacik 5cf5806880 refactor(http): remove api/v2/query/spec endpoint and handler 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
Jade McGough b5f6effda4
Merge pull request #13315 from influxdata/filter-label-org
feat(http): filter label response by organization
2019-04-12 02:07:33 -07:00
Jade McGough cfd521b47a fix label tests 2019-04-12 01:29:49 -07:00
Jade McGough 7914a04f0b organizationID -> orgID 2019-04-12 01:29:42 -07:00
Jade McGough 81e6a7116b feat(http): filter label response by organization 2019-04-12 01:29:32 -07:00
Nathaniel Cook f37e65f26c fix(query): change logging bridge to be a service instead
It is no longer necessary for the query logging to be a bridge as the
stats are available for consumption from the ProxyQueryService.
This change changes the logging bridge to directly implement the proxy
query service instead of implementing a bridge.
2019-04-11 14:46:45 -06:00
Kelvin Wang 92e82884a6 feat(http): accept label id for template post 2019-04-11 13:16:39 -04:00
kelwang 5958192788
Merge pull request #12795 from influxdata/swagger_scaraper_get_by_id
fix(http): swagger add get target by id
2019-04-11 11:24:54 -04:00
kelwang 67bf2f54ac
Merge pull request #13052 from influxdata/auth_update_interface
fix(influxdb): updated auth shall return
2019-04-11 11:24:02 -04: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
Kelvin Wang ec6895531d feat(http): add document labe handler 2019-04-10 15:08:03 -04:00
kelwang be674622c6
Revert "fix(inmem): remove the old inmem implementation" 2019-04-09 14:24:40 -04:00
kelwang d0022dfd5c
Merge pull request #13039 from zhulongcheng/rm-inmem-impl
fix(inmem): remove the old inmem implementation
2019-04-09 13:06:50 -04:00
kelwang bfcf82d7b5
Merge pull request #13152 from zhulongcheng/docs-rm-view
docs(http): remove unused Views schema
2019-04-08 16:11:55 -04:00
kelwang c7d043a3b4
Merge pull request #13154 from zhulongcheng/doc-rm-view-link
docs(http): remove view link from api links
2019-04-08 16:11:26 -04:00
kelwang 34d631a9fc
Merge pull request #13156 from zhulongcheng/docs-rm-FluxLinks
docs(http): remove FluxLinks schema
2019-04-08 16:11:13 -04:00
zhulongcheng cacd6a8223 fix(inmem): replace inmem.Service with kv.Service 2019-04-08 15:18:38 +08:00
Kelvin Wang 8a825a8f9f feat(influxdb): get docs by org id 2019-04-04 12:51:30 -04:00
zhulongcheng 53412e3e6a docs(http): remove FluxLinks schema 2019-04-05 00:16:59 +08:00
zhulongcheng 153ef54d0f docs(http): remove view link from api links 2019-04-04 23:58:13 +08:00
zhulongcheng c745a8dfd9 docs(http): remove unused Views schema 2019-04-04 23:38:11 +08:00
Brandon Farmer 8fc86ba17e Update swagger endpoints to include orgID parameters 2019-04-03 16:44:16 -07:00
kelwang dd55308b77
Merge pull request #13071 from influxdata/bucket_not_found
fix(kv): fix bucket not found by name
2019-04-03 17:16:12 -04:00
Alirie Gray f04de15144
Merge pull request #13109 from influxdata/chore/add-description-to-variables
chore(variables): add description property to Variable struct
2019-04-03 14:00:43 -07:00
Alirie Gray bdd260c25b chore(variables): add description property to Variable struct 2019-04-03 13:36:32 -07:00
Kelvin Wang 1cf600aca9 remove proto 2019-04-03 15:42:25 -04:00
Kelvin Wang 054ce89dc5 fix(kv): fix bucket not found by name 2019-04-02 15:10:56 -04:00
Kelvin Wang bcadefd8cb fix(http): swagger proto definition 2019-04-02 14:26:04 -04:00
Jade McGough 060f893a93 fix(http): update swagger to include correct label add responses 2019-04-01 13:01:24 -07:00
kelwang 6190ba6af3
Merge pull request #13058 from influxdata/swagger_ready_health
fix(http): fix swagger health & ready
2019-04-01 14:43:10 -04:00
kelwang 73e51ef5b5
Merge pull request #13056 from influxdata/swagger_dashboard_links
fix(http): swagger dashboard links
2019-04-01 14:22:05 -04:00
kelwang 43d582c484
Merge pull request #13008 from zhulongcheng/fix-proto-404
fix(http/proto): return 404 if proto not found
2019-04-01 14:04:36 -04:00
Kelvin Wang c09182d0cb fix(http): fix swagger health & ready 2019-04-01 14:02:35 -04:00
Kelvin Wang 4e87f34f96 fix(http): swagger dashboard links 2019-04-01 13:10:33 -04:00
Kelvin Wang 712010d013 if(influxdb): updated auth shall return 2019-04-01 12:56:29 -04:00
Jade McGough 05f26b0236
Merge pull request #13032 from influxdata/secret-key-links
fix(http): nest secret key response links in swagger
2019-04-01 09:35:28 -07:00
Jade McGough f092a5538a fix(http): start -> started in swagger 2019-04-01 00:46:46 -07:00
Jade McGough d5e9d10e31 fix(http): nest secret key response links in swagger 2019-04-01 00:39:41 -07:00
Jade McGough 5fbed0b6a5
Merge pull request #12978 from influxdata/varible-labels
feat(http): add labels to variables
2019-03-29 17:50:14 -07:00
Jade McGough 079d7f835a fix tests 2019-03-29 17:19:11 -07:00
kelwang 22dd44c4d1
Merge pull request #12955 from influxdata/auth_description_update
feat(kv): add auth description update
2019-03-29 14:08:34 -04:00
kelwang 2f9c0f8ae3
Merge pull request #13017 from influxdata/swagger_variable_map
fix(http): addtional property of variable map
2019-03-29 13:33:45 -04:00
kelwang 1cbfc7320a
Merge pull request #13019 from influxdata/swagger_dashboard_date_time
fix(http): swagger dashboard meta date-time
2019-03-29 13:33:28 -04:00
Kelvin Wang cc23caeb92 fix(http): swagger dashboard meta date-time 2019-03-29 12:21:27 -04:00
Kelvin Wang c5f93a9b9f fix(http): swagger user password reset to 204 2019-03-29 12:09:47 -04:00
Kelvin Wang aefe32d70b fix(http): addtional property of variable map 2019-03-29 12:04:37 -04:00
zhulongcheng 10f79fdb9b fix(http/proto): return 404 if proto not found 2019-03-29 11:19:56 +08:00
Lyon Hill c78344c441
update task schedler to use the new task control service (#12949) 2019-03-28 16:52:25 -06:00
Jade McGough 945569a29d fix botched rebase 2019-03-28 15:42:06 -07:00
Jade McGough d21d96e35b feat(http): add labels to variables 2019-03-28 15:05:13 -07:00
kelwang abbfc17fa2
Merge pull request #12964 from zhulongcheng/docs-var-link
docs(http): add Variable org link
2019-03-28 12:34:12 -04:00
Kelvin Wang a2c0bdbe77 feat(kv): add new update 2019-03-28 11:46:41 -04:00
zhulongcheng e0f2fdbc76 docs(http): add Document links 2019-03-28 15:23:37 +08:00
zhulongcheng 8173087a54 docs(http): add Variable org link 2019-03-28 11:20:59 +08:00
kelwang a64c4fd138
Merge pull request #12246 from zhulongcheng/rm-view
fix(http): remove view service
2019-03-27 20:13:10 -04:00
Jade McGough 7bcff2e973 fix(http): remove newPatchLabelHandler, it should not exist
This was removed in the labels 2.0 rewrite, and looks like it was added back as a regression
2019-03-27 14:31:04 -07:00
Nathaniel Cook ca6f2ad0c6 Merge branch 'master' into flux-staging 2019-03-27 09:42:48 -06:00
Michael Desa 119f113597
Merge pull request #12912 from influxdata/fix/issue#12861
Add check for nil document in post document request
2019-03-26 14:42:16 -07:00
Michael Desa aba40b6131
fix(http): add check for nil document in post document request 2019-03-26 14:11:32 -07:00
kelwang fadb66d4d1
Merge pull request #12748 from influxdata/org_secret_delete
fix(http): fix org secrets delete
2019-03-26 16:12:13 -04:00
Lorenzo Affetti a49bb73c04 chore: update Flux to v0.23.0 2019-03-26 18:04:18 +01:00
kelwang 949d7bc9de
Merge pull request #12801 from influxdata/swagger_password_reset
fix(http): swagger change user pass reset resp
2019-03-26 11:35:06 -04:00
Christopher M. Wolff eb4df57788
test(http): add unit test for proxy query service (#12683) 2019-03-26 06:49:51 -07:00
Christopher M. Wolff 56e688beee
fix(query): add Check method to query service interfaces (#12866)
Fixes influxdata/idpe#2756.
2019-03-25 20:05:44 -07:00
kelwang ffebdf8446
Merge pull request #12796 from influxdata/swagger_write_precison
fix(http): swagger write precision
2019-03-25 15:31:31 -04:00
Kelvin Wang 04fd5f76db fix(http): fix invalid source buckets 2019-03-25 14:03:24 -04:00
kelwang 7ae219ed35
Merge pull request #12794 from influxdata/swagger_label_response
fix(http): fix scraper, buckets label swagger resp
2019-03-25 13:09:12 -04:00
Kelvin Wang b34ce9bfcb fix(http): swagger change user pass reset resp 2019-03-25 12:46:56 -04:00
Kelvin Wang 7f3c8a7d43 fix(http): swagger add template endpoint 2019-03-25 11:24:24 -04:00