Commit Graph

21 Commits (1873ad5234e895e7dfec0e309d91fb338349061a)

Author SHA1 Message Date
Nathaniel Cook 7069a06864 fix: Update internal HTTP paths for query service
Since all paths for the various query services were the same even though
the API was different it was confusing to work with and debug.
Now all internal paths have a unique name.
2018-09-20 08:43:48 -07:00
Nathaniel Cook 672e2d5fe7 chore: Updates to be able to remove platform as a dependency of Flux 2018-09-12 10:18:54 -06:00
Stuart Carnie ac75af2f58 refactor: Migrate query package to influxdata/flux repository 2018-09-06 11:13:48 -07:00
Chris Goller 8fa72fa35b feat(auth): allow authorizations to be enabled/disabled 2018-08-29 13:07:38 -05:00
Nathaniel Cook f6923881f7 feat: Add zap opentracing.Tracer
Propogate opentracing spans through HTTP requests.
Use zap logger to log each span as it is finished.
2018-08-16 14:32:04 -06:00
Nathaniel Cook 5bde0b5be6 fix: Update query services to use Request type
Moves idpe.QueryService into platform/query.ProxyQueryService
Splits the Request into ProxyRequest and Request.

Changes query.QueryService and query.AsyncQueryService to use a Request
type. This means that the Compiler interface is consumed by the service
to abstract out transpilation vs Flux compilation vs raw spec.

The transpiler handler is removed.

There are separate http handlers and service implementations for each of
the three query services.

Query logging types are moved into platform.

The ResultIterator now expects Cancel to always be called.

The fluxd binary exposes the query endpoint specified in the swagger
file.
2018-08-08 15:31:35 -06:00
Michael Desa 8c87c9d132 revert #442 2018-08-01 14:54:32 -04:00
Leonardo Di Donato 3191de776d Refactoring code using platform.IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato c59e4e8a50 Refactoring http package 2018-08-01 18:20:59 +02:00
Iris Scholten f70a4553bf feat(http): Add /ping endpoint to fluxd
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-07-25 12:21:59 -07:00
Nathaniel Cook 2fe60c3ce2 fix: Defer writing HTTP headers in query service
This makes it so we can encode errors in HTTP headers so long as the
encoder did not write anything.

This also changes the behavior to encode the stats trailer even in the
event of an error.
2018-07-17 13:43:20 -06:00
Nathaniel Cook 85b7d36147 feat: Add query statistics
Introduces the Statisticser interface which ResultIterators may
implement.

The HTTP implementation uses HTTP trailers to preserve the statistics.
This way we do not need to have all encoders and decoders support
statistics.
2018-07-17 09:16:27 -06:00
Nathaniel Cook b63394da0a fix(errors): Update Fluxd errors
This PR also completes some TODOs about kit/errors and http/errors.
2018-06-28 16:56:35 -06:00
Nathaniel Cook d1ca38c71f chore(ifql): Rename IFQL to Flux 2018-06-11 09:26:10 -06:00
Jonathan A. Sternberg 911f053dd6 fix(http): keep the http response body open until the result has been read
This modifies the `MultiResultDecoder` interface to accept an
`io.ReadCloser` so the `ResultIterator` can close the `io.Reader`
instead of doing it through a defer call. It then makes it so the
`Cancel()` method will close the reader or the reader will be
automatically closed when `More()` returns false.
2018-05-25 15:03:52 -05:00
Nathaniel Cook 99f4e4a8b4 fix(query/csv): Encode result iterator errors
This change also adds Name() to the Result interface to allow for
correct MultiResultEncoding.
2018-05-24 16:38:50 -06:00
Jonathan A. Sternberg e18879370b feat(http): perform error handling in the transpiler and the query service
The query service now handles some errors (not all) from the ifqld
service. This way, the transpiler, which uses the query service, can
report when it encounters an error from ifqld.

The transpiler will now correctly return errors in the JSON response.
2018-05-24 17:14:16 -05:00
Nathaniel Cook affc7e3976 move types around to avoid cyclic imports 2018-05-21 17:02:42 -06:00
Nathaniel Cook 20345b8701 rewrite imports 2018-05-21 15:20:06 -06:00
Nathaniel Cook c0b01f16f8 update transpiler and influxql encoders 2018-05-19 15:28:37 -06:00
Adam 64e3c840ea Relocated several source files from private repo to here. 2018-05-17 11:35:53 -04:00