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
Steps taken:
- go test -short ./... repeatedly, and on each checksum failure:
- remove line for that repository from go.sum, and re-run go test
- go mod tidy repeatedly, and on each checksum failure:
- remove line for that repository from go.sum, and re-run go mod tidy
I think this fixes local development, but it is unlikely to succeed on
CI until other images also migrate to go1.11.4. Unfortunately, the
docker image for go1.11.4 has not yet been published.
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
BREAKING CHANGE: The API endpoint exposed internal details about the implementation of
the logical and physical plans. Those data structures need to be free to
change without breaking the API. For now since the endpoint is unused it
is being removed. A similar API may be added back in that correctly
abstracts away the internal details of plans.
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.