* test(storage): ensure multiple engines can run concurrently
* feat(storage): expose control over retention run
Fixes#15134.
This commit adds the ability to inject a functional option into a
storage.Engine for controlling when the retention enforcer can run.
Previously, retention enforcers ran on an interval; if you ran multiple
storage engines (as we do in some environments) then it was not possible
to coordinate when engines ran retention. Often they would synchronise
because they started at the same time.
This change will let you specify a blocking function to control when the
retention enforcer can run.
A simple function for serialising retention enforcement across multiple
storage engines could look like:
```go
var mu sync.Mutex
func f() (done func()) {
mu.Lock()
return func() { mu.Unlock() }
}
```
* refactor(ui): add vector graphic logos for each client library
* refactor(ui): replace mock content with real content
* refactor(ui): display client library content in overlays with routes
* refactor(ui): cleanup factored out components
* refactor(ui): increase size of client library overlays
* refactor(ui): make client library overlays wider
* refactor(ui): add link to docs for each client library
* refactor(ui): cleanup commented code
We needed the coordinator to be able to execute manual runs and resume runs.
These two functions have been added, but we also needed to allow for the executor to be
mocked out. To do that we needed to return a Promise interface instead of an actual
struct. Both these changes are to facilitate coordinator work and testing.
I chose to add a execute function that allow's the task executor to match expectation from
the scheduler but I left in the existing executor method that return's promises. This is
because I like to be able to have the accountablilty and visiblity inside what's happening
with each execution even though the promise isn't required for the scheduler. This function signature
will be used by the coordinator and potentially other's that want to ensure a 'execution' is completed.
The http error schema has been changed to simplify the outward facing
API. The `op` and `error` attributes have been dropped because they
confused people. The `error` attribute will likely be readded in some
form in the future, but only as additional context and will not be
required or even suggested for the UI to use.
Errors are now output differently both when they are serialized to JSON
and when they are output as strings. The `op` is no longer used if it is
present. It will only appear as an optional attribute if at all. The
`message` attribute for an error is always output and it will be the
prefix for any nested error. When this is serialized to JSON, the
message is automatically flattened so a nested error such as:
influxdb.Error{
Msg: errors.New("something bad happened"),
Err: io.EOF,
}
This would be written to the message as:
something bad happened: EOF
This matches a developers expectations much more easily as most
programmers assume that wrapping an error will act as a prefix for the
inner error.
This is flattened when written out to HTTP in order to make this logic
immaterial to a frontend developer.
The code is still present and plays an important role in categorizing
the error type. On the other hand, the code will not be output as part
of the message as it commonly plays a redundant and confusing role when
humans read it. The human readable message usually gives more context
and a message like with the code acting as a prefix is generally not
desired. But, the code plays a very important role in helping to
identify categories of errors and so it is very important as part of the
return response.
The `/query` swagger endpoint now specifies that error messages are
returned as the standard JSON schema. The standard JSON schema has also
been changed slightly so that only `code` and `message` are documented
and the intention is that we will flatten the message from an
`influxdb.Error` before we encode the JSON.
* refacotor(ui): split first time create check button into one for each type
* refactor(ui): replace create check button with dropdown
* refactor(ui): remove check type toggle from conditions card
* refactor(ui): split check creation into 2 routes
* refactor(ui): change default check depending on type
* refactor(ui): hide function selector when building a deadman check
* refactor(ui): move validation popover to check save button
* refactor(ui): remove unused component
* refactor(ui): ensure deadman queries do not have an aggregate function
Co-Authored-By: Deniz Kusefoglu <deniz@influxdata.com>
* refactor(ui): update alerting get started copy
* refactor(ui): update e2e test
* refactor(ui): use existing checkType type
Implementations of the backend.Executor produce errors limited to
querying the KV store. The remainder of the errors will be processed
in the implementation of a `RunPromise`.
Fixes#15161
We are planning to change the allocator interface within flux to use the
arrow allocator. To make the release easier, this updates the test in
advance to use the arrow allocator instead of the to be changed memory
allocator interface from flux.
We have been tracking down odd error messages when writing data and
found the problem to be internal server errors when writing empty
bodies.
I added fairly comprehensive test coverage for /api/v2/write as well
as simplify and clarify the error messages.