This modifies the read window aggregate interfaces to future-proof it
if and when we add additional capabilities to the method. Previously,
the interface was all or nothing. If we modified the RPC call itself, we
would have to make a new interface to denote the change to the Go code.
This changes the interface so now a `WindowAggregateCapability` exists.
This way, we can modify the struct to include things like:
```
type WindowAggregateCapability struct {
WindowPeriodCapability bool
MeanAggregateCapability bool
}
```
This way we can learn if the RPC call itself supports some specific
option. If the first iteration doesn't support a mean aggregate or the
mean aggregate is only supported by single server implementations, the
window aggregate can tell the caller that it won't be able to compute
the mean aggregate.
Since it fills in a struct with these capabilities, the struct can
safely introduce new values. If a downstream consumer wants to take
advantage of that functionality, then all interfaces in the chain have
to be updated to consume the upstream capabilities.
The `ReadWindowAggregateSource` will invoke the `ReadWindowAggregate`
method on the `influxdb.Reader` and return the table. It is implemented
using the same common methods that are used for the other sources.
Added an interface for an additional storage capability. This interface
will allow for checking if the reader supports the window aggregate call
and another method for invoking the call if it does.
This is implemented using a single interface. If the reader implements
the interface, it indicates that the client is capable of reading the
response. The `HasXXX` method is intended to check if the store supports
the operation. This method also takes a context because it could require
a remote call or to wait for one.
The prometheus project doesn't adhere to the module suffix so any
attempt to use it as a library fails with go 1.13 or greater. The
workaround is to `go get` a specific commit revision that corresponds to
a tag and let go figure out a pseudo-version for it.
In this case, I updated the revision to the one pointed at by `v2.9.2`
since that is what the current `go.mod` file pointed at. I also updated
the go version to 1.13 inside of `go.mod` to be the same as influxdb.
See https://github.com/prometheus/prometheus/issues/6048 for details.
I think it is a nice utility function that I would like to use
elsewhere.
So I decided to move it out to the tracing package.
Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
This change allows for the InfluxQL language type to be used with the
/v2/query API endpoint.
This change also introduces a way to give the transpiler an explicit
bucket name instead of using the DBRPMapping service.
Requests to the endpoint will know the bucket name directly but will
likely not have run the migration step to populate the DBRP mappings.
The storage engine isn't capable of sending back empty tables when a
series is empty. Because of this, we disable the push down and let flux
do the filtering in the case where there is a filter and it is specified
to keep the empty tables.
Update CONTRIBUTING.md
Added Security Vulnerability Reporting
Updated the text to include the simple changes. This branch still needs updating to reflect 2.0 API etc.
~
fix(contribution): updated the text for V2.
fixes#13370
Update the 'Getting the source' section'
Remove the 'Cloning a fork' seciton
* If they have forked the repo, it should be clear how to clone the fork.
refactor
last refactor
Use # for section headings
Minor grammar edit.
Update CONTRIBUTING.md
Fix tripple backticks
Backticks weren't being picked up by Github's md renderer properly.
Fixed formatting
Made tabs and spaces consistent (went for tabs, since that's what go uses). Made cli commands consistent by including $ at the start of the line. Fixed copy a little bit.
Softened the language
Fixes: https://github.com/influxdata/influxdb/pull/13370#discussion_r359393716
Softened the language a bit.
Update CONTRIBUTING.md
Co-Authored-By: Stuart Carnie <stuart.carnie@gmail.com>
chore: improve CONTRIBUTING.md