Commit Graph

295 Commits (e8931bbffaaae82f90f251b80129fe6bdf3928d1)

Author SHA1 Message Date
Johnny Steenbergen 952007001b chore(pkger): drop mentions of pkgs from within service models
references: 
2020-06-29 16:43:40 -07:00
Johnny Steenbergen cb7ecace6f feat(pkger): update remote http client to use new routes
this implicitly affects the CLI which uses that client. It will now hit the
new endpoints which will ship with the next release of OSS beta, and have
already landed in our upstream repos.

references: 
2020-06-29 14:58:40 -07:00
Johnny Steenbergen 2927f0e718 feat(pkger): add stable HTTP APIs for stacks and templates
references: 
2020-06-29 13:45:32 -07:00
Johnny Steenbergen 2825427cf5 chore(pkger): convert packages endpoints into new naming convention
note: going to make this evolution in two steps so that we have a simple
rollback to get back to a working state. We'll be maintaining both packages
and the new templates and stacks endpoints for a while as users start to
move onto a newer CLI version. Sunsetting by end of July.

references: 
2020-06-29 09:45:58 -07:00
Johnny Steenbergen 2f2140e7a7 feat(influx): extend stacks update cmd with ability to add resources
closes: 
2020-06-29 07:03:52 -07:00
Johnny Steenbergen fdcf8000f6 feat(pkger): extend stacks with ability to add resources without applying
references: 
2020-06-26 14:47:52 -07:00
Johnny Steenbergen 0f7ab73199 chore(pkger): drop behavior to update stack when exporting 2020-06-26 14:47:52 -07:00
Johnny Steenbergen a6a5d0d43f fix(pkger): update handling of diff dashboard charts 2020-06-26 11:55:19 -07:00
Johnny Steenbergen fdc1da6bc5 chore(pkger): drop field no longer in use
this was missed in a previous PR wehre we added the status in place of the
remove boolean flag
2020-06-26 10:21:12 -07:00
Johnny Steenbergen 846b7d0207 feat(pkger): add ability to export stack with additional resources and update stack with associated exports
references: 
2020-06-25 21:25:30 -07:00
Johnny Steenbergen 29d4091e0a feat(influx): extend influx export command with ability to export stack
closes: 
2020-06-25 21:25:30 -07:00
David McKay b600559d53 chore: fix indentation 2020-06-25 18:16:57 +01:00
David McKay 6e4d7be3cf chore(editorconfig): revert editorconfig changes, too much work 2020-06-25 18:16:57 +01:00
David McKay 687130d030 fix: restore newlines with updated editorconfig 2020-06-25 18:16:57 +01:00
David McKay b3c738fc53 fix: have tests use non-default value and support pkger 2020-06-25 18:16:57 +01:00
Johnny Steenbergen c67a6ee1ea feat(pkger): extend metrics for export functionality 2020-06-25 09:47:33 -07:00
Johnny Steenbergen cb8fe33da8 chore(pkger): drop reference to pkg in PkgImpactSummary type 2020-06-25 09:47:33 -07:00
Johnny Steenbergen f554563cea chore(pkger): refactor independent stack export functionality out of existence
the Export behavior (renamed from CreatePkg) now provides for stackID as
another input. With this we are able to remove the additional endpoint
/api/v2/packages/stacks/:stack_id/export. It now fits into the
/api/v2/packages/export endpoint as another req body parameter. This also
makes all export functionality in teh same space, encapsulated both in the
endpoint and within the service layer :-).

references: 
2020-06-25 09:47:33 -07:00
Johnny Steenbergen 6694c7e393 chore(pkger): refactor export by stack to reuse CreatePkg functionality
this also makes it so that an association (label) that is added to a
resource is also included in the returned output. There is 1 test that
was changed as part of this work. It is to test for this specific change
in behavior

