Commit Graph

30 Commits (fbfd4b46514062ce8688337a07d64d18d81658d9)

Author SHA1 Message Date
Daniel Moran fbfd4b4651
test: add fluxtest harness (#21074)
* test: add script to run flux tests
* feat(flux): enable test capabilities in Flux controller
* feat(flux): add MergeFiltersRule
* build: bump existing Dockerfiles to go 1.15
* build: add flux tests to CI
* refactor: allow for overriding tcp.Mux logger
* build: upgrade to Flux v0.111.0
2021-03-30 11:18:18 -04:00
Sam Arnold dd6abe6f19
fix(flux): add durations to Flux logging (#19697) (#20940)
(cherry picked from commit 25fb1077e2)

Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>
2021-03-15 12:33:57 -04:00
Sam Arnold 5ef0d38bc7
fix(flux): buckets call no longer panics (#17319) (#20936)
The buckets call had a column removed and the backport did not remove
that line. This modifies the buckets command to not append a row to a
column that no longer exists.

(cherry picked from commit 637ca24d5e)

Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
2021-03-12 16:34:40 -05:00
Sam Arnold 7a992dac77
feat: add arguments to flux to function (#20873)
Also remove some dead code

Closes #20853
2021-03-05 11:25:52 -05:00
Sam Arnold 7210fa6355
chore: Upgrade 1.x to the latest flux (#20767)
* chore: Update flux to 0.67

* chore: Builds against 0.68 flux

* chore: Builds against 0.80.0

* chore: Builds against 0.90.0

* chore: Everything builds on latest flux

* chore: goimports fixed

* chore: fix tests locally

* chore: fix CI dockerfiles

* chore: clean up some unused code

* chore: remove flux repl and Spec in flux query json

* chore: port flux end to end tests from 2.x

* chore: fix up goimports

* chore: remove 32 bit build support
2021-03-03 16:24:49 -05:00
Sam Arnold 8a16bf0531 chore: run goimports -w ./ 2021-01-29 11:40:02 -05:00
Jonathan A. Sternberg 636a27e77f
build(flux): update Flux to v0.64.0 2020-03-11 15:17:44 -05:00
Stuart Carnie 5b58a81700
fix(flux): Flux startup costs should only be paid if Flux is used
This PR lazily initializes Flux built-in functions when Flux is used.

It significantly reduces the startup time of the `influxd` and `influx`
binaries.

Before (4.66s):

```
↳ time bin/18/influx
bin/18/influx  4.66s user 0.19s system 198% cpu 2.441 total
```

After (10ms):

```
↳ time bin/18/influx
bin/18/influx  0.01s user 0.01s system 88% cpu 0.021 total
```
2020-02-03 12:39:00 -07:00
Brandon Farmer fe517fd9ce feat(influxdb): Add proxy path to cli 2020-01-21 10:23:46 -08:00
Jonathan A. Sternberg 40a7a577fc
Update flux version to v0.50.2
This upgrades the flux version to v0.50.2.

The secret service, which is used for alerts, is not included. The
`to()` function is also still not included.
2019-10-29 16:19:14 -05:00
Jonathan A. Sternberg 7ca4e644f1
Update flux version to v0.33.2 (#14208)
The flux in influxdb has been upgraded to use v0.33.2. A lot of
interfaces for the storage engine were changed during this so code had
to change to accomodate the new interfaces and remove the old ones.

Included in this commit is a patch file for the changes that were made.
A patch was generated for the following packages:

* `flux/stdlib/influxdata/influxdb`
* `storage/reads`
* `tsdb/cursors`

These are the three packages that are in common with version 2 of the
database and the first of these packages contains the specific
implementations that are used for version 1.

It is very possible that the next time we upgrade this, the patch will
not apply cleanly just like it wouldn't have applied cleanly to this
update. The patch is mostly meant to document exactly what changed
during the copy over to help ensure we don't forget things when adapting
the interfaces.

Add a patch file to hopefully make this easier in the future
2019-06-27 13:52:02 -05:00
Jonathan A. Sternberg 31501c9dcf
Upgrade flux to the latest version and remove the platform dependency
This integrates the influxdb 1.x series to the latest version of Flux
and updates the code to use it. It also removes the dependency on
platform and copies the necessary code from storage into the 1.x series
so the dependency is unneeded.

The flux functions specific to 1.x have been moved to the same structure
that flux changed to with having a `stdlib` directory instead of a
`functions` directory. It also adds a `databases()` function that
returns the databases from the meta client.
2019-04-04 10:55:09 -05:00
Stuart Carnie 09a9d34430
fix(influx): Ensure credentials are passed for Flux queries
Fixes #11710
2019-03-29 16:39:34 -07:00
Stuart Carnie 216cfa329f feat(flux): Add user authentication and authorization support
* Add AuthorizeDatabase API to QueryAuthorizer to verify a user has
  appropriate access to the specified database
* Update serverFluxQuery handler to require a meta.User when auth is
  enabled
* update Flux createFromSource and createBucketsSource dependencies to
  require Authorizer when auth is enabled in configuration
* update createFromSource to verify read permissions for each bucket
  specified in a Flux query
* update BucketsDecoder, which implements the buckets() Flux function,
  to return buckets that the user has read or write permissions to
* add unit tests to verify authentication is required for Flux HTTP
  requests when auth is enabled in configuration
2018-12-19 14:46:12 -07:00
Stuart Carnie 881f27fe6f fix(flux): Call storage API to correctly map group mode
This fix ensures group(mode:"by") is correctly pushed down to the
storage layer.
2018-12-12 13:03:33 -07:00
Stuart Carnie 39a3d2335e chore(flux): Update to Flux 0.7.1
Resolve breaking API changes
2018-11-30 10:38:56 -07:00
Christopher Wolff 32e28c70ab Remove "Verbose" option from controller.Config (loggler log level will be used instead) 2018-11-26 14:10:59 -08:00
Stuart Carnie a797529f6f feat(flux): Resolve db / rp during from spec creation
This change determines invalid db/rp values sooner and simplifies
implementation in Enterprise
2018-11-21 15:51:52 -07:00
Stuart Carnie 5bcb952b6f chore(cli): Improve APIs to increase reuse in Enterprise 2018-11-02 09:16:42 -07:00
Stuart Carnie 5de5f09676 feat(cli/influx): Display detailed error messages when available
This commit will print any detailed error messages returned by
the server via the `/api/v2/query` API
2018-10-30 13:14:59 -07:00
jlapacik ff416805c5
add Flux output functions (#10433)
* add flux output functions

* update flux dependency
2018-10-30 10:06:02 -07:00
Stuart Carnie 448e8079ad fix(storage): Update to latest flux and platform
* Due to a breaking API change, `BucketsDecoder` was updated to use
  `NewString` vs `NewStringValue`
2018-10-25 15:57:05 -07:00
Stuart Carnie c5ec3a3244 feat(influx): Add Flux support, enabled by specifying -type=flux 2018-10-25 11:12:14 -07:00
Adam 74f2cbe500
added physical implementation for the buckets() function (#10373) 2018-10-17 10:22:07 -04:00
Stuart Carnie b4fed53a68 feat(flux): Update platform / flux packages and implement from source 2018-10-12 07:40:46 -07:00
Jeff Wendling 69dc031a75 Use platform for most of the read service code
This commit deletes most of the code to service reads from influxdb
and pulls it in from platform instead.

Of note, the models.Tag and models.Tags types are now aliases to the
platform models.Tag and models.Tags types. Additionally, many types
in the tsdb package relating to cursors are also aliases to the same
types in the platform cursors package.

This updates the platform and flux repos to the current master in the
Gopkg.lock.
2018-10-10 11:20:25 -06:00
Stuart Carnie 8d07870717 fix(flux): Fix panic when executing a query that returns no results
fixes https://github.com/influxdata/flux/issues/81
2018-10-03 11:55:48 -07:00
Stuart Carnie 552e54ba14 fix(flux): Fix panic when executing a group / distinct query
fixes https://github.com/influxdata/flux/issues/81
2018-10-03 11:55:48 -07:00
Stuart Carnie 3f917e281a chore(flux): Remove debug output 2018-09-17 22:38:27 -07:00
Stuart Carnie 62b9791da8 feat(flux): Add initial support for executing Flux queries 2018-09-17 22:38:27 -07:00