Commit Graph

618 Commits (25738db42c29f3fd3e9257916561a53b065d30c7)

Author SHA1 Message Date
Johnny Steenbergen 72906a4484 feat(pkger): add support for stateful label mappings
references: #17434
2020-04-24 17:05:55 -07:00
jlapacik 3079d2a8aa Merge branch 'master' into chore/merge-master-into-algo-w 2020-04-24 14:21:26 -07:00
Johnny Steenbergen 1ac383de66 fix(launcher): removed timed contexts for launcher pkger tests 2020-04-24 10:52:50 -07:00
Johnny Steenbergen 3acd860563 feat(pkger): add stateful management for notification rules
references: #17434
2020-04-23 11:47:32 -07: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
Johnny Steenbergen 47e5facc81 feat(pkger): add stateful management for telegraf configs 2020-04-21 15:47:49 -07: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 596d8fde45 feat(pkger): add stateful management for tasks
notes on this commit. This commit was grueling ;-(. The task API is not a friendly
API to consume. There are a lot of non obvious things going on and almost every
one of them tripped me up. Things of note:

* the http.TaskService does not satisfy the influxdb.TaskService,
  making it impossible to use as a dependency if tasks service gets
  split out
* the APIs for create and update do not share common types. For example:
  creating a task takes every field as a string, but in the update it is
  taken as a options.Duration type. A step further and you'll notice that
  create does not need an option to be provided, but the update does. Its
  jarring trying to understand the indirection here. I struggled mightily
  trying to make sense of it all with the indirection and differing types.
  Made for a very difficult task (no pun intended) when it should have been
  trivial. Opportunity here to fix these up and make this API more uniform
  and remove unneccesary complexity like the options type.
* Nested IDs that get marshaled, are no bueno when you want to marshal a task
  that does not have an ID in it, for either user/org/or self IDs. Its a challenge
  just to do that.
* Lots of logs in the kv.Task portion where we hit errors and log and others where
  we return. It isn't clear what is happening. The kv implementation is also very
  procedural, and I found myself bouncing around like a ping pong ball trying to
  make heads or tails of it.
* There is auth buried deep inside the kv.Task implementation that kept throwing me
  off b/c it kept throwing errors, instead of warns. I assume, not sure if I'm
  correct on this, but that the stuff being logged is determined inconsequential
  to the task working. I had lots of errors from the auth buried in there, and hadn't
  a clue what to make of it....

leaving these notes here as a look back at why working with tasks is so
difficult. This API can improve dramatically. I spent 5x the time trying
to figure out how to use the task API, in procedural calls, than I did
writing the business logic to consume it.... that's a scary realization ;-(

references: #17434
2020-04-21 09:14:20 -07: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 c483aec2d2 feat(pkger): add stateful management for dashboards 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 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
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 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
Lorenzo Affetti 6967cc2d58
fix(launcher): se default memory limit for query to unlimited 2020-04-10 21:33:45 +02:00
Johnny Steenbergen dd432360cc feat(pkger): update notification rule with unique constraints 2020-04-08 10:36:21 -07: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
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
Johnny Steenbergen c245f3233b chore(pkger): add stack state management for notification endpoints 2020-04-06 14:56:56 -07:00
Johnny Steenbergen 1e19f38502 chore(pkger): add stack state management for variables 2020-04-06 10:22:55 -07: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 21d2bf5dc6 chore(pkger): add stack state management for checks 2020-04-02 16:32:20 -07:00
Johnny Steenbergen 762e9a422e feat(pkger): add stack state management for labels 2020-04-02 09:03:59 -07:00
Lorenzo Affetti 13fc4f335d
test(launcher): e2e test memory limits 2020-04-02 11:20:42 +02:00
Johnny Steenbergen 34c3b35ca3 feat(pkger): add stack state management for buckets 2020-04-01 13:09:14 -07:00
Brett Buddin 3d826d96cf
feat(influxd): flag to disable scheduling of tasks 2020-03-27 12:52:07 -04:00
Johnny Steenbergen 37646464b3 feat(pkger): add stack init cmd to influx cli
closes: #17235
2020-03-27 08:32:58 -07:00
Johnny Steenbergen 8c70dc9b23 feat(pkger): add create stack endpoint for http server 2020-03-26 12:37:43 -07:00
Johnny Steenbergen 7a24e450c1 feat(pkger): add auth for pkger stack CRUDing
adds new AuthAgent type that can be reused across service middleware.
2020-03-26 10:11:59 -07:00
Lorenzo Affetti 1e36e7b3ad
feat(tenant): add duplicate read service 2020-03-25 12:06:28 +01: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
Johnny Steenbergen e116ecaf5e feat(pkger): add CRUD store implmentation 2020-03-20 10:15:02 -07:00
Johnny Steenbergen 2d1186a696 feat(pkger): add human readable random names to pkg resource metadata.name field one export 2020-03-20 08:18:04 -07:00
Johnny Steenbergen 8d546f4197 feat(pkger): extend tasks with ability to define and rename it
closes: #17233
2020-03-19 10:50:53 -07:00
Johnny Steenbergen 51b0b9f681 feat(pkger): extend notification rules with ability to define and rename it 2020-03-19 08:59:07 -07:00
Johnny Steenbergen c6f4d3992e feat(pkger): extend dashboard to be able to define and rename it 2020-03-18 17:02:35 -07:00
Marc Delagrammatikas b73effebb2
Merge pull request #17344 from influxdata/refactor/onboarding
refactor: rename Generate to OnboardInitialUser
2020-03-18 16:40:25 -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 b3927f4945 feat(pkger): extend telegraf configs to be able to define a config and rename it 2020-03-18 15:14:48 -07:00
Edd Robinson d96cbd4f74
Merge pull request #17016 from influxdata/er-bulk-import
feat(storage): prototype 1.x–2.x migration tooling
2020-03-18 17:57:26 +00:00
Johnny Steenbergen 5711415b78 feat(pkger): extend variables to be able to define a variable and rename it 2020-03-17 12:32:19 -07:00
Johnny Steenbergen 136822da51 feat(pkger): extend endpoints to be able to define a endpoint and rename it 2020-03-17 11:31:33 -07:00
Johnny Steenbergen 43de2fb4e8 feat(pkger): extend checks to be able to define a check and rename it 2020-03-17 08:16:04 -07:00
Johnny Steenbergen de32cf94d0 feat(pkger): extend labels to be able to define a label and rename it 2020-03-16 16:20:42 -07:00
Johnny Steenbergen 952d7d7528 feat(pkger): extend buckets to be able to define a bucket and rename it
this work is the first of making resources ALL unique by metadata.name. The
displayName is a means to rename an existing resource. This is all to support
pkger idempotency. The metadata.name field will be the unique identifier within
a pkg.
2020-03-16 14:18:30 -07:00
Edd Robinson d6a22c196a refactor: add some links to current issues 2020-03-13 15:24:51 +00:00
Edd Robinson bbe40aeb82 feat: prototype 1.x - 2.x migration tool 2020-03-13 11:00:28 +00:00
Jacob Marble 26ca766459
refactor(tsdb): move series file to its own package (#17224)
* refactor(storage): move type ByTagKey to the only package that uses it

* refactor(tsdb): use types in tsdb/cursors

* refactor(tsdb): remove unused type SeriesIDElems

* refactor(tsdb): inline only use of tsdb.ReadAllSeriesIDIterator

* refactor(tsdb): move series file to its own package

* refactor(storage): remove platform->influxdb aliases
2020-03-12 11:32:52 -07:00
Ben Johnson 627b6f86bb feat(storage): Series file compaction 2020-03-11 19:31:58 -06: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
Sebastian Borza a50e69451e
feat(storageflux): move flux components out to separate package 2020-03-10 17:54:04 -05:00
Jonathan A. Sternberg 4d683859e9
Merge branch 'master' into feat/use-algo-w 2020-03-09 13:31:46 -05:00
Johnny Steenbergen de24c0e813 feat(influx): extend pkg export all cmd to allow for filtering of output
currently, support by filtering labelName and or by resource kind

closes: #17029
2020-03-09 09:27:01 -07:00
Johnny Steenbergen 1c9fd705a3 feat(pkger): add support for exporting org resources filtered by label 2020-03-06 14:51:01 -08:00
Jonathan A. Sternberg 0d6e4e310b
Merge branch 'master' into feat/use-algo-w 2020-03-06 16:46:49 -06:00
Jacob Marble 39b7c2ab76
refactor(storage): export IndexSeriesCursor (#17134)
* refactor(storage): add readSource field accessors

* refactor(storage): remove unused limitSeriesCursor

* refactor(storage): export IndexSeriesCursor

This allows IDPE to use the same implementation, rather than duplicate
code. Also copied unit tests from IDPE.

* chore: go fmt
2020-03-06 14:05:03 -08: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
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
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
Johnny Steenbergen fca4e13255 fix(pkger): fix issue with imports causing option task to be injected at wrong point
closes: #17069
2020-03-02 15:19:54 -08:00
Jacob Marble 83818e9592
fix(storage): incremental improvments (#17011)
* fix(storage): simplify storage/seriesCursor

storage/seriesCursor releases series file and TSI references sooner.

Remove unhelpful request object, inherited from 1.x

* chore(storage): replace SeriesCursor interface with sole implementation
2020-02-28 11:12:43 -08:00
Johnny Steenbergen 46758e3370 fix(pkger): correct the export of tasks to include system type tasks
wrong assumption in original design. The system tasks are actually
the CRUD tasks. Name is a bit confusing for user generated tasks.

closes: #17038
2020-02-27 17:16:12 -08:00
Jonathan A. Sternberg 935180e9bd
refactor: update flux for the runtime package (#17002) 2020-02-27 11:31:45 -06:00
jlapacik 2c184ead7f chore: update flux dependency and unskip notification tests
Fixes https://github.com/influxdata/influxdb/issues/16809.
2020-02-21 14:58:41 -08:00
jlapacik 766aa231b5 chore: update flux dependency
Fixes https://github.com/influxdata/influxdb/issues/16810.
2020-02-21 14:03:02 -08: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
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
Christopher M. Wolff d6766962d1
test(query): skip tests that are not passing in feat/use-algo-w (#16813) 2020-02-11 15:02:26 -08:00
Stephanie Engel 1d0afefc4e
refactor: update restore cli flag descriptions (#16799) 2020-02-10 12:07:55 -06:00
Johnny Steenbergen 7cf6167356 feat(influx): extend pkg command with providing env ref entries
this also extend dry run to provide env refs to it. the refactoring was
to enable that bit. Having the ability to dry run with the env ref entries
means we can dry run the pkg with the env ref values to see the impact before
the application takes place.
2020-02-06 08:48:05 -08:00
Johnny Steenbergen bbdd6bf7fc feat(pkger): add env refs for associations 2020-02-05 09:48:50 -08:00
Johnny Steenbergen 036ba49e12 feat(pkger): add env ref fields for remaining resources 2020-02-05 07:47:12 -08:00
Johnny Steenbergen 64c8707594 feat(pkger): add support for env references for buckets 2020-02-04 17:00:11 -08:00
Johnny Steenbergen 9ee07b097c chore(pkger): refactor http server to use new http.API type 2020-02-04 10:42:54 -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
Johnny Steenbergen f9ed0ccb82 feat(pkger): add metrics svc middleware 2020-02-03 11:07:46 -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
Johnny Steenbergen 93c8a2a104 feat(pkger): add service logging and tracing middlewares 2020-01-15 12:00:59 -08:00
Johnny Steenbergen 63fd1e2e9a feat(pkger): make pkger packages CRD compliant 2020-01-14 13:20:00 -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
Yiqun Zhang 74ba877cb9
feat: opentracing in query execution runtime 2020-01-08 11:16:13 -05:00
Alirie Gray 6c6bd39ffc
refactor(tasks): remove dead scheduler code (#16252) 2020-01-02 11:41:21 -08:00
Jacob Marble 047afcfc10
fix(tests): make sure NATS port is open for unit tests (#16310)
* fix(tests): make sure NATS port is open for unit tests

Fixes #10628 again

* chore: add comment re possible race
2020-01-02 11:05:56 -08:00
Greg b2531c1f97
fix: improve date in `version` command (#16365)
set date in go like a sane person
2019-12-30 17:56:58 -07:00
Greg 56973b8dc5
fix: add 'version' command to match github bug report template (#15629) 2019-12-30 12:53:52 -07: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 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
Johnny Steenbergen 39e89eafdf chore(pkger): utilize http client for integration tests for pkger 2019-12-13 09:46:01 -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
Alirie Gray b5ccad3c07
feat(metrics): add run latency to executor metrics (#16190) 2019-12-11 14:50:32 -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 521ce543eb fix(pkger): fix flaky test in pkger service tests
tests failign from a data race caused in the tests setup. an incrementing
const needs something to serialzie it (atmoic in this case) to remove that
data race. This touches that up.
2019-12-09 08:59:44 -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
Johnny Steenbergen ed974ba50a fix(pkger): add telegraf to launcher for public api support 2019-12-06 09:05:51 -08: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
Johnny Steenbergen c76babdce6 feat(pkger): add support for exporting telegraf 2019-12-05 09:58:44 -08: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
Johnny Steenbergen 695211aeda feat(pkger): add dry run and apply functionality for telegraf resources 2019-12-04 13:50:42 -08:00
Chris Goller da2edb88bb fix(cmd/influxd): add mutex for open/close of temp engine 2019-11-20 16:39:47 -06:00
Chris Goller 0f5df301ca refactor(storage/readservice): rename View interface to Viewer 2019-11-20 16:10:37 -06:00
Chris Goller 354b58005f fix(cmd/influxd): prefix temporary engine dir with e2e 2019-11-20 16:04:27 -06:00
Chris Goller f9c5021782 feat(influxd/launcher): add tmp filesystem backed engine for e2e 2019-11-20 15:54:32 -06:00
Johnny Steenbergen 4036e6c426 feat(pkger): add authentication to service dependencies for pkger
closes: #15897
2019-11-20 11:12:14 -08:00
Johnny Steenbergen 1c6d499711 feat(pkger): extend integration tests to include rollback functionality 2019-11-13 10:45:02 -08:00
Johnny Steenbergen e26b21e261 chore(pkger): add integration tests for pkger service
these tests supply coverage for the happy path of the pkger service
behavior.
2019-11-12 14:05:07 -08:00
Johnny Steenbergen 5eb29e9ed9 feat(pkger): add label associations to variables 2019-11-07 12:33:20 -08:00
Johnny Steenbergen 2090afa5fd chore(pkger): move pkger http server to http pkg 2019-11-07 09:44:24 -08:00
Johnny Steenbergen 2902638c8a feat(pkger): add pgker http server to the api handler 2019-11-07 09:44:24 -08:00
docmerlin (j. Emrys Landivar) 6feae8f3ce feat(tasks): fixes for changeover 2019-10-29 10:36:47 -05:00
docmerlin (j. Emrys Landivar) aa5b094c8d refactor(task): feature flag for nw scheduler 2019-10-29 10:36:47 -05:00
Julius Volz e4558257e3 test(query): add PromQL end-to-end tests in go submodule
Signed-off-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>

move to internal

update flux to v0.50

Revert "move to internal"

This reverts commit bcd4caffbd44135f1dbeac4163cb2a22a751f45a.

promtests/internal --> internal/promtests
2019-10-28 18:59:50 +01:00
Johnny Steenbergen 1e69c517b4
Merge pull request #15526 from influxdata/4447/fix_vault_flag_names
fix(vault): rename flags to match env vars and add missing token flag
2019-10-21 16:15:57 -07:00
Brandon Farmer ea82dc3470 fix(tasks): tasks look up system bucket id 2019-10-21 14:48:47 -07:00
Johnny Steenbergen 1bacb62b3a fix(vault): rename flags to match env vars and add missing token flag
the flags have to match the flags with the exception of beign lower case and
all `_` be changed to `-` in the flag. This is a result of using the cobra
flag to env var mapping with the `-` replaced to `_`.
2019-10-21 13:23:54 -07:00
Kelvin Wang 449bbd3fb0 feat(cmd/influxd): add deleteservice to launcher 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
David McKay 647e179453 feat(tls): add options to run HTTP over TLS 2019-10-17 23:35:04 +01:00
Johnny Steenbergen cf2f785803 feat(vault): add flags to influxd for vault configuration 2019-10-16 09:41:51 -07: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
Lyon Hill 5e1d7f6c69
feat(task): remove preauth (#15286)
* feat(task): remove preauth

* fix(task): remove e2e test that verified preauth
2019-09-26 10:52:24 -06:00
Christopher Wolff 26dbd9225c feat(query/stdlib/experimental): add experimental.to() implementation to OSS 2019-09-20 14:31:58 -07:00
Lorenzo Affetti ab835c8e0e
refactor(dependencies): use new dependency injection framework (#15174)
refactor(dependencies): use new dependency injection framework
2019-09-19 17:01:17 +02:00
Edd Robinson 080943a9f5 fix(tests): ensure NATS server port free 2019-09-13 19:33:19 +01:00
Edd Robinson 65cb8b606e
Merge pull request #15132 from influxdata/er-build-tsi
feat(tools): add build-tsi tool
2019-09-13 17:40:24 +01:00
Ben Johnson ee3cf79ae7
fix(tsdb): Fix pull request feedback. 2019-09-13 10:00:54 -06:00
Ben Johnson d08403b658
feat(tsdb): Add SQL export for TSI indexes 2019-09-13 10:00:54 -06:00
Edd Robinson 4a2db1ec5f feat(inspect): add build-tsi tool 2019-09-13 16:38:05 +01:00
Edd Robinson d681955a84 refactor: imports 2019-09-13 16:38:05 +01:00
zhulongcheng dffca8f4fe chore(cmd): replace bolt.Client with kv.Service (#14726) 2019-09-12 10:26:25 -07:00
Jonathan A. Sternberg ae780ff468
tests(cmd/influxd/launcher): add a launcher test for the secret service (#14813)
The secret service is tested by creating a secret and then attempting to
use it in a flux query. There is one test where accessing the secret
should work and one where it should return that the action is forbidden.
2019-08-27 10:44:46 -05:00
Lyon Hill ee9e622c6d
feat(task): Add task middleware's for checks and notifications (#14809)
To have checks and notifications happen transactionally we need to be
able to alert the task system when a new task was created using the checks and notifications systems.
These two new middlewares allow us to inform the task system of a update
to a task that was created through the check or notification systems.
2019-08-26 16:54:52 -06:00
Adam 945b68b8fd fix(query): finish refactoring the repl and inject the secret service as a dependency 2019-08-26 16:46:17 -06:00
Max U 36d3a6ea82 refactor(tsi1): address comments to clean up tool 2019-08-23 14:08:00 -07:00
Max U b2b4892918 refactor(inspect): make flags less vague 2019-08-23 14:07:30 -07:00
Max U 9fc99c2724 feat(tsi1): port the dump-tsi tool to 2.x 2019-08-23 14:07:30 -07:00
Adam Perlin 76dbc44e3c
feat(storage): Add influxd inspect dumpwal tool (#14237)
* feat(storage/wal/dump): initial influxd inspect dumptsmwal implementation

* feat(storage/wal/dump): add org bucket formatting to dumpwal tool; improve test cases

* refactor(storage/wal/dump): add long description for dumpstmwal tool

* refactor(storage/wal/dump): rename dumptsmwal flag

* chore(storage/wal/dump): gofmt

* refactor(storage/wal/dump): update error printing in dumptsmwal tool

* refactor(storage/wal/dump): address review comments

* refactor(storage/wal/dump): rename dumpwal command source file

* refactor(storage/wal/dump): clarify print flag comment

* refactor(inspect): remote unnecessary for-loop in influxd inspect command
2019-08-23 13:05:06 -07:00
George 0cc9caa1d4
refactor(tasks): separate coordinator and middleware (#14779) 2019-08-23 19:05:13 +00:00
maxunt 6ffbab89d4
Merge pull request #14316 from influxdata/mu-verify-series-2.x
feat(inspect): add verify-seriesfile tool to 2.x
2019-08-23 11:40:39 -07:00
Max U 6d361201d3 refactor(inspect): add shorthand for command line args 2019-08-22 11:01:02 -07:00
Max U 1ce93f0ca4 refactor(inspect): address config changes 2019-08-22 11:01:02 -07:00
Nathaniel Cook 6f5c81f0dc feat(inspect): add verify-seriesfile to 2.x 2019-08-22 11:01:02 -07:00
Max U ed7b88525b fix(launcher): print inspect as a subcommand when running with --help flag 2019-08-21 16:15:30 -07:00
Kelvin Wang 64e42271be feat(cmd/launcher): add notification endpoint 2019-08-15 21:56:24 -04:00
maxunt 757fb4f80c
Merge pull request #14280 from influxdata/er-rename
feat(fs): API for replacing os calls
2019-08-07 11:33:57 -07:00
Edd Robinson a2fc43ff0c
Merge pull request #14470 from influxdata/mu-reportTSI-2.x
feat(tsi1): add report-tsi tool to 2.x
2019-08-07 19:30:58 +01:00
Max U 64747e9781 refactor(tsi1): address config changes to report-tsi tool 2019-08-05 10:03:32 -07:00
Kelvin Wang 87730440ee feat(cmd/launcher): add check to launcher 2019-07-31 19:00:26 -04:00
Adam Perlin 4fef1683a0 refactor(tsi1): address review comments for report-tsi tool 2019-07-26 16:21:11 -07:00
Adam Perlin 7ce1b8109f chore(tsi1): Clean up flags and naming in report-tsi tool; add comments 2019-07-26 11:16:59 -07:00
Max U 9bd6200f15 fix(tsi1): make mergeable 2019-07-26 11:16:12 -07:00
Max U 17b1dd8562 feat(tsi1): add shorthand for --top flag as -t, plus cleaning 2019-07-26 11:12:15 -07:00
Max U aa2f7a8ff7 feat(tsi1): add a --top flag for limiting output, output now sorted 2019-07-26 11:12:15 -07:00
Adam Perlin 32b283d25a feat(tsi1/report): Add ability to filter by measurement; add additional maps for efficient retrieval of total org/bucket cardinalities 2019-07-26 11:12:15 -07:00
Max U 5e5fa96c5b feat(tsi1): add flags for --org-id and --bucket-id 2019-07-26 11:12:15 -07:00
Max U bfd38d93d8 feat(tsi1): provide API tooling for use in testing 2019-07-26 11:12:15 -07:00
Max U 8f99d20deb feat(tsi1): port report-tsi tool to influxdb 2.x 2019-07-26 11:12:15 -07:00
Max U eb6d0f4478 feat(tsi): report cardinality for all indexes, still needs to be cleaned
Fix iteration logic and clean up
2019-07-26 11:12:00 -07:00
Max U 99c0622ea0 fix(pkg/fs): merge branch 'master' into HEAD 2019-07-25 15:17:15 -07:00
Kelvin Wang 149cbcf0e6 feat(cmd/influxd/launcher): add notification rule service 2019-07-25 15:15:35 -04:00
Max U 979c075931 Merge branch 'master' into HEAD 2019-07-22 10:21:59 -07:00
Christopher Wolff 63c0f40548 fix(query): use auth-wrapped org and bucket services for query 2019-07-19 20:02:53 -06:00
Stuart Carnie 030e11a82a
feat: Allow existing influxdb.ID type to be used as a pflag 2019-07-09 09:20:02 +10:00
Stuart Carnie 00561d5a1b
feedback: Move verify routines to `tsm1` package for consistency
Should have left it there to begin with 🤣
2019-07-09 09:00:41 +10:00
Stuart Carnie 46952afe37
feat(influxd): New influxd verify tsm-blocks command
This command performs verification of TSM blocks

* expected and actual CRC-32 checksums match
* expected and actual min and max timestamps match decoded
  data
2019-07-09 09:00:41 +10:00
Max U 2202d727da fixes merge conflicts 2019-07-08 14:07:04 -04:00
Ben Johnson 08e24faf4c
feat(tsdb): Add block exporter.
Adds export tooling to `influxd inspect export-blocks` so that we
can dump out block data in SQL format for better analysis during
the debugging process.
2019-07-01 10:10:52 -06:00
Adam Perlin 24baec9e6d Gofmt verify-wal files 2019-06-27 16:28:28 -07:00
Adam Perlin f4faa9b2f5 feat(storage): Small verify-wal output and test tweaks 2019-06-27 16:28:28 -07:00
Adam Perlin c868ece4f6 feat(storage): Initial 2.x verify-wal tool functionality 2019-06-27 16:28:28 -07:00
Kelvin Wang 9dc5438e06 feat(cmd/influxd): add http error handler 2019-06-26 21:39:22 -04:00
Lyon Hill 435c8bbed5
fix(task): add logging into the task analytical store (#14124)
* fix(task): add logging into the task analytical store

* add in more detail around log structure
2019-06-12 20:01:41 -06:00
Jonathan A. Sternberg 21c80f3e93
refactor(query/control): move the controller from flux to influxdb (#13991)
The controller implementation is primarily used by influxdb so it
shouldn't be part of the flux repository. This copies the code from flux
to influxdb so it can be removed from the next flux release.
2019-05-29 09:04:34 -05: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
Palak Bhojani 3b6cf6234f Update read/write generate token to have option to create all buckets token 2019-05-09 15:08:30 -07:00
Stuart Carnie fb39ac39ce
fix(storage): Store.Read behavior changed to return unsorted series keys
Closes #13581
2019-04-26 10:38:59 -07:00
Christopher Wolff ab8d964a85 fix(query): remove per-query memory limit from OSS
Fixes #13639.
2019-04-25 15:08:07 -07:00
jlapacik e75d10d6b7 test(launcher): fix ill-formatted query; range must come before filter
Until https://github.com/influxdata/flux/issues/1215 is fixed, the query
writer must make sure to always place a range directly after a from
operation. Otherwise the query will fail planning.
2019-04-25 11:16:11 -07:00
jlapacik 5c973b6830 fix(launcher): call Done on query that errors 2019-04-25 11:16:11 -07:00
Alirie Gray 9f39ddfbef refactor(tasks): move validator to authorizer package 2019-04-24 11:36:54 -07:00
Nathaniel Cook bc17af2118
Merge pull request #13569 from influxdata/flux-staging
chore(dep): update Flux to v0.27.0
2019-04-22 18:34:39 -06:00
Kelvin Wang 7a72c363f2 remove org from bucket 2019-04-22 18:39:05 -04:00
Kelvin Wang 9d44ac3635 rename bucket organization to org 2019-04-22 18:39:01 -04:00
Nathaniel Cook a49d1696dc Merge branch 'master' into flux-staging 2019-04-22 14:25:33 -06:00
Christopher M. Wolff c9f94d4ee8
refactor(query): add parameters to query controller config (#13554)
Recently added to controller config:
  ConcurrencyQuota
  MemoryBytesQuotaPerQuery
  QueueSize
2019-04-22 12:11:32 -07:00
Lyon Hill 726fbefe9a
Integrate the new changes to tasks (#13473)
* Integrat the new changes to tasks
2019-04-19 08:37:59 -06:00
Nathaniel Cook 4c77e3598b Merge branch 'master' into flux-staging 2019-04-18 11:01:22 -06: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
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
Christopher M. Wolff 16b9158b39 refactor(task): make tasks use new Query interface (#13219)
Fixes #12883.
2019-04-12 07:15:27 -07: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
kelwang fbd313456a
Merge pull request #13061 from influxdata/swagger_proto_definition
fix(http): swagger proto definition
2019-04-03 15:55:51 -04:00
Kelvin Wang 1cf600aca9 remove proto 2019-04-03 15:42:25 -04:00
Lyon Hill 986a1acdbe
Update task executor to use a TaskService (#13099) 2019-04-02 15:55:31 -06:00
Lyon Hill 83000361c3
Update task coordinator to act as a TaskService middleware (#13068)
* Update task coordinator to act as a TaskService middleware
2019-04-01 16:45:44 -06:00
Lyon Hill c78344c441
update task schedler to use the new task control service (#12949) 2019-03-28 16:52:25 -06:00
Lorenzo Affetti 90a48c74f6 test(launcher): test for query memory limits and launcher test helpers 2019-03-27 15:50:35 +01:00
Edd Robinson dbca30dac5 Add integration tests for cache snapshotting 2019-03-25 11:44:01 +00:00
Edd Robinson 16cef36aa2 Move tests around 2019-03-25 11:44:01 +00:00
Stuart Carnie 8abb76cb4e
Merge pull request #12710 from influxdata/sgc/data-gen
Add data generation subcommand to influxd
2019-03-20 11:08:49 -07:00
Mark Rushakoff 9541fbb859 fix(task): report query statistics correctly
The synchronous executor was missing a call to ResultIterator.Release.
The asynchronous executor wasn't even calling Query.Statistics.

Also add a test that the scheduler records the statistics to the run
log, and that the statistics are visible from the launcher test. The
launcher test is the most likely place to catch if something goes wrong
in the full stack.
2019-03-20 08:11:14 -07:00
Stuart Carnie 8669e94904
feat(influxd): Add the generate subcommand 2019-03-19 21:52:26 -07:00
Edd Robinson c4cc3ca7bc Fix 2019-03-19 15:12:35 +00:00
Edd Robinson f5e608bce6 WIP - defaults not working 2019-03-19 14:28:47 +00:00
Edd Robinson 70e5a33bff Add inspect sub-command 2019-03-19 14:25:51 +00:00
Mark Rushakoff ce7b53ef37 feat(task): log authorization errors
This should simplify debugging when a user isn't allowed to do something
with a task, that they expect to be able to do.
2019-03-14 14:04:37 -07:00
Stuart Carnie c8d70fdaf0
feedback(influxd): Use InfoLevel constant 2019-03-14 09:23:54 -07:00
Stuart Carnie c7c58275f9
feedback(influxd): Respond to PR feedback
* Add CHANGELOG entry
* Remote erroneous comment
2019-03-14 09:23:53 -07:00
Stuart Carnie e8045ae187
feat(influxd): Migrate influxd binary to cobra Command package
This commit consists of several improvements or changes:

* migrate the influxd binary to cobra.Command
* introduce a default run sub-command to start the server
* register the run sub-command flags with viper
  to maintain compatibility with the existing behavior of automatic
  binding of flags to environment variables.

Closes #12602
2019-03-14 09:23:53 -07:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00
Chris Goller 0d74ea8d55 feat(influxd/launcher): add test mimicing chronograf setup 2019-03-07 11:07:02 -06:00
Edd Robinson 8bdf857ddb Fix expected flux cases 2019-03-07 09:56:07 +00:00
Edd Robinson 3f1bec0836 Update emitted keys and tests 2019-03-07 09:56:07 +00:00
Michael Desa 2687b7fd61
feat(influxdb): add support for templates
feat(influxdb): add generic store for documents

feat(influxdb): support authorizations in document store

feat(influxdb): support orgs in user resource mapping

feat(influxdb): add read-only included field on documents

feat(influxdb): add labels support to documents service

fix(influxdb): rename data field to content on documents

feat(influxdb): add with org id options for document store

feat(http): add templates swagger

feat(influxdb): add documentation to document options

doc(kv): add documentation for kv document store

test(kv): pull document tests in to the testing package

fix(http): fix swagger specification of templates endpoints
2019-03-06 13:18:31 -08:00
Nathaniel Cook a190ddb44c fix(http): fix tests for encoding changes 2019-03-05 16:56:35 -07:00
Lyon Hill 17026c2053
change task logs from a string to a struct (#12363)
* change task logs from a string to a struct
2019-03-05 15:58:33 -07:00
Jacob Marble b9c7ec439e
feat(influxd): Tracing refactor (#12318)
* feat(launcher): Tracing to log disabled by default

* remove traceLogger and use opentracing directly

* add Jaeger tracing

* go vet && go fmt
2019-03-04 11:48:11 -08:00
Nathaniel Cook a75adf6c4b fix(http): separate InfluxQL and Flux services
Previously the APIBackend understood only a ProxyQueryService,
but it needs to understand that there are two implementations of the
ProxyQueryService one for handling InfluxQL queries and one for handling
Flux queries. The names of the fields have been updated to make this
clear. As well as the FluxBackend is now initialized using the
FluxService explicitly.
2019-02-22 10:31:20 -07:00
Lyon Hill c78477314a
Allow tasks to skip catchup (#12068) 2019-02-22 09:47:04 -07:00
Chris Goller c0266ba5cf refactor(cmd/influxd): use simple query rather than the flux service 2019-02-21 11:18:08 -08:00
Chris Goller 1ec7b69d85 fix(kv): error org search if neither name nor id is set 2019-02-21 11:18:08 -08:00
Stuart Carnie 2872233252 feedback: Add end-to-end write and read tests for multiple organizations 2019-02-21 11:18:08 -08:00
Lyon Hill 3665feef38
Populate organization name on task create action (#12004)
* Populate organization name on task create action

* Move the responsiblity of organization lookup to the platform adaptor
2019-02-20 13:36:35 -07:00
Michael Desa 6a8a1fce32 feat(kv): implemented key/value store with end-to-end integration tests
* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

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

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* refactor(kv): copy bolt user test into kv

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

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* fix(http): s/platform/influxdb/ for user service

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* feat(kv): implement labels generically on kv

* refactor(passwords): rename from BasicAuth to Passwords

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(http): initial support for flushing all key/values from kv store

* feat(kv): rename macro to variable

* feat(cmd/influxd/launcher): user kv services where appropriate

* refactor(passwords): rename from BasicAuth to Passwords

* feat(kv): implement macro service

* test(ui): introduce cypress

* test(ui): introduce first typescript test

* test(ui/e2e): add ci job

* chore: update gitignore to ignore test outputs

* feat(inmem): in memory influxdb

* test(e2e): adding pinger that checks if influxdb is alive

* hackathon

* hack

* hack

* hack

* hack

* Revert "feat(inmem): in memory influxdb"

This reverts commit 30ddf032003e704643b07ce80df61c3299ea7295.

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* chore: lint ignore node_modules

* hack

* hack

* hack

* add user and flush

* hack

* remove unused vars

* hack

* hack

* ci(circle): prefix e2e artifacts

* change test to testid

* update cypress

* moar testid

* fix npm warnings

* remove absolte path

* chore(ci): remove /home/circleci proto mkdir hack

* wip: crud resources e2e

* fix(inmem): use inmem kv store services

* test(dashboard): add first dashboard crud tests

* hack

* undo hack

* fix: use response from setup for orgID

* chore: wip

* add convenience getByTitle function

* test(e2e): ui can create orgs

* test(e2e): add test for org deletion and update

* test(e2e): introduce task creation test

* test(e2e): create and update of buckets on org view

* chore: move types to declaration file

* chore: use route fixture in dashboard tests

* chore(ci): hack back

* test(ui): update snapshots

* chore: package-lock

* chore: remove macros

* fix: launcher rebase issues

* fix: compile errors

* fix: compile errors

* feat(cmd/influxdb): add explicit testing, asset-path, and store flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* fix(cmd/influxd): set default HTTP handler and flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* build(Makefile): add run-e2e and PHONY

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

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

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv): rename macro to variable

* refactor(kv): auth/bucket/org/user unique checks return errors now

* feat(inmem): add way to get all bucket names from store

* feat(inmem): Buckets to return slice of bytes rather than strings

* feat(inmem): add locks around Buckets to avoid races

* feat(cmd/influx): check for unauthorized error in wrapCheckSetup

* chore(e2e): add video and screenshot artifcats to gitignore

* docs(ci): add build instructions for e2e tests

* feat(kv): add id lookup for authorized resources
2019-02-19 17:47:19 -06:00
Mark Rushakoff cbef811c63 refactor(task): remove explicit org from run/log lookup
Task ID is now a required value on run and log filters. It was
effectively required by all implementations before anyway, so now those
types reflect that requirement.

Organization ID was removed from those same fields. The TaskService
looks up the organization ID via the task in cases where we need it at a
lower layer.
2019-02-16 14:34:49 -08:00
Lyon Hill 48cc643992
Clean out user from the task store's (#11882)
* Clean out user from the task store's
2019-02-15 15:50:09 -07:00
Alirie Gray 5f524eb92d Rename all occurences of Macro to Variable 2019-02-14 13:21:57 -08:00
Mark Rushakoff d562d6bdde feat(task): pass authorizer to query service
Immediately before the executor calls out to the query service, the
executor loads the authorizer associated with the task, and associates
that authorizer with the context used to execute the query.
2019-02-14 08:53:40 -08:00
Mark Rushakoff caf08b5078 feat(task): store authorization ID with task
Accept token when creating or updating a task, but only report back the
authorization ID.

This means the executor and the platform adapter are now both aware of
an Authorization Service.
2019-02-14 08:53:40 -08:00
Mark Rushakoff 007f5059c7 refactor(task): extract TaskCreate struct
With the ongoing authorization work, creation arguments will differ from
what's returned on reads. More specifically, creation will accept a
token, but reads will report back a token ID.

This refactor facilitates that authorization work, and also brings the
code closer to the swagger definition, for the TaskCreateRequest type in
particular.
2019-02-12 15:10:03 -08:00
Michael Desa f79075deda fix(cmd/influxd/launcher): use http clients for testing launcher 2019-02-06 14:24:21 -05:00
Michael Desa d96787dd67 fix(cmd/influxd/launcher): remove platform alias for influxdb 2019-02-06 14:24:21 -05:00
docmerlin (j. Emrys Landivar) 0fec7aa6c4 feat(tasks): end-to-end tests for the task system 2019-01-25 13:28:25 -06:00
Chris Goller bb09a74732 fix(gather): add all subscribers to a single nats queue group
Previously, scrapers would scrape the target 10 times.  This was
because each scraper subscriber was not put into a queue group.

I've added the queue group "metrics" and now we the subcribers
will only scrape the target once.

Additionally, I moved to using nats memory instead of nats file
store.  We don't need durability for scraper runs across restarts.
2019-01-22 23:05:24 -06:00
Chris Goller e2a1e25707 feat(cmd/influxd): log build information 2019-01-22 21:39:40 -06:00
Chris Goller 31ab881c96
Merge pull request #11347 from influxdata/feat/telemetry
Add optional telemetry that reports every 8 hours
2019-01-22 15:48:24 -06:00
Chris Goller ae62edfa51 feat(cmd/influxd): scrapers should run every ten seconds
Previously, scrapers were running every one minute.
2019-01-22 12:49:13 -06:00
Chris Goller d9f5e84d6a feat(telemetry): add telemetry server handler 2019-01-21 13:05:58 -06:00
Chris Goller 2d00eb18c5 feat(telemetry): add telemetry handler 2019-01-21 13:05:58 -06:00
Chris Goller e690f4bfb3 chore(telemetry): move telemetry into its own package 2019-01-21 13:05:58 -06:00
Chris Goller af8f698490 feat(telemetry): add initial telemetry metrics 2019-01-21 13:05:58 -06:00
Michael Desa e2bc8afc04
Merge pull request #11301 from influxdata/feat/authorize-urm
authorize user resource mapping operations
2019-01-21 08:33:25 -08:00
Chris Goller 49782c3be4 feat(bolt): add metrics for resources stored in boltdb 2019-01-18 17:45:45 -06:00
Chris Goller dea64a3685 feat(proto): read JSON files in proto
We used go-bindata to embed all JSON files in proto to be shipped
with our released influxdb.

We are committing the bin_gen.go so that it simplifies the building
via make and go build.

If you would like to add another proto JSON file, run make
to generate a new bin_gen.go.

Co-Authored-By: Deniz Kusefoglu <deniz@influxdata.com>
2019-01-18 15:13:19 -06:00
Michael Desa cdc9146b78 feat(influxdb): add authorized user resource mappings
feat(bolt): add function to find a resources organization id

rename platform to influxdb

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(bolt): rename FindResoureOrganization to FindResoureOrganizationID

feat(authorizer): add authorized user resource mapping service

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(influxdb): wire up authorized user resource mapping

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(authorizer): remove unused field from tests

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2019-01-18 14:22:08 -05:00
Nathaniel Cook 3a2231be98 Merge branch 'master' into flux-staging 2019-01-11 13:47:49 -07:00
Kelvin Wang ce6004243c add(gather): add writer interface 2019-01-11 13:09:18 -05:00
jlapacik 5266cba346
deps: updates for packages and imports (#10962) 2019-01-10 14:33:25 -08:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Jeff Wendling 703c3c15ca Hook up DeleteBucket to the tsm1 engine 2019-01-09 15:24:26 -07:00
Edd Robinson f0b0d33db1
Merge pull request #2366 from influxdata/er-bucket-delete
Wire up Storage Engine to API-layer BucketService
2019-01-09 18:44:37 +00:00
Edd Robinson 42ff769f1c Wire up storage.Engine to HTTP BucketService 2019-01-09 15:09:56 +00:00
Michael Desa 857b60150e feat(platform): add proto service for creating templated resources
feat(http): add http handler for proto service

feat(mock): add mock proto service

test(http): add proto handler tests

fix(platform): add view as option when adding a cell

feat(platform): add dashboard to proto struct

feat(fs): add filesystem implementation of proto

feat(http): add protos endpoints to api handler

feat(cmd/influxd/launcher): add protos path to server

doc(http): add protos to swagger

test(cmd/influxd/launcher): add --protos-path to launcher tests

fix(fs): remove unused args from test

fix(http): use platform.Error where appropriate
2019-01-09 09:55:15 -05:00
Michael Desa 338e0587d0 fix(platform): nest view beneath dashboard cell
feat(platform): add functional options for platform errors

fix(testing): set dashboard ids properly in dashboard tests

feat(bolt): add dashboard specific views

fix(bolt): delete view when cell is removed or dashboard is deleted
2019-01-08 18:11:13 -05:00
Adam fa35dea009 feat(query/functions/tests): end to end testing is configured to run against a live storage engine.
all tests use a unique bucket based on the test file name.  copied all tests over from flux repo

the tests are currently disabled due to engine consistency issues:  https://github.com/influxdata/flux/issues/613
2019-01-07 13:05:29 -05:00
Adam 9a561f8b53 manually merged addition of secrets to launcher 2019-01-02 15:42:55 -05:00
Andrew Watkins 3429e8d0c6
feat(auth): rewrite authorization service (#2157)
* feat(view-token-overlay): add view token overlay

* test(tokens): update tests

* chore(auths): rename mock data file

* feat(token-view): clicking on description opens token view modal

* feat(token-view): add ability to close overlay

* feat(token-view): display token permissions with updated permissions shape

* feat(token-view): wip update authorization and permission shapes

* feat(auth): wip refactor auth permissions

* fix(auth): generate permissions via functions

* fix(auth): make Id ID

* chore(types): update generated client

* feat(auth): wip add user and org names to auth

* fix(user): didnt save rebase

* feat(auth): WIP refactor auth

* feat(auth): check for user existence during auth creation

* feat(auth): org must exist during auth creation

* fix(auth): pluralize telegrafs resource type

* docs(http): update swagger definition for the Authorization

* test(auth): fix broken tests

* docs(swagger): update cur_swagger Authrorizations

* fix(api): remove trace from cur_swag

* test(ui/token): update components with new generated type definitions

* feat(http): add lookup service adding names for permissions

* fix(http): remove debugging panics

* chore: go tidy

* fix: unsaved rebase

* test(idpe): add ids to Authorizations for log tests
2018-12-28 15:02:19 -08:00
Michael Desa 4c60eacb58 chore(platform): cleanup, document, and use secret service
fix(http): add members/secrets/labels links on org response

fix(http:cmd/influxd): use secret service in api backend

fix(bolt): return empty list if there are no secrets for an org

chore(vault): add description of vault usage
2018-12-28 11:11:21 -05:00
AJ Bond 941e7526c0 fix(http): Fix developer mode default
Developer mode is now passed to assets
closes #2050
2018-12-21 16:33:04 -05:00
Adam 30b2d9ca00
refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused. (#2089) 2018-12-20 17:05:36 -05:00
Adam ad38ad8c3f Revert "refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused (#2077)"
This reverts commit c3c12d1517.
2018-12-20 16:29:28 -05:00
Adam c3c12d1517
refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused (#2077)
* refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused.

* chore(query/influxql): moved query_test.go and requisite files to the influxql dir to be closer to the code it tests. (#2013)
2018-12-20 16:15:40 -05:00
Ben Johnson 846192c066
Merge pull request #1886 from influxdata/bj-refactor-test-cancellation
fix(cmd/influxd): Refactor test cancellation out of main path.
2018-12-14 10:43:15 -07:00
Lyon Hill f7ae8c3524
feat(api/task): Add validation for both tasks and buckets on task create (#1900)
fixes #1622
2018-12-12 16:07:40 -07:00
Ben Johnson 89bf9765cc
fix(cmd/influxd): Refactor test cancellation out of main path.
This commit moves the `Main.cancel()` execution to the `main_test.go`
file so it's only executed for tests. This was interfering with the
shutdown process on the regular `influxd` binary.
2018-12-12 10:53:10 -07:00
Ben Johnson 8d071f85fd
Fix hang on help command. 2018-12-11 11:07:54 -07:00
Edd Robinson 3ea3d90e10
Merge pull request #1623 from influxdata/er-storage-metrics
Add storage engine metrics
2018-12-07 17:50:13 +00:00
Mark Rushakoff 2e81dd31b4 refactor(task): enable high-frequency WithTicker option
Previously, the WithTicker option would call TickScheduler.Tick every
time the underlying time.Ticker sent a time on its channel. This meant
we used a 1s period, which meant that in the worst case, we would see a
tick at about 999ms after the second rollover.

This change increases the underlying time.Ticker frequency, but only
calls TickScheduler.Tick after a second rolls over. Since we now use a
tick frequency of 100ms, during normal operation, TickScheduler.Tick
will be called within 0.1s after the second rolls over.
2018-12-07 08:38:59 -08:00
Edd Robinson 93892c20ab Fix test 2018-12-07 14:32:34 +00:00
Edd Robinson c76626accf Fix rebase 2018-12-07 14:32:34 +00:00