references: 
2020-06-24 12:03:20 -07:00
Johnny Steenbergen 8feab6d016 chore(pkger): ensure sorting of axes on export of a dashboard's query 2020-06-24 05:19:11 -07:00
Johnny Steenbergen d671185bdc fix(pkger): fixup updates for variables where updates from selected were skipped 2020-06-23 08:05:27 -07:00
Johnny Steenbergen 802afebf8c feat(pkger): add support for selected fields to variable
references: 
2020-06-22 17:05:18 -07:00
Johnny Steenbergen 34c4e5a48b feat(pkger): add env default vaules for template references 2020-06-22 15:14:16 -07:00
Johnny Steenbergen 2d4a12fdf6 chore(pkger): accomodate skipping resources that are part of an association 2020-06-22 14:24:33 -07:00
Johnny Steenbergen d8ac728ac0 feat(pkger): extend metrics to cover org and user id for template installations
chore(pkger): fixup error messages
2020-06-18 10:50:10 -07:00
Johnny Steenbergen ec8c252dbb feat(pkger): extend public apply API with new action to skip resources by kind
closes: 
2020-06-18 08:03:34 -07:00
Johnny Steenbergen a2bca73760 feat(pkger): extend service with ability to skip resources by kind
references: 
2020-06-17 17:57:48 -07:00
Johnny Steenbergen a179d6d473 fix(pkger): delete newly created stack when applying a template that encounters err 2020-06-17 17:57:23 -07:00
Johnny Steenbergen a4e4be7787 feat(pkger): add ability to skip a resource within a template
references: 
2020-06-17 17:22:56 -07:00
Johnny Steenbergen 0b531e83bb feat(pkger): extend pkger apply/dry run with ability to skip resources
this work is primarily to introduce the state changes internally within
the state coordinator. The coordinator can be unit tested effectively to
verify the actions are being heard.

references: 
2020-06-17 15:28:46 -07:00
Johnny Steenbergen 72db5bdd96 chore(pkger): cache testdata dir in memory to reduce disk calls in tests
speeds up test ~5x
2020-06-17 15:28:46 -07:00
Johnny Steenbergen 7e8ab162e7 feat(pkger): extend stacks with update functionality
references: 
2020-06-17 09:47:33 -07:00
Johnny Steenbergen 61cd72b0cd chore(influx): update usage and soften comparisons for kind matching on export
closes: 
2020-06-16 15:31:39 -07:00
Johnny Steenbergen 5af53f88c5 feat(pkger): allow for base github content urls for json/yaml/jsonnet templates
closes: 
2020-06-16 13:00:29 -07:00
Johnny Steenbergen ea322d8286 feat(pkger): extend metrics to collect remote sources
closes: 
2020-06-16 12:17:45 -07:00
Johnny Steenbergen b977568390 feat(pkger): extend pkger to provide sources of templates to each template 2020-06-16 08:04:37 -07:00
Johnny Steenbergen 020c9e7374 chore(pkger): add source to Pkgs to 2020-06-16 08:04:37 -07:00
Johnny Steenbergen 6ff46c0f3c chore(pkger): drop deprecated shouldRemove from parser identity 2020-06-16 08:04:37 -07:00
Johnny Steenbergen 1a89e49086 fix(pkger): capture and fix panics converting tasks 2020-06-11 17:44:52 -07:00
Johnny Steenbergen 12c1b61d00 feat(pkger): provide label associations env refs to each resource type
closes: 
2020-06-10 17:14:53 -07:00
Johnny Steenbergen 0d07f8e579 feat(pkger): extend SummaryVariable with its env references
references: 
2020-06-10 17:14:53 -07:00
Johnny Steenbergen 5d8538de5a feat(pkger): extend SummaryTelegrafConfig with its env references
references: 
2020-06-10 17:14:53 -07:00
Johnny Steenbergen b4e1ea7903 feat(pkger): extend SummaryTasks with its env references
references: 
2020-06-10 17:14:53 -07:00
Johnny Steenbergen d9925ffbc4 feat(pkger): extend SummaryNotifcationRules with its env references
references: 
2020-06-10 16:23:43 -07:00
Johnny Steenbergen 205d022b52 feat(pkger): extend SummaryNotifcationEndpoints with its env references
references: 
2020-06-10 15:57:06 -07:00
Johnny Steenbergen 98cc30fa24 feat(pkger): extend SummaryCheck with its env references
references: 
2020-06-10 15:57:06 -07:00
Johnny Steenbergen ef00f66a55 feat(pkger): extend SummaryDashboard with its env references
references: 
2020-06-10 15:22:08 -07:00
Johnny Steenbergen bb270f1145 feat(pkger): extend SummaryLabel with its env references
references: 
2020-06-10 14:18:37 -07:00
Johnny Steenbergen 70b3619df6 feat(pkger): extend SummaryBucket with its env references 2020-06-10 13:34:33 -07:00
Johnny Steenbergen 73ffe23f9d chore(pkger): backfill missing fillColumns field for histograms
closes: 
2020-06-10 07:50:35 -07:00
Johnny Steenbergen ad27fc9b16 chore(pkger): fixup Accept/Content-Type header inspection in export endpoints 2020-06-09 08:07:34 -07:00
Johnny Steenbergen 812743ec31 chore(pkger): drop unnecessary middleware for http server 2020-06-08 16:19:26 -07:00
Johnny Steenbergen be4f989961 fix(pkger): lazy init the pkger store
closes: 
2020-06-05 14:17:26 -07:00
Johnny Steenbergen 09843e110e chore(pkger): fixup tracing span creation
fallback to using the packge.method(type).additional format
2020-06-04 16:02:24 -07:00
Johnny Steenbergen bc9b69b96f fix(pkger): provide charts when export stack dashboards by stack 2020-06-04 15:16:15 -07:00
Johnny Steenbergen a6ead1246e fix(pkger): provide correct stackID for recording pkg application
this bug surfaces when you do not provide a stack ID to the apply call.
the new stack is created, but the resources created are not associated
with it. This remedies that issue.
2020-06-04 13:47:52 -07:00
Johnny Steenbergen 3dcd5d496f feat(pkger): add ability to export by stack
this ability exports all resources associated with a stack by the same
metadata.name fields as the original application had done it. This can
be used as a means to snapshot the current state of the stack. This can
be used for source control or other means.

