Commit Graph

1217 Commits (aa5b094c8de2c12a2177e728973c1432118c4832)

Author SHA1 Message Date
Gavin Cabbage 6fb8a67ff8
fix(api): change task ID runs success status from 200 to 201 2019-10-26 00:16:48 -04:00
Kelvin Wang 4615a01338 fix(kv): use urm filter to search endpoints 2019-10-24 13:28:34 -04:00
Kelvin Wang 81283b1ac2 fix(kv): find checks by urm 2019-10-24 12:29:48 -04:00
Brandon Farmer 88bf178802 feat(influxdb): Add labels create endpoints
- Notification Rules
- Notification Endpoints
- Checks

Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
2019-10-23 09:53:50 -07:00
Alirie Gray a8f5e5ba19
fix(tasks): create API facing interface for task runs (#15539) 2019-10-22 15:35:47 -07:00
Brandon Farmer ea82dc3470 fix(tasks): tasks look up system bucket id 2019-10-21 14:48:47 -07:00
Brandon Farmer b343250390 fix(influxdb): fixes broken tests from system bucket changes 2019-10-21 14:48:47 -07:00
Brandon Farmer 2e0749b3ba feat(influxdb): Add system buckets on org creation
* Only allow users to create user buckets
* Only accept bucket creation parameters on post
2019-10-21 14:48:47 -07:00
Deary Hudson III c04249ec78
fix(http): /api/v2/orgs/:id/owners|members to 404 (#15504)
ensures that the endpoints:
  * /api/v2/orgs/:id/owners
  * /api/v2/orgs/:id/members
404 when the organization resource does not exist
2019-10-21 16:37:30 -05:00
Kelvin Wang e1d246a19d fix(predicate): remove unsupported operator parsing 2019-10-18 15:16:21 -04:00
Kelvin Wang 2837d4ec08 fix(predicate): add string parser 2019-10-18 12:02:53 -04:00
Jade McGough fcc06d4291 feat(http): add predicate endpoint 2019-10-18 12:02:53 -04:00
Kelvin Wang 62f4042853 feat(influxdb): add predicate package 2019-10-18 12:02:52 -04: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 b3b2f52d57
chore(gateway): log error on unauthorized attempt (#15452) 2019-10-17 17:57:01 +01:00
kelwang 3f168b109d
Merge pull request #15117 from influxdata/clientURL_optional
fix(notification/endpoint): pagerduty clientURL should be optional
2019-10-15 13:11:50 -04: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
kelwang 072270d7d8
Merge pull request #15372 from influxdata/cli_list_org_members
fix(cmd/influx): fix list org members
2019-10-10 12:10:25 -04:00
Kelvin Wang c96fe7ed6e fix(cmd/influx): fix list org members 2019-10-10 11:57:03 -04:00
Johnny Steenbergen dbe0103d92 fix(logging): blacklist endpoints with sensitive data from logging body 2019-10-09 13:17:24 -07:00
Johnny Steenbergen 5a546d5827
Merge pull request #15335 from influxdata/2939/add_logging_to_gateway
2939/add logging to gateway
2019-10-07 14:49:36 -07:00
Johnny Steenbergen 9d5392cfd9 fix(logging): add debug logging for all http requests 2019-10-07 14:19:21 -07:00
Jakub Bednář ea9cf13af6
fix(notification/rule): fixed http NotificationRule (#15245)
* Fixed handler path for a list of all labels for a notification rule
* Fixed filtering NotificationRules by limit and offset
2019-10-07 09:36:55 +02:00
George 9f5390e449
feat(auth): add jwt support in auth middleware (#15152) 2019-09-27 12:12:41 +01:00
Jakub Bednář 732c0cc28d
fix(http): update NotificationRuleBase and NotificationRule schema to reflect reality (#15244)
* NotificationRuleBase: the endpointID should be required and editable, there is missing a links property
 * NotificationRule: add discriminator
 * add a missing TraceSpan parameter into a GetNotificationRules and GetChecks
2019-09-26 12:07:44 +02:00
Jakub Bednář 95d6301458
fix(http): add a discriminator for a Threshold schema, add links into CheckBase schema (#15198) 2019-09-26 11:09:59 +02:00
Michael Desa ca937eaf11
fix(http): lookup task before clearing it's id from the notification rule 2019-09-25 16:33:05 -04:00
Johnny Steenbergen 4da248ec30
Merge pull request #15275 from influxdata/task/15258_remove_senstive_data_logging
chore(http): remove logging of senstive data
2019-09-25 10:13:10 -07:00
Johnny Steenbergen fc955c5abe chore(http): remove logging of senstive data
after discussion with team, dropping the request logging was decided on.
2019-09-25 09:49:09 -07:00
Jakub Bednář ff2747a728
fix(http/check): fix handler path for a list of all labels for a check (#15216) 2019-09-25 09:07:24 +02:00
Jakub Bednář d23b1f9904
fix(http): add discriminator for Check schema (#15178) 2019-09-25 08:50:09 +02:00
Brandon Farmer f61fe82708 fix(influxdb): Always return user status 2019-09-24 15:19:16 -07:00
Michael Desa d48b28e533
fix(http): prevent writing to http request multiple times
Closes https://github.com/influxdata/influxdb/issues/15260

Additionally, we look up a task before clearing the taskID from the
check.
2019-09-24 15:48:36 -04:00
Kelvin Wang 4aa6df1c34 fix(cmd/influx): org add/remove members 2019-09-24 13:26:18 -04:00
kelwang c3127c8cdd
Merge pull request #15179 from bednar/check-cron
fix(alerts): remove the cron option from checks/rules
2019-09-23 21:28:02 -04:00
kelwang 236e8c14ee
Merge pull request #15150 from bednar/flux-paren-expression
fix(http): add ParenExpression
2019-09-23 21:26:57 -04:00
Jakub Bednář 9f0d9f6ecb fix(http): fix NotificationEndpoint: (#15148)
* Add TraceSpan parameter to GetNotificationEndpoints operation
* Fixed handler path for a list of all labels for a notification endpoint
* Fixed filter NotificationEndpoints by limit and offset
2019-09-23 15:55:37 -07:00
Brandon Farmer d83fabeabc feat(influxdb): user disabling 2019-09-23 11:57:16 -07:00
Jakub Bednar 8089b9c7ea fix(http): fix capitalization 2019-09-23 10:30:20 +02:00
Jakub Bednar 83997a7345 fix(http): add ParenExpression 2019-09-23 10:29:09 +02:00
Jakub Bednar 265bc7bf2a fix(alerts): remove the cron option from checks/rules 2019-09-23 10:20:22 +02:00
Scott Anderson c24710a00d
chore(swagger): general cleanup of swagger.yml (#15223) 2019-09-21 10:15:42 -06: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
Jonathan A. Sternberg ff7d13a10a
docs(http): fix the documentation for the query swagger endpoint (#15181)
The `/query` swagger endpoint now specifies that error messages are
returned as the standard JSON schema. The standard JSON schema has also
been changed slightly so that only `code` and `message` are documented
and the intention is that we will flatten the message from an
`influxdb.Error` before we encode the JSON.
2019-09-18 18:31:12 -05:00
Chris Goller 5b4c0db4a0
test(http): add unit tests for /api/v2/write (#15128)
test(http): add unit tests for /api/v2/write
2019-09-12 13:57:06 -05:00
Chris Goller 1d14ba1d1c
feat(http): add validation checks to PUT requests (#15096)
feat(http): add validation checks to PUT requests
2019-09-12 13:42:37 -05:00
Chris Goller bb72fdeae0 test(http): add unit tests for /api/v2/write
We have been tracking down odd error messages when writing data and
found the problem to be internal server errors when writing empty
bodies.

I added fairly comprehensive test coverage for /api/v2/write as well
as simplify and clarify the error messages.
2019-09-12 13:39:24 -05:00
kelwang 63c5311494
Merge pull request #15111 from bednar/notification-endpoint
docs(http): update NotificationEndpoint swagger definition to reflect reality
2019-09-12 11:09:17 -04:00
Kelvin Wang aed8035472 fix(notification/endpoint): pagerduty clientURL should be optional 2019-09-11 15:26:50 -04:00
kelwang f9b8ae32a5
Merge pull request #15010 from influxdata/invalid_post_bucket_request
fix(http): post bucket validation.
2019-09-11 09:54:01 -04:00