Commit Graph

1685 Commits (6a99416ab2e47daa935ef2ba73d19366b2baaf2f)

Author SHA1 Message Date
Yiqun (Ethan) Zhang 41156ca646
feat(query): implement window count aggregate pushdown (#18043) 2020-05-28 13:42:38 -05:00
Jakub Bednář 96110ec5f9
fix(swagger): added missing Permission type: dbrp (#18260) 2020-05-28 11:50:48 -06:00
Alirie Gray 876238d688
feat: add feature flag for new labels service (#18215) 2020-05-28 08:26:08 -07:00
jlapacik d22380dc8b
Merge pull request #17900 from influxdata/feat/use-algo-w
chore: promote algorithm W to master
2020-05-27 10:20:03 -07:00
Russ Savage 6adb741d73
fix(swagger): update opID for post resend endpoint 2020-05-27 09:05:15 -07:00
Lyon Hill 97dc4d18db
feat: use the new tenant user handler (#18190)
Switch to use the new user handler. We have been using the tenant backend for some
time now and just need to switch over to using tenant front to back.
2020-05-27 08:48:27 -06:00
jlapacik 7db9f4c520 Merge branch 'master' into chore/merge-master 2020-05-26 10:03:42 -07:00
Pavel Zavora c35c90aa68 feat(api/health): report commit 2020-05-26 14:03:52 +02:00
Pavel Zavora 34775bcf77 fix(api/health): report version 2020-05-26 14:03:04 +02:00
Jonathan A. Sternberg 0bb847b7e7
Merge branch 'master' into feat/use-algo-w 2020-05-21 10:33:13 -05:00
Andrew Watkins d1275aaff7
feat(unify): CloudUser and Invite contract (#18167)
* feat(unify): user and invite contract

* feat(unify): add Invites schema component

* chore: lint fix
2020-05-20 11:09:00 -07:00
Jonathan A. Sternberg 0c8d19e896
Merge branch 'master' into feat/use-algo-w 2020-05-18 13:25:26 -05:00
Lyon Hill c459852f8f
feat: integrate the new session system behind a feature flag (#18042) 2020-05-18 11:50:22 -06:00
Ben Johnson 2ea1eb9491
Merge pull request #18096 from influxdata/http-check-client-disconnect
feat(http): Client disconnections should return a HTTP 499 error code.
2020-05-15 08:04:52 -06:00
Gianluca Arbezzano 1cf64fd721
feat: dbrp service
Signed-off-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
Co-Authored-By: Gianluca Arbezzano <gianarb92@gmail.com>
Co-Authored-By: George MacRorie <gmacrorie@influxdata.com>
Co-Authored-By: Alirie Gray <alirie.gray@gmail.com>
2020-05-15 12:05:38 +02:00
Ben Johnson 97960a5930 feat(http): Client disconnections should return a HTTP 499 error code.
This commit checks http.Request.Context().Err() to see if the context
has been canceled before writing an error code. It uses the non-standard
Nginx 499 error code for client disconnection.
2020-05-14 14:51:57 -06:00
George f646653b1b
refactor!: replace authorizer.Allowed method with PermissionSet (#17959)
* refactor!: replace Allow method with PermissionSet

* chore(changelog): update changelog to reflect changes to authorizer
2020-05-13 12:27:46 +01:00
Ariel Salem bf21cf86b7
fix(timeFormat-single-stat-graph): fixed issue where setting the timeFormat on single-state + graph wasn't persisted (#18066) 2020-05-12 14:51:52 -07:00
jlapacik 34e581ca0a Merge branch 'master' into chore/merge-master 2020-05-12 11:18:25 -07:00
George a8ba8be41d
fix(http): call PATCH endpoint in checks service PathCheck (#18056) 2020-05-12 19:15:37 +01:00
vlastahajek c701c19bc1 refactor: Permission.Resource made top level type 2020-05-08 14:33:50 -07:00
Alirie Gray 24cc1cabb8
feat: add feature flag for refactored authorization package (#17944) 2020-05-08 10:00:39 -07:00
Brett Buddin 229b79281b
feat(http): Allow query handlers to be proxied for Algo-W testing. 2020-05-08 09:03:21 -04:00
Brett Buddin 8c0643843f
chore(http): Let the callers convert these to http.Handler. 2020-05-08 09:02:06 -04:00
Vlasta Hajek 045f311fb3
fix: changing method of set user password to POST (#17919) (#17990) 2020-05-07 15:06:32 -07:00
Vlasta Hajek 330a3eb09b
fix: adding default handler for post on setup (#17972) (#17973) 2020-05-07 14:52:53 -07:00
Brett Buddin 9e8f5a27bc
fix(http): Make common wrapper function capable of handling nil-valued proxies.
Pipeline tests in idpe are setting up an `http.APIBackend` directly
without a constructor function. This is causing this `AlgoWProxy` field
to be `nil` when exercising end-to-end tests. This just makes the
structure a bit more defensive and falls back to using the no-op proxy
in the presence of a nil value.
2020-05-06 13:04:31 -04:00
jlapacik 4aec0dc48e Merge branch 'master' into chore/update-flux 2020-05-06 10:00:09 -07:00
Brett Buddin c5c4e71dbd
feat(http): Add ability to proxy specific API handlers for Algo-W rollout. 2020-05-06 12:30:05 -04:00
Gavin Cabbage 8af9b3c2d1
refactor(kit/feature): remove target logic; expose bykey (#17949)
* refactor(kit/feature): remove target logic; expose bykey

* refactor(kit/feature): un-variadic-ify bykey arg
2020-05-06 11:13:17 -04:00
Johnny Steenbergen 89e34365bb feat(pkger): add the ability to remove a stack and all its associated resources
closes: #17554
2020-05-05 01:35:02 -05:00
Johnny Steenbergen 95ad3c6582 feat(pkger): add the ability to remove a stack and all its associated resources
closes: #17554
2020-05-01 16:18:13 -07:00
jlapacik 83b90c3575 Merge branch 'master' into chore/merge-master 2020-04-30 14:05:51 -07:00
Johnny Steenbergen c7e97f1625 feat(pkger): add service and http server integreations for stack lists
references: #17554
2020-04-30 13:24:15 -07:00
George 67307d804e
chore(errors): interpret more cases as influxdb error type in http.CheckError (#17888) 2020-04-30 17:55:17 +01:00
jlapacik 2ef9999907 Merge branch 'master' into chore/merge-master 2020-04-30 09:53:04 -07:00
George 0996e06d5d
chore(http): stop tracing system related api paths (#17918) 2020-04-30 16:33:23 +01:00
Gavin Cabbage 95913534a0
feat(kit/feature): add feature flag package (#17851)
* feat(kit/feature): add feature flag package

* refactor(kit/feature/_codegen): simplify with fmt.Errorf

* chore(kit/feature): tidy comments
2020-04-30 11:29:43 -04:00
Alirie Gray 2c0916addf
refactor: create new token package (#17874) 2020-04-30 07:52:21 -07:00
Lyon Hill d720661e77
feat(tenant): change the tenant services default behavior to enabled (#17872)
We have reached the stage wehre the new tenant service is being used and
is stable but we want to get it in more hands and used as the default service.
2020-04-29 14:04:26 -06:00
jlapacik 457637ed22 Merge branch 'master' into chore/merge-master 2020-04-28 13:13:36 -07:00
Johnny Steenbergen af0fc05f5e fix(http): provide support for telegraf update in http client 2020-04-24 17:05:55 -07:00
jlapacik d60b877df3 Merge branch 'master' into chore/merge-master-into-algo-w 2020-04-23 11:35:57 -07:00
Lyon Hill 50b51e14b3
fix(delete): fix delete handler to add org filter for bucket lookup (#17834) 2020-04-23 08:32:50 -06:00
jlapacik 63fd3655be Merge branch 'master' into chore/merge-master-into-algo-w 2020-04-22 14:52:59 -07:00
George e150377f48
revert(tenant): integrate the tenant service as the default backend (#17805) (#17832)
This reverts commit 79e9de93cb.
2020-04-22 17:23:17 +01:00
Lyon Hill 79e9de93cb
feat(tenant): integrate the tenant service as the default backend (#17805) 2020-04-21 13:43:56 -06:00
Johnny Steenbergen d1af15c399 chore: remove extranenous fields on http.Task type
also drops a skipped test that has been skipped for over a year. Tried
unskipping it, but now it fails for all sorts of reasons, without the
race flag enabled.
2020-04-20 15:34:58 -07:00
Johnny Steenbergen e5e5500401 feat(dashboards): extend dashboard update API to take cells as a put doc operation 2020-04-20 14:04:45 -07:00
jlapacik 335968a552 Merge branch 'master' into chore/merge-master 2020-04-20 13:59:21 -07:00
Johnny Steenbergen 8251c362ee chore(pkger): refactor parser notification rule state out into stateful type
this PR also drops a bunc of dead code that was necessary for times of integration.

references: #17434
2020-04-17 14:02:29 -07:00
jlapacik 90fb7543ce Merge branch 'master' into chore/merge-master 2020-04-16 14:43:52 -07:00
Johnny Steenbergen 21694416a3 chore(pkger): refactor parser dashboard state out into stateful type
references: #17434
2020-04-16 13:27:36 -07:00
Johnny Steenbergen f084a93fa2 chore(pkger): refactor parser telegraf config state out into stateful type
references: #17434
2020-04-16 12:05:07 -07:00
Lyon Hill c02e83038f
fix: org filtering for both kv and tenant need to match behaviors. (#17758) 2020-04-16 12:22:21 -06:00
Johnny Steenbergen da2cf7e94a chore(pkger): refactor parser task state out into stateful type
references: #17434
2020-04-16 10:06:44 -07:00
Alirie Gray 4e690062cb
fix(labels): prevent adding duplicate labels to resources in kv (#17340) 2020-04-16 09:02:50 -07:00
jlapacik 7541af8414 chore: merge master into algow 2020-04-15 14:42:03 -07:00
Johnny Steenbergen 94ae519cc6 chore(pkger): refactor parser notification endpoint state out into stateful type
references: #17434
2020-04-15 14:26:25 -07:00
Pavel Závora bbfb460be5
Merge pull request #17732 from influxdata/sranka-context-aware-client-write
fix(http/write_handler): propagate context to http request
2020-04-15 07:06:43 +02:00
Johnny Steenbergen c8a79f5653 chore(pkger): refactor parser variable state out into stateful type
references: #17434
2020-04-14 16:48:56 -07:00
Johnny Steenbergen cb7f8ba521 chore(pkger): refactor parser check state out into stateful type
references: #17434
2020-04-14 15:43:50 -07:00
Johnny Steenbergen 68183bb156 chore(pkger): refactor embedded types out of stateful types 2020-04-14 14:12:23 -07:00
Johnny Steenbergen c718b676ef chore(pkger): refactor pkger data model to separate parsed and stateful datum 2020-04-14 09:28:09 -07:00
Pavel Závora 744a2c15c9
fix(http/write_handler): propagate context to http request
_http.NewRequestWithContext_ (available since golang 1.13) ensures that the supplied context also controls the entire lifetime of a request and its response.
2020-04-14 11:17:55 +02:00
Johnny Steenbergen e09d65f361 fix(swagger): fix indention problem in swagger doc
closes: #17652
2020-04-10 14:11:56 -07:00
Johnny Steenbergen cee77081b2 feat(pkger): extend tasks with unique constraints 2020-04-08 14:38:32 -07:00
Brett Buddin 6516b598c7
chore(swagger): Add "now" to the query API endpoint. 2020-04-08 13:04:25 -04:00
Brett Buddin dab8269841
fix(query): Respect the now-time of the compiled query if it's provided. 2020-04-08 11:50:47 -04:00
Gianluca Arbezzano 0a363b2ba7 feat(tracing): add userID to lookup traces
This commit adds `user_id` as a tag for traces. It helps to lookup and
filter traces we need by userID.

OrgID is harder to get right, so I will open an issue, but it will be
nice to have it in as well.

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
Co-authored-by: George MacRorie <gmacrorie@influxdata.com>
2020-04-08 14:19:05 +02:00
Alirie Gray 8975fd2365
refactor(tenant): move bucket and urm auth layers to tenant service (#17474)
Co-authored-by: Lyon Hill <lyondhill@gmail.com>
2020-04-07 11:13:27 -07:00
Ariel Salem ffa48c59b8
fix(ui): fixed dark lines in checks (#17651) 2020-04-07 10:56:55 -07:00
Lyon Hill 4421a39639
feat(tenant): Build out the onboarding system in tenant and integrate it into launcher (#17558)
We are adding in a setup/user route this is not in swagger at the moment but will be
added once we feel it is stable.
2020-04-06 15:58:15 -06:00
Jonathan A. Sternberg d3fa60991f
Merge branch 'master' into chore/merge-master 2020-04-06 12:17:47 -05:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Jonathan A. Sternberg 469c5849c4
Merge branch 'master' into feat/use-algo-w 2020-04-03 09:30:04 -05:00
Johnny Steenbergen e6317a04ee chore(pkger): refactor summary/diff types for Endpints|Checks|Variables 2020-04-02 12:35:51 -07:00
Lorenzo Affetti 13fc4f335d
test(launcher): e2e test memory limits 2020-04-02 11:20:42 +02:00
Johnny Steenbergen f5b9a30b1f feat(pkger): extend labels diff and summary types to include PkgName and Remove
the pkgName refers to the unqiue label resource within the pkg and the
Remove field indicates the label will be removed when applying the pkg
2020-04-01 14:13:45 -07:00
Johnny Steenbergen 34c3b35ca3 feat(pkger): add stack state management for buckets 2020-04-01 13:09:14 -07:00
Johnny Steenbergen 098fd27ab4 feat(pkger): extend DiffBucket with name for existing and new bucket values
provides mapping between pkgName and resource the diff represents. Now that
stacks are in place, the existing bucket may change names.
2020-03-31 13:34:40 -07:00
Lyon Hill 1a66ca3900
feat(tenant): Add in api elements to tenant service (#17447)
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>

Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2020-03-27 08:56:22 -06:00
Johnny Steenbergen 8c70dc9b23 feat(pkger): add create stack endpoint for http server 2020-03-26 12:37:43 -07:00
Ariel Salem 4f65cda351
fix(ui): fixed threshold check bug that wouldn't allow threshold checks to be created where fields had spaces in them (#17391) 2020-03-23 19:17:52 -07:00
Christopher M. Wolff 20c2439230
refactor(http): change *ast.Package to json.RawMessage in query requests (#17316) 2020-03-23 12:39:24 -07:00
Marc Delagrammatikas ea8e6d15d0 refactor: fixes typo in OnboardInitialUser method
Fixes typo introduced by 7b99c28a99
2020-03-20 10:48:20 -07:00
Marc Delagrammatikas 7b99c28a99 refactor: rename Generate to OnboardInitialUser
Renaming Generate in anticipation of a new method that will onboard
users other than the initial user. The intent is to simplify multi-user
setups.

Co-authored-by: Chris Goller <goller@gmail.com>
2020-03-18 15:35:26 -07:00
Johnny Steenbergen 97e56c0f00 fix(http): fixup logging for http middleware 2020-03-17 10:49:16 -07:00
Lorenzo Affetti 8a368fabfa
fix(http): make label service authorized by default
Fix resource type for label backends.
2020-03-16 11:32:35 +01:00
Gavin Cabbage 14ba382e4f
fix(buckets): return unauthorized if no org is found for user (#17264) 2020-03-13 15:35:33 -04:00
Alirie Gray 991002d83b
fix(labels): add check for write permissions to create label (#17174) 2020-03-12 10:51:50 -07:00
Kelvin Wang c511f06fa5 feat(cmd/influx): add profile management 2020-03-12 11:09:54 -04:00
Lorenzo Affetti 76067d548e
Merge pull request #17201 from influxdata/fix/notification-endpoint-auth
fix(authorizer): fix endpoint handler auth
2020-03-11 18:30:36 +01:00
Lorenzo Affetti 4e22b0b1af
fix(authorizer): fix endpoint handler auth 2020-03-11 18:09:53 +01:00
Gavin Cabbage f5e8547482
fix(buckets): prevent returning system buckets to unauthorized users (#17117) 2020-03-11 13:06:08 -04:00
Greg f98874566c
fix: allow authorized label service to be called indirectly (#17111)
* fix: allow authorized label service to be called indirectly

17071 exists because pkger loads all service resources as authorized on
start, resulting in them all being authorized when referenced indirectly
(not hit directly via api by consumer). Rather than restructure pkger to
only authorize direct services, this allows proper indirect auth to
labels (the cause of 17071).

* Add orgService to tests

* Add resource types to find orgID from
2020-03-11 10:58:39 -06:00
Jonathan A. Sternberg 7012470479
Merge branch 'master' into feat/use-algo-w 2020-03-10 14:52:28 -05:00
Lorenzo Affetti fd729f8a38
fix(http): refactor document service and fix auth 2020-03-09 20:32:31 +01:00
Jonathan A. Sternberg 8d2ba699a0
refactor(http): remove the spec and update lang usage (#17148)
This removes the spec and updates the lang package usage to make use of
passing in the runtime as a parameter.

It removes all direct dependendencies on the flux runtime from the http
package.
2020-03-09 13:30:43 -05:00
Jonathan A. Sternberg 0d6e4e310b
Merge branch 'master' into feat/use-algo-w 2020-03-06 16:46:49 -06:00
Jonathan A. Sternberg 834a8740e0
refactor(task/backend): move the task/backend constants to the global package (#17133)
This moves a few types and constants to the global package so it can be
used without importing the `task/backend` package. These constants are
referenced in non tasks-specific code.

This is needed to break a dependency chain where the task backend will
call into the flux runtime to perform parsing or evaluation of a script
and to prevent the http package from inheriting that dependency.
2020-03-06 16:19:32 -06:00
Johnny Steenbergen 6818925643 feat(pkger): add support for exporting all and filter by resource types
note: all associations are still included for resources that match the
filte criteria.
2020-03-06 11:51:38 -08:00
Brett Buddin de0b92ebc9
fix(http): Revert d51447fc34. 2020-03-06 12:24:12 -05:00
Jonathan A. Sternberg bcbb9df72e
refactor(task): tasks will now use the flux language service (#17104)
The tasks subsystem will now use the flux language service to parse and
evaluate flux instead of directly interacting with the parser or
runtime. This helps break the dependency on the libflux parser for the
base influxdb package.

This includes the task notification packages which were changed at the
same time.
2020-03-05 14:36:58 -06:00
Brett Buddin f897c15187
Merge pull request #17091 from influxdata/bb/require-content-type
fix(http): Require Content-Type for query endpoint
2020-03-05 12:06:48 -05:00
Alirie Gray dff47721ce
fix(secrets): wrap secrets service in authorizer (#17099) 2020-03-05 08:35:14 -08:00
Jonathan A. Sternberg a907e05426
refactor(http): modify query handler to use a language service (#17074)
The language service abstracts away the parse source which breaks the
dependency without moving any of the code.
2020-03-05 10:32:17 -06:00
Brett Buddin d51447fc34
fix(http): Require Content-Type for query endpoint. 2020-03-05 11:12:33 -05:00
Alirie Gray c4e9201859
refactor(api): add HTTPC client service to notification rules API (#17087) 2020-03-04 16:32:33 -08:00
Jorge Landivar 3c8ad39733 fix(checks): typo causing panic in checks endpoint 2020-02-28 10:54:06 -06:00
Lorenzo Affetti d4af93eec2
refactor(http): make client contain every service available, and make it more pluggable 2020-02-26 17:45:38 +01:00
Gavin Cabbage fe21b9eb88
feat(http): checks client (#16922) 2020-02-26 11:34:10 -05:00
pierwill d70076e643
fix(http): Add secure flag to session cookie (#16574) 2020-02-25 14:37:11 -08:00
Lorenzo Affetti 4a83a80784
Merge pull request #16998 from influxdata/fix/add-document-service
feat(http): add document service to http Service
2020-02-25 22:47:37 +01:00
Alirie Gray 0ed292b1be
fix(tasks): update tasks authorization (#16994) 2020-02-25 12:59:59 -08:00
Lorenzo Affetti 3171cf0656
feat(http): add document service to http Service 2020-02-25 16:22:33 +01:00
Alirie Gray 3120b4c47e
refactor(tasks): add Client to http TaskService (#16912) 2020-02-24 11:41:21 -08:00
Lorenzo Affetti 9defb8a77f
feat(http): add document service 2020-02-21 15:58:40 +01:00
tmgordeeva 890c943643
fix(backup): handle backup with no credentials file (#16877)
* fix(backup): handle backup with no credentials file

Backups and restores should work whether or not the original installation uses
a credentials file and whether or not the backup contains a credentials file.
2020-02-14 09:19:58 -08:00
George f239a2ed9c
fix(kv): remove URM and Authorizations by UserID Index (#16852)
* Revert "fix(kv): Don't stop when key not found from index."

This reverts commit bd9167d383.

* Revert "fix(kv): push down org ID to skip in delete URM (#16841)"

This reverts commit a5f508de77.

* Revert "fix(kv): delete authorization from correct index bucket (#16835)"

This reverts commit 7349216e94.

* Revert "feat(kv): Index Authorizations by User ID (#16818)"

This reverts commit df36fe957b.

* Revert "feat: add indexes to urm for user lookups (#16789)"

This reverts commit 9561d0a4f4.
2020-02-13 15:27:57 +00:00
Nathaniel Cook 03f65cf045
fix(influxql): add explicit routing to influxql service (#16832)
Prior to this change influxql requests were sent to the same back end as Flux queries.
This MAY not always be the case. Now InfluxQL queries are specifically routed to the InfluxQLService.
In the case of this OSS build the FluxService and InfluxQLService are the same.
2020-02-12 10:07:29 -07:00
Johnny Steenbergen e650c941c7 fix: remove duplicate content types from httpc requests
2 issues from investigating this error. First is the status check func
did not identify it was a media unsupported issue adn tries to unmarshal
the empty response body. The 2nd, was the double content type headers were
causing an error. Locally this error does not surface, cannot repoduce on
macos, but in cloud it is persistent.

closes: #16819
2020-02-11 11:14:44 -08:00
George df36fe957b
feat(kv): Index Authorizations by User ID (#16818)
* feat(kv): add user id index on authorizations

* chore(auths): test FindAuthorizations both with and without a populated index

* chore(kv): cleanup index skipping flag in auths service

* fix(kv): bad flag around auth by user index population

* fix(kv): auth by user index lookup use correct buckets

* chore(kv): ensure indexer is called as expected when auth user index missing

* chore(kv): add benchmarks around authorization lookup
2020-02-11 17:34:20 +00:00
kelwang 2761c1f48a
Merge pull request #16786 from influxdata/feat_cli_secret
feat(cmd/influx): add secret cli
2020-02-10 10:39:18 -07:00
Nathaniel Cook 9f7d4f9be0
feat(query): adds support for influxql as language type for queries (#16712)
This change allows for the InfluxQL language type to be used with the
/v2/query API endpoint.

This change also introduces a way to give the transpiler an explicit
bucket name instead of using the DBRPMapping service.
Requests to the endpoint will know the bucket name directly but will
likely not have run the migration step to populate the DBRP mappings.
2020-02-07 15:20:50 -07:00
Kelvin Wang e3acd7f86b feat(http): add secret service 2020-02-07 15:54:28 -05:00
Johnny Steenbergen 684f7b82ad feat(pkger): extend HTTP API to enable users to submit multiple pkgs in one call 2020-02-07 08:08:58 -08:00
Michael Desa c8edf66ee4
chore(http): export NewBucketResponse function
This function is required for maintaining a similar buckets reponse.
2020-02-06 16:01:30 -08:00
Johnny Steenbergen 64c8707594 feat(pkger): add support for env references for buckets 2020-02-04 17:00:11 -08:00
Johnny Steenbergen 8150e1b51a chore(http): refactor bkt service to use API type 2020-02-04 14:41:56 -08:00
Johnny Steenbergen 236f52ba62 fix(http): improve error handling and response to api consumer for org service 2020-02-04 09:43:51 -08:00
Johnny Steenbergen 343c9b166b chore(pkger): consolidate pkger http server into pkger
this is the last step for pkger to follow the service definition pattern
that is in the works. Some bits from http were moved into kit/transport/http
for reusability. End result is to hopefully axe http pkg for resuable types in
kit. Long ways off still...
2020-02-03 12:39:47 -08:00
Johnny Steenbergen 2b0b32abe8 chore(http): pull out eror handler into kit pkg for portability 2020-02-03 12:39:47 -08:00
Jade McGough e78be03465
Merge pull request #16527 from oiooj/pr-panic
fix(http): fix /telegrafs panics when using org=org_name parameter
2020-01-26 19:48:49 -08:00
kun 8e6ce60cf5 fix(http): fix /telegrafs panics when using org=org_name parameter 2020-01-27 11:04:11 +08:00
Johnny Steenbergen 592e9369a7 feat(pkger): add support for inspecting url paths to grab extension for pkger decoding 2020-01-23 14:14:28 -08:00
Andrew Watkins 78c1e9e19e
refactor(ui/views): normalization (#16616)
* refactor: move views logic to separate directory

* refactor: normalize views

* fix: spinners

* fix: dont render views until status is done

* fix(http/dashboards): view shape not returning from getDashboard

* test: delete irrelevant and redundant test

* fix: go tidy

* test: skipping monaco test

* chore: sort type exports

* chore: cleanup
2020-01-23 13:17:08 -08:00
Jacob Marble b836ab9c17
feat(storage): implement backup and restore (#16504)
* feat(backup): `influx backup` creates data backup

* feat(backup): initial restore work

* feat(restore): initial restore impl

Adds a restore tool which does offline restore of data and metadata.

* fix(restore): pr cleanup

* fix(restore): fix data dir creation

* fix(restore): pr cleanup

* chore: amend CHANGELOG

* fix: restore to empty dir fails differently

* feat(backup): backup and restore credentials

Saves the credentials file to backups and restores it from backups.

Additionally adds some logging for errors when fetching backup files.

* fix(restore): add missed commit

* fix(restore): pr cleanup

* fix(restore): fix default credentials restore path

* fix(backup): actually copy the credentials file for the backup

* fix: dirs get 0777, files get 0666

* fix: small review feedback

Co-authored-by: tmgordeeva <tanya@influxdata.com>
2020-01-21 14:22:45 -08:00
Andrew Watkins a4e3dce135
refactor(ui): normalize cells (#16569)
* wip: cells reducer

* wip: normalize cells

* refactor(norm): dashboards

* chore: move GetResources to resources dir

* feat: introduce GetResource component

* feat: introduce GetTimeRange component

* refactor(cells): move updateCells to cells thunks

* refactor: move clone cell

* refactor: stop passing entire dashboard to dashboard page

* chore: cleanup

* fix: overlays not rendering

* refactor: move GlobalAutoRefresh polling to container

* refactor: stop passing entire dashboard object

* fix: deletion of dashboards

* fix: runtime error and formatting
2020-01-21 10:54:24 -08:00
Lorenzo Affetti 0e0b36be0c feat(task): make task query without returning content 2020-01-17 16:51:01 +01:00
Lorenzo Affetti ceb6598cbf
Merge pull request #16548 from influxdata/feat/ret-no-cont-with-err
feat(query): add 'Prefer: return-no-content-with-error' behavior
2020-01-17 16:24:55 +01:00
Zoe Steinkamp f4ba7db697 fix: Fixing master gauge issues 2020-01-16 13:55:30 -07:00
Zoe Steinkamp cd8eeaaf95
Merge pull request #16532 from influxdata/zs-optionalsuffix15909
Zs optionalsuffix15909
2020-01-16 09:14:13 -07:00
Zoe Steinkamp 8835f4ea1d feat(ui): add the optional suffix and prefix to guage (#15909) 2020-01-16 08:40:40 -07:00
Zoe Steinkamp 9afac5bac6 feat(ui): add the optional suffix and prefix to guage (#15909) 2020-01-16 08:40:40 -07:00
Zoe Steinkamp eef22147ad fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp d8df75e6c3 fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp 030a7312eb fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp 4a17bf1424 fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp 1b4496d0fc fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Zoe Steinkamp 75e7e0d369 fix(tasks): validate check params new backend error message 2020-01-16 08:40:17 -07:00
Lorenzo Affetti 1d0ea8ab64 feat(query): add 'Prefer: return-no-content-with-error' behavior 2020-01-15 16:42:29 +01:00
Johnny Steenbergen 41beaf0bd5 fix(pkger): fixes issue where pkger can't discern the mime/content type of a package
also makes the yaml decoder the default. To foten we end up in application/octet-stream
which is the default for many different mime types. This provides a mechanism
around that so that when the automagical detection fails it can allow the user
to provide it via the CLI.
2020-01-14 15:44:48 -08:00
Stuart Carnie 1a97dcf17a
Merge pull request #16531 from influxdata/sgc/issue/5661
feat(http): Enforce limits in write handler and expose config options
2020-01-14 15:37:38 -07:00
Johnny Steenbergen 63fd1e2e9a feat(pkger): make pkger packages CRD compliant 2020-01-14 13:20:00 -08:00
Stuart Carnie 4122a5dfec
feat(http): Enforce limits in write handler and expose config options 2020-01-14 09:13:40 -07:00
Johnny Steenbergen fe12fd051e feat(pkger): add jsonnet support for package files 2020-01-13 09:55:08 -08:00
Johnny Steenbergen fdc3e7658c feat(pkger): add ability to supply a pkg from a url
the following is now possible from the CLI(same in REST API):
  influx pkg -u 1717709ffa/bucket_pkg_json
2020-01-12 07:53:58 -08:00
George 560cd3faee
fix(http): expose max batch size bytes limit open on *APIBackend (#16497) 2020-01-10 16:00:37 +00:00
George a0c18c9ef7
feat(http): add configurable limit to points batch size on write endpoint (#16469) 2020-01-10 11:02:44 +00:00
Alirie Gray 4ad9e6b6b5
fix(tasks): add content length check to decode force run request (#16458) 2020-01-08 18:55:42 -08:00
Johnny Steenbergen c8aabaf515 chore(http): fixup middleware stack and normalize metrics into same buckets for id fields 2020-01-08 15:05:34 -08:00
Lorenzo Affetti dc4900e252 feat(query): add dialect to discard output 2020-01-08 16:46:52 +01:00
Gavin Cabbage 6fe69549d4 feat(query): add source to query request via user agent header 2020-01-07 09:28:49 -05:00
Ariel Salem 4dbc7ec771
chore(ui): refactored variables client API to oats generated types and API (#16400)
chore(ui): refactored variables client API to oats generated types and API
2020-01-06 12:57:52 -08:00
Deniz Kusefoglu 219d73bf60
fix(notificationrules): Correct logic on matching notification rules (#16328)
* fix(notificationrules): Correct logic on matching notification rules

* feat(nrs): Add more tests
2019-12-31 23:44:27 +00:00
Deniz Kusefoglu fcc39e371f
feat(checks): Add custom check type (#16350)
* feat(checks): Add custom check type

* feat(checks): Remove alert builder from custom check

* feat(checks): Add AlertBuilderAction to list of possible actions

* feat(checks): Query visualization does not make sense for custom check

* feat(check): check editor should only reexecute queries if view query changes

* Update ui/src/timeMachine/components/TimeMachineFluxEditor.tsx

Co-Authored-By: Bucky Schwarz <hoorayimhelping@users.noreply.github.com>

* Address PR review

Co-authored-by: Bucky Schwarz <hoorayimhelping@users.noreply.github.com>
2019-12-31 20:21:48 +00:00
Johnny Steenbergen e6f1805e5e chore(inmem): nuke the duplicative inmem store
use kv store... its a thing
2019-12-30 11:04:45 -08:00
Johnny Steenbergen cce279a80e feat(pkger): add ability to provide secrets alongside package when applying
this provides the ability to add secret refs at runtime instead of adding
them to the pkg.
2019-12-27 12:41:42 -08:00
Ariel Salem 79c5c79286
feat(ui): added notification rule & checks last run status & error (#16338)
feat(ui): added last run status checks for notification rules and check rules, readded updateCheck to fix linter and functionality issues with program and added tests to ensure check creation and update stability
2019-12-27 10:14:34 -08:00
Johnny Steenbergen 5569193116 fix: add custom marshaler to dashboard builder config to stop breaking all external api clients with nil vals 2019-12-26 14:53:14 -08:00
Johnny Steenbergen 1c2421cb9c feat(pkger): add export support for tasks 2019-12-23 15:41:14 -08:00
Johnny Steenbergen c9431bceb8 feat(pkger): add apply functionality for task resource 2019-12-23 13:56:42 -08:00
Johnny Steenbergen 8e87498317 feat(pkger): add dry run functionality for task resource 2019-12-23 11:40:28 -08:00
Johnny Steenbergen af5b7fd7d3 feat(pkger): add export support for notification rules 2019-12-21 14:58:02 -08:00
Greg abd8ce0089
feat(http): add functionality to retrieve/store telegraf config as toml (#16132) 2019-12-20 14:20:13 -07:00
Johnny Steenbergen 61dceaa727 feat(pkger): add application functionality for the notification rules resource 2019-12-20 12:48:46 -08:00
Johnny Steenbergen 02aec6ed29 feat(pkger): add dry run functionality for notification rules 2019-12-19 16:31:22 -08:00
Johnny Steenbergen a8a4d3d0b2 feat(pkger): add export functionality to checks resource 2019-12-18 17:52:28 -08:00
Johnny Steenbergen 677e836bf4 feat(pkger): add apply functionality for checks
this work is to support pkger, but was able to add back in the
skipped tests. seeing failures upstream, and didn't catch it in
influxdb b/c the tests were being skipped.

closes: #14799
2019-12-18 15:02:03 -08:00
Johnny Steenbergen 1db3256980 feat(pkger): add check dry run functionality 2019-12-18 12:15:08 -08:00
Johnny Steenbergen 13ac83e0c4 chore: refactor bits of checks and its dependencies for readability 2019-12-18 11:07:19 -08:00
George ff38420558
feat(tasks): remove flux stats from run log and replace with trace id (#16263)
* feat(tasks): trace id in task run logs

* refactor(tracing): move trace info utility into kit/tracing package
2019-12-18 16:30:38 +01:00
Johnny Steenbergen 213cdf58a9 chore(http): cleanup http pkg's check implementation cruft 2019-12-17 21:49:34 -08:00
Greg 41e771a464
feat(http): expose list of available telegraf plugins (#16233) 2019-12-17 16:53:19 -07:00
Johnny Steenbergen 2fb1a5d3eb chore(http): refactor source http service client to use httpc.Client 2019-12-17 13:19:33 -08:00
Johnny Steenbergen f527636fe0 chore(http): refactor user http service to use the httpc.Client 2019-12-17 12:49:14 -08:00
Johnny Steenbergen 1c2b900687 chore(http): refactor auth service http client to use httpc.Client
normalizing the auth service http client to follow suit with other services.
2019-12-17 12:18:16 -08:00
Johnny Steenbergen d42bbb3c64 feat(pkger): add support for exporting notification endpoints 2019-12-17 11:33:34 -08:00
Johnny Steenbergen b8652ee178 feat(pkger): add support for secret references to notification endpoints parsing 2019-12-17 11:33:34 -08:00
Johnny Steenbergen a6e768dc7c chore: refactor notication endpoints to make a service out of notification endpoints
this is a blocker for anyone who hits the endpoint services internally. They
had to know that they need to also know of hte secret service then do all that
put/delete alongside the operation. This makes that unified inside the store tx.

one other thing this does is make obvious the dependencies that
notification services has. In this case it is the secrets service it
depends on.
2019-12-17 10:49:06 -08:00
Yiqun Zhang 3f9c2783b9
build: using libflux in OSS 2019-12-16 11:09:39 -05:00
Johnny Steenbergen 88468822e2 feat(testttp): extend testttp with new JSON methods and refactors test to use it 2019-12-13 14:07:11 -08:00
Johnny Steenbergen 39e89eafdf chore(pkger): utilize http client for integration tests for pkger 2019-12-13 09:46:01 -08:00
Johnny Steenbergen 86a359f34b chore(http): refactor http layer to be able to encode/decode influxdb.ID's safely
noticed that I had not used the http server as the entry point for server tests.
This was work to make that happen. Along the way, found a bunch of issues I hadn't
seen before 🤦. There are a number of changes tucked away inside the
other types, that make it possible to encode/decode a type with zero value for
influxdb.ID.
2019-12-13 09:46:01 -08:00
Yiqun Zhang 4ea8d01a23 fix: test baseline to use rust parser! 2019-12-13 11:51:49 -05:00
Johnny Steenbergen bf86cce1f1 feat(httpc): extend httpc Client with JSON shorthand methods
making most common API calls super easy to get up and running
2019-12-12 07:44:31 -08:00
Johnny Steenbergen 3daaa4d307 feat(pkger): add apply functionality for notification endpoints kind 2019-12-11 15:13:42 -08:00
Johnny Steenbergen 69d7eb4455 feat(pkger): add notification endpoint dry run functionality 2019-12-11 15:13:42 -08:00
Johnny Steenbergen 8729cd0959 chore(http): refactor api handler take advantage of route tree instead of switch statement
is very much WIP at this point
2019-12-11 09:53:29 -08:00
Yiqun Zhang f6df30adac
build(flux): update Flux to v0.57.0 2019-12-11 11:19:05 -05:00
Gavin Cabbage 43ff4abffd feat(query): add trace response headers 2019-12-11 09:10:21 -05:00
Jakub Bednář 3e33a03ae1
fix(http): update swagger for easily use in clients (#16067)
* added date-time format for start and stop DeletePredicateRequest
* fixed malformed reference to ViewProperties in PkgChart model
* define separate model for RetentionRule as is in Organizations, Buckets, Labels
* "labels" property from Check and PostCheck should be part of CheckBase (it is ancestor for all Check types)
* "labels" property from NotificationRule and PostNotificationRule should be part of NotificationRuleBase (it is ancestor for all NotificationRule and types)
* "labels" property from NotificationEndpoint and PostNotificationEndpoint should be part of NotificationEndpointBase (it is ancestor for all NotificationEndpoint and types)
* The url property of HTTPNotificationRuleBase should not be required
* Added query link for CheckBase and NotificationRuleBase
2019-12-11 11:24:04 +01:00
Johnny Steenbergen b2ea95f512 feat(http): add notification endpoint service
note: tests are seriously borked here. Cannot reuse any existing testing
as the setup is very particular and the http layer doesn't suppport everyting.
that being said, there are goign to be implicit testing in the
`launcher/pkger_test.go` file. This feels broken, and probably needs to be
readdressed before we GA a 2.0 influxdb....
2019-12-10 12:40:17 -08:00
Jonathan A. Sternberg 791cf15cd3
build(flux): update Flux to v0.57.0 2019-12-10 13:26:10 -06:00
Johnny Steenbergen 417d25537f chore(http): refactor org service to use httpc client 2019-12-10 10:49:22 -08:00
Gavin Cabbage f1975bb268 refactor(logger): use TraceInfo in TraceFields 2019-12-10 09:06:33 -05:00
Gavin Cabbage 5c9c31f3ab feat(query): capture query handler error in trace log 2019-12-10 09:06:33 -05:00
Gavin Cabbage b7c2c997d2 feat(query): annotate logger with trace id 2019-12-10 09:06:33 -05:00
Johnny Steenbergen c24137d9ef fix(http): fixes resource type on variables handler, was incorrect beforehand 2019-12-09 17:47:31 -08:00
Johnny Steenbergen 5cc02de988 feat(httpc): add httpc pkg to resuse code for http client type 2019-12-09 12:17:22 -08:00
Johnny Steenbergen ad841608ca chore(http): refactor bucket|dashboard|label|umr|var http clients to use reusable HTTP client
this is a step towards providing a shared http client that manages  pooling connections,
timeouts, and reducing GC for by not creating/GCing a client each req. Bring on the red!
2019-12-09 09:44:41 -08:00
Johnny Steenbergen 0225160814 fix(http): provides a reusable http client instead of creating/GCing one each time 2019-12-06 18:15:35 -08:00
Ariel Salem 08d8efbaec
feat(ui): added date/time format for graphs (#16148)
* feat(ui): added date/time format for graphs

* fix(ui): removed unnecessary console.log

* feat(ui): updated BE models to reflect necessary updates to structs

* fix(dashboard): updated failing gotests
2019-12-06 12:03:55 -08:00
Deary Hudson III a6941648d2
feat(pkger): pkger to use updated dashboard params (#16142) 2019-12-06 11:13:06 -06:00
Johnny Steenbergen ea67663ab7 fix(pkger): cleanup leftover bits from telegraf and label mapping misses
telegraf was not being mapped correctly for applying the label mapppings
and touched up a bunch of other issues that came up along the way.
2019-12-06 08:51:32 -08:00
Chris Goller 011773ada0
fix(http): remove authorization and user-agent headers from tr… (#16139)
fix(http): remove authorization and user-agent headers from trace
2019-12-05 12:27:15 -06:00
Johnny Steenbergen c76babdce6 feat(pkger): add support for exporting telegraf 2019-12-05 09:58:44 -08:00
Chris Goller 5519faa697
fix(http): remove authorization and user-agent headers from trace
Now, traces will have all headers except authorization and user-agent.
Additionally, I've removed the referer and remoteaddr as they did not
contribute much.

Eventually, this may change to just a small set of headers to record.
2019-12-05 11:30:29 -06:00
Nathaniel Cook 423dc9703c
fix(http/bucket): lift bucket name validation to http layer (#16125)
This removes the bucket name validation from the KV BucketService,
and moves it to the http implementation of the service.
The effect is that API user requests still get validated but direct KV access does not
2019-12-05 10:30:08 -07:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* chore: Remove several instances of WithLogger

* chore: unexport Logger fields

* chore: unexport some more Logger fields

* chore: go fmt

chore: fix test

chore: s/logger/log

chore: fix test

chore: revert http.Handler.Handler constructor initialization

* refactor: integrate review feedback, fix all test nop loggers

* refactor: capitalize all log messages

* refactor: rename two logger to log
2019-12-04 15:10:23 -08:00
Chris Goller 27e2531b0a
refactor: add more tracing information to writes (#16118)
refactor: add more tracing information to writes
2019-12-04 16:07:57 -06:00
Johnny Steenbergen 695211aeda feat(pkger): add dry run and apply functionality for telegraf resources 2019-12-04 13:50:42 -08:00
Jakub Bednář f25fe8c5a2 fix(http): Return an empty array if organization has no secret keys (#15363)
* fix(http): Return an empty array if organization has no secret keys

* fix(http): Return an empty array if organization has no secret keys instead nil
2019-12-04 13:29:05 -08:00
Jakub Bednář 01452752ec fix(http): remove a HTTPNotificationRuleBase.url from required properties (#15322) 2019-12-04 13:28:29 -08:00
Chris Goller 632b93ac6b
refactor(http): normalize user-agent names
User-Agent cardinality is unbounded; this attempts to
decrease the number quite a bit.
2019-12-04 15:02:00 -06:00
Deary Hudson III ad961669ae
feat(http): create cell view properties on dashboard creation (#16112) 2019-12-04 13:47:25 -06:00
Edd Robinson d367aee428 refactor: add more tracing information to writes 2019-12-04 18:50:26 +00:00
Michael Desa 1be8c8025a
Merge pull request #16100 from nwneisen/remove-source-endpoint
chore: remove "/sources" endpoint
2019-12-04 11:10:59 -05:00
nwneisen c315c237b5
chore: remove sources and fix resulting breaks
Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-12-04 08:42:42 -07:00
Johnny Steenbergen 5049850cdc fix: broken tests in dashboard http tests 2019-12-03 17:19:03 -08:00
Timmy Luong cf96cc4a84 feat(ui): add positioning option to line graphs 2019-12-03 16:10:50 -08:00
Deary Hudson III e21ebeb30e
feat(http): add cell properties to GET /dashboards/:dashboardID response
issue #16057
2019-12-03 15:45:57 -06:00
Alirie Gray 9417936069
feat(tasks): add ability to filter by active tasks (#15893) 2019-12-02 14:16:10 -08:00
Lyon Hill 997168c0be
fix(endpoint): when looking up a endpoint we should allow org only lookup (#16050)
* fix(endpoint): when looking up a endpoint we should allow org only lookup

In the current system the api always adds "UserID" to the filter. This only
allows the system to look up endpoints that user created. The behavior should be
that we filter based on user input and use authorizor to hide things they shouldn't see.
2019-11-27 09:09:36 -07:00
Bucky Schwarz a90899ebf2 chore(ui): add filter and group concepts to tags in redux 2019-11-26 12:34:07 -08:00
George 3dbb9c0fd2
feat(tracing): dont trace spans with full request paths as operation name in ExtractFromHTTPRequest (#15971)
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest

* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
2019-11-25 15:22:19 +01:00
Johnny Steenbergen 988fd0ae80 chore(pkger): refactor diff into common types for easier access 2019-11-22 16:09:23 -08:00
Lyon Hill c8de76eaf9 fix(jwt): allow jwt's to be used in query proxy calls (#16010) 2019-11-22 10:12:36 +01:00
Johnny Steenbergen 4d0e0ba1a4 chore(pkger): fixing up the pkger parse error to respect the initial Error call
the errors changed during the pkger http server error improvements and this
fixes it to be similar to what it once was, only now its in a flatter fashion
very similar to the pkger http server apply response.
2019-11-21 17:37:14 -08:00
Johnny Steenbergen 9c525ad413 feat(pkger): add ability to export all and defined list of resources via influx cli to a package
refers: #15921
2019-11-21 10:55:12 -08:00
Scott Anderson b157148472
[chore/swagger] updated summaries and descriptions in swagger.yml (#15994) 2019-11-20 16:33:34 -07:00
Johnny Steenbergen dc2d931f00 feat: add support for setting password and org for a new user in the cli
one thing to note here is that new endpoint was created. there was no
endpoint for setting an initial password that worked. The existin endpoint
was a bit messy and coupled across multiple routes. Having multiple auth
schemes proved incredibly taxing to write against.
2019-11-20 09:16:31 -08:00
Johnny Steenbergen bc083e169c chore: refactor password service to provide userID instead of name 2019-11-20 09:16:31 -08:00
Johnny Steenbergen 1a28a3256e feat(pkger): extend apply HTTP API to return parse err with 422 resp 2019-11-14 12:11:13 -08:00
Johnny Steenbergen d08ebf8658 feat(pkger): improve error handling for parser 2019-11-14 08:32:52 -08:00
Alirie Gray f0ecc0e89d
refactor(tasks): use go Time for Task CreatedAt, UpdatedAt, LatestCompleted, Offset (#15672) 2019-11-12 17:13:56 -08:00
Johnny Steenbergen f6dbfec346 feat: import jsteenb2/testttp directly into pkg 2019-11-12 14:14:40 -08:00
Johnny Steenbergen b58e7947b1 feat(pkger): add support for exporting resource associations
also adds some extra user friendliness. it sorts the pkg created via an
export by resource kinds. It also titles the kinds to make them match the
documentation even though the kind is case insensitive. Easier to read this
way.
2019-11-11 08:51:54 -08:00
Johnny Steenbergen a64b976561 feat(pkger): add export functonality to pkger for existing buckets/labels/dashboards
no associations included at this time. Also fixes http response to be just
the pkg without the envelope. Having that envelope makes the API icky to
work with from any shell script or just saving it to file. This feels more
organic to just drop that envelope.
2019-11-08 16:55:24 -08:00