closes: 
2020-06-02 08:18:11 -07:00
Johnny Steenbergen 53794bfae5 feat(pkger): make all pkg applications stateful
if no stack is provided then one will be provided for you.

closes: 
2020-05-28 16:59:21 -07:00
Johnny Steenbergen b25b4021c3 chore(pkger): refactor return values for Apply/DryRun to enable extending it
references: 
2020-05-28 15:34:15 -07:00
Johnny Steenbergen bfc27a9d65 fix(pkger): relax chart validation on query values
this fixes a bug where we are trying to export a dashboard that has chart
with unexpected missign queries. the root cause of these issues is uknown
but the fix here is to remove the strict requirement. a user can still
delete any unexpected cell if they deem necessary after the export.
2020-05-27 15:02:37 -07: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
Johnny Steenbergen 37d44d882d chore(pkger): handle edge cases for telegraf configs that manifest from user interaction
closes: 
2020-05-06 16:49:50 -07:00
Johnny Steenbergen 3eb5af969a chore(pkger): handle edge cases for tasks that manifest from user interaction
references: 
2020-05-06 16:49:50 -07:00
Johnny Steenbergen 7be0d8289b chore(pkger): handle edge cases for rules that manifest from user interaction
references: 
2020-05-06 16:18:48 -07:00
Johnny Steenbergen 7f8aa4c40f chore(pkger): handle edge cases for endpoints that manifest from user interaction
references: 
2020-05-06 15:56:32 -07:00
Johnny Steenbergen b4b52570b4 chore(pkger): handle edge cases for labels that manifest from user interaction
references: 
2020-05-06 15:26:01 -07:00
Johnny Steenbergen d4aa3be8db chore(pkger): handle edge cases for dashboards that manifest from user interaction
references: 
2020-05-06 15:12:30 -07:00
Johnny Steenbergen 485cc3ea54 chore(pkger): handle edge cases for checks that manifest from user interaction
references: 
2020-05-06 14:57:04 -07:00
Johnny Steenbergen 24dd13bcc6 chore(pkger): handle edge cases for buckets that manifest from user interaction
references: 
2020-05-06 14:19:44 -07:00
Johnny Steenbergen ce2baee4d6 chore(pkger): make export test assertions deterministic 2020-05-06 13:49:23 -07:00
Johnny Steenbergen f575ea8d41 chore(pkger): handle edge cases that can manifest from users in the platform and stateful pkg applications
references: 
2020-05-06 13:01:50 -07:00
Johnny Steenbergen 9ab4447617 chore(pkger): ensure sorting is done by PkgName for all parser resource summaries 2020-05-06 13:01:50 -07:00
Johnny Steenbergen 3fd731511a chore(pkger): make integration stack tests indpendent 2020-05-05 11:01:13 -07:00
Johnny Steenbergen 784b222d4d feat(pkger): enforce metadata.name dns name compliance
this PR includes a lot of small changes to names in existing test pkgs.
the tests are updated to follow suit.

