* 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
A static initialization is not desirable in the main binaries, as it forces all
paths of code to init, but it is still useful in tests. It allows static
intialization to be performed once for all tests and eliminates the need to
always add the FluxInit call. Added a fluxinit/static package that calls
fluxinit.FluxInit() to replace the builtin package. This hides the nature of
the initialization and makes it clear that it is mandatory initialization code
getting called.
This commit temporarily pulls in code from the flux/ast/edit
package ensure builds continue. Once Flux is upgraded to the
latest, the pkg/flux package will be removed.
* feat(task): Extract options using AST-based method.
* feat(task): Use AST-based option APIs for updating task option.
* chore(task): Use the old way of parsing durations.
* fix(task): Ordering changed on us. Fixing tests to reflect the new order.
* fix(task): There's no way for us to know if there are multiples with the current APIs.
* chore(task): Guard against duplicate options. Minor cleanup.
* fix(kit/feature): Break cyclical dependency between influxdb and pkgs that use feature.
* chore(task): Feature flag updating Flux options.
* chore(task): Ensure we are testing both paths of feature flag.
* chore: Remove dead code.
* chore(task/options): Remove unnecessary conditional.
* chore(task/options): Unexport some error helpers.
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.
fix(notification/check): include tags in check object in generated flux
Closes https://github.com/influxdata/influxdb/issues/14769
fix(notification/check): use selected field in threshold functions
Closes https://github.com/influxdata/influxdb/issues/14776
fix(testing): add selected field for check tests
fix(check): use real flux for threshold check
feat(notification/check): generate flux for deadman checks
chore(endpoint): rename webhook endpoint to http endpoint
fix(notification/rule): fetch url for flux script off of endpoint
fix(notification/rule): clean up slack and http rules
fix(notification/rule): change MessageTemp to MessageTemplate
fix(rules): pass endpoint in to rule during create
fix(ui): rename webhook to http
feat(notification/check): namespace deadman under alerts
fix(notification/check): nest tags under tags key in data object in flux
wip
feat(kv): log error if urm cannot be deleted for notification rule
fix(notification/rule): remove name from notify call in slack rule
chore(ui/cypress/e2e): skip rule create test
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.
The logic used to be only in the scheduler, but now Options exposes it.
This is another step towards making StoreTaskMeta schedule-aware to
enable creating manually requested runs.
This is to work around slow parsing (#484).
This change saves about 2 seconds on tests for task/backend and
task/backend/bolt. It saves around 45 seconds on enterprise tests.