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.
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest
* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
does not apply to mappings, will apply mappings no matter what. we need to
remedy the uniqueness of resources from the API side. Applies to labels,
label mappings,
The controller now supports setting an initial memory limit and setting
a maximum amount of memory that the controller may use separately from
the memory quota per query and the concurrency quota.
This allows the controller to increase the concurrency quota to a larger
number while setting the maximum amount of memory to a lower amount than
would be required for all queries to use 100% of their allowable memory.
Functionally, this means that a query will have a soft limit for an
initial memory byte quota that a query is guaranteed to have, a shared
pool that it is allowed access to in the case it uses more, and a hard
limit that no query may exceed to prevent runaway queries from taking
over the entire pool.
This change is completely backwards compatible with older configurations
as the new options will default to values that mimic the old behavior
where a query is allocated the full amount of its memory quota and the
maximum amount of memory is based on the concurrency quota and this
maximum memory quota.
In addition to the above, this also fixes a bug in the controller that
allowed it to run more than its concurrency as executing queries. This
happened when the results had finished being sent by the executor, but
the query had not yet been read and/or serialized. The executor would be
freed up and would take the next query even though the previous query
hadn't yet been finalized with `Done()`.
This avoids a module error in Go 1.13 from a poorly tagged transitive
test dependency that looks like:
gopkg.in/stretchr/testify.v1/assert: go.mod has non-....v1 module path
"github.com/stretchr/testify" at revision v1.4.0
As of golang/go#31960, go1.13 (or tip) will always add the go directive
to go.mod. Add it now as go 1.12 so that we don't have churn later as
people start using 1.13, before we're ready to officially switch to
building influxdb with 1.13.
The API slightly changed: LoadSwaggerFromYAMLData is now replaced
by LoadSwaggerFromData.
See: https://github.com/getkin/kin-openapi/pull/67
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
This commit adds a reason label to the total compaction metric. For
snapshots, the reason will indicate why the cache was snapshotted. For
other compactions, the reason label will be blank.
This refactors everything to generate and use a flux AST when
transpiling an influxql query. This also updates the spectests so they
use flux instead of writing out the AST and compare the resulting
AST's.
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.
all tests use a unique bucket based on the test file name. copied all tests over from flux repo
the tests are currently disabled due to engine consistency issues: https://github.com/influxdata/flux/issues/613
There were two issues.First the `chronograf` subdir was not listed.
Second the tmpl generate dependency was not listed in the tools.go list
of dependencies.
Fixes#2044
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
feat(kv): add kv store interface for services
feat(bolt): add boltdb implementation of kv.Store
spike(platform): add kv backed user service
feat(kv): add static cursor
Note here that this operation cannot be transactionally done. This poses
a bit of issues that will need to be worked out.
fix(bolt): use error explicit error message
squash: play with interface a bit
fix(kv): remove commit and rollback from kv interface
feat(inmem): add inmem kv store
chore: add note for inmem transactions
fix(bolt): remove call to tx in kv store tests
feat(kv): add tests for static cursor
doc(kv): add comments to store and associated interfaces
doc(bolt): add comments to key value store
feat(testing): add kv store tests
test(testing): add conformance test for kv.Store
test(inmem): add kv.Store conformance tests
doc(inmem): add comments to key value store
feat(inmem): remove CreateBucketIfNotExists from Tx interface
feat(bolt): remove CreateBucketIfNotExists from Tx
feat(inmem): remove CreateBucketIfNotExists from Tx
doc(kv): add note to bucket interface about conditions methods can be called
feat(kv): add context methods to kv.Tx
feat(bolt): add context methods to bolt.Tx
feat(inmem): add context methods to inmem.Tx
test(kv): add contract tests for view/update transactions
feat(kv): ensure that static cursor is always valid
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
fix(kv): remove error from cursor methods
test(kv): remove want errors from cursor test
test(testing): add concurrent update test for kv.Store
feat(kv): make kv user service an example service
fix(testing): add concurrnent update test to the kv.Store contract tests
test(platform): fix example kv service tests
dep(platform): make platform tidy
The table interface was modified to expose the arrow buffers. The
storage table has now been converted to use this interface with the same
fixes so that it exposes arrow buffers.
The influxql package has also been updated to use the `DoArrow` method
from the `flux.Table` interface.
The test used `AND` instead of `and` which is not valid syntax. It also
did not include packages and imports in the generated JSON from parsing
the flux query.
test(platform): run testcontainer integration tests for nightly release
Integration tests for the vault secret service using testcontiners
should not run along with unit tests, however, they should run on some
regular schedule. This commit introduces `make test-integration` which
runs integration tests for vault using testcontainers. The command introduced
relies on docker being available on the host it is executed on.
chore(platform): make go modules tidy
chore: try to fix go mod
chore(platform): remove explicit logrus dependency
chore(platform): run go mod tidy
chore(platform): replace github.com/Sirupsen/logrus with github.com/sirupsen/logrus
chore(platform): update docker dependency
feat(vault): add vault implementation of secret service
test(platform): run testcontainer integration tests for nightly release
Integration tests for the vault secret service using testcontiners
should not run along with unit tests, however, they should run on some
regular schedule. This commit introduces `make test-integration` which
runs integration tests for vault using testcontainers. The command introduced
relies on docker being available on the host it is executed on.
chore(platform): make go modules tidy
chore: try to fix go mod
chore(platform): run go mod tidy
feat(vault): add vault implementation of secret service
chore(platform): make go modules tidy
feat(platform): add Put/Patch/Delete methods on secret service
feat(vault): add Put/Patch/Delete methods on vault secret service
feat(http): add http handler methods for secret service
feat(bolt): add Put/Delete/Patch methods to bolt secret service
feat(testing): add tests for Put/Patch/Delete methods in secret service
feat(mock): add mock secret service
feat(http): add tests for secrets endpoints
feat(http): update swagger for secrets endpoints
chore: run go mod tidy
We are moving the necessary code for 2.0 from the influxdb 1.X
repository to the platform 2.0 repository. The logger is an unnecessary
dependency on the old influxdb that is making life more complicated.
The pb package was only referenced in cmd/influx/query.go, but in
dead code, since it uses the same machinery as the repl, which goes
through the HTTP endpoints, rather than the gRPC endpoints.
The version of goreleaser we pinned used `masterminds/semver`, but the
project itself uses `Masterminds/semver`. This caused go modules to be
unable to resolve both of them.
The most recent goreleaser on master switched to using the official
casing.
We reorganized the functions in flux to have the structure:
/functions
/inputs
/transformations
/outputs
this PR catches up platform to work with the new package layout.
As a separate refactoring issue, we should discuss:
from(bucket: ) should migrate from flux --> platform
to_http and to_kafka should migrate from platform --> flux
feat(bolt): add boltdb implementation of basic auth service
test(bolt): replace context.TODO with context.Background
feat(bolt): make bcrypt hash function cost injectable
This updates the dependency manager to use go modules instead of dep so
that we can remove dep as a dependency and we can begin using and giving
feedback on modules within this project. It should simplify dependency
management and make it faster to run the builds too.
The big change is updating the various Makefiles to stop relying on the
vendor directory because it no longer exists. This change creates a
`tools.go` file with the revisions of the tools we use that are currently
in the `required` section of `Gopkg.toml`. We are currently in other
discussions to modify how we handle tool dependency management, but this
change does not change that.