closes: 
2020-05-04 12:40:22 -07:00
Johnny Steenbergen 95ad3c6582 feat(pkger): add the ability to remove a stack and all its associated resources
closes: 
2020-05-01 16:18:13 -07:00
Johnny Steenbergen c7e97f1625 feat(pkger): add service and http server integreations for stack lists
references: 
2020-04-30 13:24:15 -07:00
Johnny Steenbergen 097d761c3a feat(pkger): extend store with stack lists operation
references: 
2020-04-30 13:24:15 -07:00
Johnny Steenbergen ff27edbea9 feat(pkger): add support for using URLs associated with stack to apply/dry run 2020-04-29 16:48:00 -07:00
Johnny Steenbergen 0a696237eb chore(pkger): refactor telegraf tests to remove dependency on pkg parsed flag
references: 
2020-04-29 16:48:00 -07:00
Johnny Steenbergen 72906a4484 feat(pkger): add support for stateful label mappings
references: 
2020-04-24 17:05:55 -07:00
Johnny Steenbergen 3acd860563 feat(pkger): add stateful management for notification rules
references: 
2020-04-23 11:47:32 -07:00
Johnny Steenbergen d82aa62fff feat(pkger): extend store to support associations
references: 
2020-04-22 16:50:40 -07:00
Johnny Steenbergen 47e5facc81 feat(pkger): add stateful management for telegraf configs 2020-04-21 15:47:49 -07: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: 
2020-04-21 09:14:20 -07:00
Johnny Steenbergen c483aec2d2 feat(pkger): add stateful management for dashboards 2020-04-20 14:04:45 -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: 
2020-04-17 14:02:29 -07:00
Johnny Steenbergen 21694416a3 chore(pkger): refactor parser dashboard state out into stateful type
references: 
2020-04-16 13:27:36 -07:00
Johnny Steenbergen f084a93fa2 chore(pkger): refactor parser telegraf config state out into stateful type
references: 
2020-04-16 12:05:07 -07:00
Johnny Steenbergen da2cf7e94a chore(pkger): refactor parser task state out into stateful type
references: 
2020-04-16 10:06:44 -07:00
Johnny Steenbergen 94ae519cc6 chore(pkger): refactor parser notification endpoint state out into stateful type
references: 
2020-04-15 14:26:25 -07:00
Johnny Steenbergen c8a79f5653 chore(pkger): refactor parser variable state out into stateful type
references: 
2020-04-14 16:48:56 -07:00
Johnny Steenbergen cb7f8ba521 chore(pkger): refactor parser check state out into stateful type
references: 
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
Johnny Steenbergen 217eddc87e fix(pkger): add monotoneX geom type to valid geometries 2020-04-13 13:31:14 -07:00
Johnny Steenbergen ec1324ba4a fix(pkger): fixup field misassignment in table view export
closes: 
2020-04-13 12:22:36 -07:00
Johnny Steenbergen 67ccbd4490 fix(influx): add nil check for printing diff of endpoints and checks 2020-04-09 13:15:32 -07:00
Johnny Steenbergen cee77081b2 feat(pkger): extend tasks with unique constraints 2020-04-08 14:38:32 -07:00
Johnny Steenbergen afb1653bff chore(pkger): refactor diffs to use reuable identifier type 2020-04-08 13:30:43 -07:00
Johnny Steenbergen 85e31e8194 feat(pkger): update tasks with unique constraints 2020-04-08 13:30:43 -07:00