* chore: remove dead code
* refactor: move FluxLanguageService interface to fluxlang
* chore: run fmt
* refactor: move task.go from top level to task/taskmodel
* chore: run formatter
* chore: fix up import ordering with gci
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.
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.
* 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>
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
* 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
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest
* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
It was possible to create checks with invalid data causing
odd internal errors to return from the layers far down below.
Likely, we need to add more checks to the validation, but, I have
not thoroughly checked.
First pass at flux AST generation from check
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): format call expression
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): cleanup CheckDefinition
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): clean up threshold functions
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): clean up message function
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): misc fixes
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): remove dead code
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): move threshold flux generation to check pkg
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): move base ast generation to its own package
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): add comment for GenerateFluxAST
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
docs(notification/flux): add comments to each exported function
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
feat(notification/check): add tests for GenerateFlux
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
feat(notification/check): add task options to generated flux
fix(notification/check): use flux compatible duration type
test(notification/check): add task option to task definition
test(http): use check Duration in checks http handlers
feat(check): add TaskID to checks base
fix(notification/check): hack around issue with formatting ast package
wtih multiple files
test(check): create task when check is created
A lot of little changes had to happen as a result of this. This change
was rather painful.
feat(checks): add update and delete of task for check
fix(notifications/check): hack around the alerts package not being
available
test(kv): temporarily skip check tests while we merge the pr above