Commit Graph

578 Commits (4d377b2fb099eb00a5bb99e80bccc97484dd996d)

Author SHA1 Message Date
Jonathan A. Sternberg 45c51128ae build(flux): update Flux to v0.64.0 2020-03-12 10:08:45 -07:00
Yiqun (Ethan) Zhang 5333ff4d1b
feat(transpiler): support difference(), group by wildcard, and correc… (#17021)
* feat(transpiler): support difference(), stddev(), spread(), group by wildcard, and correct _time column
2020-03-06 11:19:46 -05:00
Christopher M. Wolff 027d29dd30
chore: update to Flux version v0.63.0 (#17083) 2020-03-03 13:17:37 -08:00
Christopher M. Wolff 7547ab8fc2
chore: update to Flux v0.62.0 (#17048) 2020-02-28 10:53:10 -08:00
docmerlin (j. Emrys Landivar) cbbb5db71a fix(tasks): update to newer github.com/influxdb/cron 2020-02-24 09:20:05 -06:00
Jonathan A. Sternberg 7c88946eab
build(flux): update flux for promqltests (#16968) 2020-02-21 14:23:16 -06:00
Christopher M. Wolff 2535d54087
chore: update to Flux v0.60.0 (#16936) 2020-02-19 15:02:21 -08:00
Nathaniel Cook 9f7d4f9be0
feat(query): adds support for influxql as language type for queries (#16712)
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.
2020-02-07 15:20:50 -07:00
Nathaniel Cook c46045e673
fix(influxql): update all links to transpiler issues to new github urls (#16728)
The platform repo was removed and the issues migrated. For ease in tracking progress the issues have been
updated with their new influxdb repo links.
2020-02-06 15:59:46 -07:00
Jonathan A. Sternberg 0ec9a8b6b8
build(flux): update Flux to v0.59.4 2020-01-21 11:27:06 -06:00
Faith Chikwekwe 2f6c6791b9
build(flux): update Flux to v0.59.3 2020-01-21 11:26:46 -06:00
Lorenzo Affetti 0e0b36be0c feat(task): make task query without returning content 2020-01-17 16:51:01 +01:00
Lorenzo Affetti 1d0ea8ab64 feat(query): add 'Prefer: return-no-content-with-error' behavior 2020-01-15 16:42:29 +01:00
Lorenzo Affetti 48e130a28f
Merge pull request #16356 from influxdata/feat/discard-output
feat(query): add dialect to discard output
2020-01-08 17:28:32 +01:00
Yiqun Zhang 74ba877cb9
feat: opentracing in query execution runtime 2020-01-08 11:16:13 -05:00
Lorenzo Affetti dc4900e252 feat(query): add dialect to discard output 2020-01-08 16:46:52 +01:00
Gavin Cabbage 6fe69549d4 feat(query): add source to query request via user agent header 2020-01-07 09:28:49 -05:00
Jonathan A. Sternberg 6d22f81904
build(flux): update Flux to v0.58.0 2020-01-06 14:09:16 -06:00
Jonathan A. Sternberg 9194d89bbc
feat(query/stdlib): prevent a filter push down if the filter needs to keep empty tables (#16295)
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.
2020-01-06 12:23:31 -06:00
Jacob Marble a2b2d828ee
fix(query): revert promqltests/go.sum (#16307)
Looks like #13370 mistakenly included a bad go.sum change
2019-12-20 11:22:31 -08:00
timhallinflux ef5f1bb0af docs: create CONTRIBUTING.md
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
2019-12-20 10:36:40 +00:00
George ff38420558
feat(tasks): remove flux stats from run log and replace with trace id (#16263)
* feat(tasks): trace id in task run logs

* refactor(tracing): move trace info utility into kit/tracing package
2019-12-18 16:30:38 +01:00
Jonathan A. Sternberg 791cf15cd3
build(flux): update Flux to v0.57.0 2019-12-10 13:26:10 -06:00
Gavin Cabbage f1975bb268 refactor(logger): use TraceInfo in TraceFields 2019-12-10 09:06:33 -05:00
Gavin Cabbage b7c2c997d2 feat(query): annotate logger with trace id 2019-12-10 09:06:33 -05:00
Johnny Steenbergen ad841608ca chore(http): refactor bucket|dashboard|label|umr|var http clients to use reusable HTTP client
this is a step towards providing a shared http client that manages  pooling connections,
timeouts, and reducing GC for by not creating/GCing a client each req. Bring on the red!
2019-12-09 09:44:41 -08:00
Lorenzo Affetti f765612ec1 feat(query): add trace_id and sampled to the query log 2019-12-05 16:06:15 +01:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* chore: Remove several instances of WithLogger

* chore: unexport Logger fields

* chore: unexport some more Logger fields

* chore: go fmt

chore: fix test

chore: s/logger/log

chore: fix test

chore: revert http.Handler.Handler constructor initialization

* refactor: integrate review feedback, fix all test nop loggers

* refactor: capitalize all log messages

* refactor: rename two logger to log
2019-12-04 15:10:23 -08:00
Nathaniel Cook fd63ff17f3
feat(cmd/influx): add command to manually transpile InfluxQL to Flux (#16119) 2019-12-04 13:31:20 -07:00
Christopher M. Wolff ec288a6434
fix(query): update version of Flux in promqltests (#16091) 2019-12-03 11:07:12 -08:00
Jonathan A. Sternberg d7ddcf5abc
feat(query): enable optimized pivot push down rule (#16073)
Use the optimized pivot when the influxdb source is being used.
2019-12-03 09:16:19 -06:00
Christopher M. Wolff 291f7b3e19
build(flux): update Flux to v0.54.0 (#15851) 2019-11-12 08:38:57 -08:00
Christopher M. Wolff 360a3d9d53
build(query): update promqltests to latest Flux version (#15786) 2019-11-06 12:22:42 -08:00
Christopher Wolff 51c92fd0ed test(query): reskip flakey test
https://github.com/influxdata/influxdb/issues/15667
2019-10-30 14:22:59 -07:00
Christopher Wolff 7aa1fccee0 test(query): unskip skipped PromQL transpiler end-to-end .flux tests 2019-10-30 10:40:03 -07:00
Julius Volz e4558257e3 test(query): add PromQL end-to-end tests in go submodule
Signed-off-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>

move to internal

update flux to v0.50

Revert "move to internal"

This reverts commit bcd4caffbd44135f1dbeac4163cb2a22a751f45a.

promtests/internal --> internal/promtests
2019-10-28 18:59:50 +01:00
Jonathan A. Sternberg 33c3f92329
fix(query/stdlib): fix rewritten pushable expressions when a logical expression is present (#15557)
When `exists` was used in conjunction with any other pushed down
expression, the `exists` was not rewritten properly because the rewrite
did not descend into logical expressions.

This is now fixed so those expressions will be rewritten correctly. This
affected the following form:

    filter(fn: (r) => r._measurement == "cpu" and exists r.host)

It did not affect the following:

    filter(fn: (r) => r._measurement == "cpu")
    |> filter(fn: (r) => exists r.host)
2019-10-23 15:59:20 -07:00
Jonathan A. Sternberg f82e6b2626
chore(query/stdlib): skip flaky tests regarding storage meta queries (#15451) 2019-10-17 09:54:44 -07:00
Jonathan A. Sternberg 74829b025c
refactor(query/stdlib): update flux end to end tests for package subtests (#15392) 2019-10-15 09:18:21 -05:00
Jonathan A. Sternberg 8ac8ecdb31
feat(query/control): include variable memory limits for the controller (#15300)
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()`.
2019-10-15 09:18:00 -05:00
Jonathan A. Sternberg eacc1b0d9c
fix(query): update the QueryServiceProxyBridge to check for an error properly (#15353)
The QueryServiceProxyBridge would not check for errors properly because
it would return any error encountered when running the query as a read
error on the `io.Reader`. This made it so that the csv decoder could not
identify if the error was related to the query or if it was related to
reading. The csv decoder needed to tell the difference because an error
with reading from the `io.Reader` needs to be returned as a decoder
error while an error from the query needs to be returned as-is.

Instead of adapting the csv decoder to do that, we instead lazily
initialize the result iterator when `More()` is called and call `Peek()`
on the reader. If no bytes can be read, we assume this was an error
while executing the query and return it as such. If we are able to read
at least one byte, we decode it through the csv decoder.
2019-10-09 11:06:32 -07:00
Lyon Hill 5e1d7f6c69
feat(task): remove preauth (#15286)
* feat(task): remove preauth

* fix(task): remove e2e test that verified preauth
2019-09-26 10:52:24 -06:00
Christopher Wolff 26dbd9225c feat(query/stdlib/experimental): add experimental.to() implementation to OSS 2019-09-20 14:31:58 -07:00
Lorenzo Affetti 9532c9d170 fix(testing): skip unbounded e2e test 2019-09-19 17:51:45 +02:00
Lorenzo Affetti 2a6cfe3c78 fix(query): inject dependencies in context for BucketAccessed 2019-09-19 17:31:13 +02:00
Lorenzo Affetti 3f50cd2af9 Merge branch 'master' into flux-staging-v0.48.x 2019-09-19 17:20:40 +02:00
Jonathan A. Sternberg cbd04f2884
refactor: http error serialization matches the new error schema (#15196)
The http error schema has been changed to simplify the outward facing
API. The `op` and `error` attributes have been dropped because they
confused people. The `error` attribute will likely be readded in some
form in the future, but only as additional context and will not be
required or even suggested for the UI to use.

Errors are now output differently both when they are serialized to JSON
and when they are output as strings. The `op` is no longer used if it is
present. It will only appear as an optional attribute if at all. The
`message` attribute for an error is always output and it will be the
prefix for any nested error. When this is serialized to JSON, the
message is automatically flattened so a nested error such as:

    influxdb.Error{
        Msg: errors.New("something bad happened"),
        Err: io.EOF,
    }

This would be written to the message as:

    something bad happened: EOF

This matches a developers expectations much more easily as most
programmers assume that wrapping an error will act as a prefix for the
inner error.

This is flattened when written out to HTTP in order to make this logic
immaterial to a frontend developer.

The code is still present and plays an important role in categorizing
the error type. On the other hand, the code will not be output as part
of the message as it commonly plays a redundant and confusing role when
humans read it. The human readable message usually gives more context
and a message like with the code acting as a prefix is generally not
desired. But, the code plays a very important role in helping to
identify categories of errors and so it is very important as part of the
return response.
2019-09-19 10:06:47 -05:00
Lorenzo Affetti ab835c8e0e
refactor(dependencies): use new dependency injection framework (#15174)
refactor(dependencies): use new dependency injection framework
2019-09-19 17:01:17 +02:00
Christopher Wolff eb15b346cc chore: update to Flux v0.47.1 2019-09-18 11:51:46 -07:00
Lorenzo Affetti 95ba072f92
Merge pull request #15137 from influxdata/flux-staging-v0.47.x
build(flux): update Flux to v0.47.0
2019-09-13 19:05:42 +02:00