Commit Graph

35343 Commits (db/update-protos)

Author SHA1 Message Date
Sean Brickley 4d33c702e8
build(flux): update flux to v0.174.0 (#23518) 2022-07-05 18:46:53 -04:00
Nathaniel Cook 07bab31fe6
build(flux): update flux to v0.173.0 (#23505)
* build(flux): update flux to v0.173.0

* fix(fluxfmt): update tests for newline in Flux fmt

Flux fmt now explicitly adds a newline to the end of a file, updating
tests accordingly.
2022-06-30 11:39:07 -06:00
Brandon Pfeifer e7cf52298f
feat: implement nightly docker builds without goreleaser (#23498) 2022-06-27 17:23:11 -04:00
Guillaume Claret 3fcc085480
chore: Fix link in the README (#23488) 2022-06-27 12:45:01 -06:00
Jonathan A. Sternberg cbbf4b27da
build(flux): update flux to v0.172.0 (#23494)
* build(flux): update flux to v0.172.0

* refactor(fluxtest): updates the flux test executor to the new interface
2022-06-24 16:32:46 -05:00
Brandon Pfeifer 76cfddb63b
fix: emit zipfile for windows (#23487) 2022-06-23 10:33:03 -04:00
Brandon Pfeifer 85e4e6317e
build: fix release workflow (#23475)
* build: fix release workflow

* fix: allow for multi-digit minor/patch versions
2022-06-17 16:33:46 -04:00
Brandon Pfeifer 83bb8ed2fc
build: update frozen changelog (#23477) 2022-06-17 16:24:47 -04:00
Jeffrey Smith II bf5e6eb0d5
feat: Update Contributing.md to be more accurate for a clean checkout (#23465)
* feat: Update Contributing.md to be more accurate for a clean checkout

* chore: minor formatting
2022-06-17 15:07:42 -04:00
Sam Arnold 21885a7c33
fix: log the log level at startup (#23472) 2022-06-17 14:30:26 -04:00
Jeffrey Smith II 090f681737
feat: Add remotes and replications to telemetry (#23456)
* feat: start work on remotes/replications phone home data

* feat: add remotes/replications phone home data (no tests

* refactor: use erroring binary conversions

* style: gofmt

* refactor: improve some error handling

* style: cleanup

* feat: add tests

* refactor: just list remotes/replications rather than decrement

* chore: linting fix

Co-authored-by: DStrand1 <dstrandboge@influxdata.com>
2022-06-16 14:48:06 -04:00
Dane Strandboge 8bd4fc502d
fix: lost TSI reference / close TagValueSeriesIDIterator in error case (#23461) 2022-06-16 13:35:45 -05:00
Dane Strandboge 9e556864a3
fix: replications remote write failure can deadlock remote writer (#23458) 2022-06-16 11:57:24 -05:00
Jeffrey Smith II 692b0d5153
feat: add instance-id flag for identifying edge nodes (#23447)
* feat: add instance-id flag for identifying edge nodes

* refactor: rename tag to _instance_id
2022-06-16 12:18:11 -04:00
Christopher M. Wolff a492993012
build(flux): update flux to v0.171.0 (#23453)
* build(flux): update flux to v0.171.0

* chore: remove testing.loadStorage from tests

Also update skip lists in Flux test harness

* chore: remove now redundant Go end-to-end unit tests

This testing is all now provided by the `fluxtest` harness.
2022-06-14 15:09:59 -07:00
davidby-influx 53580ead1d
fix: remember shards that fail Open(), avoid repeated attempts (#23437) (#23455)
If a shard cannot be opened, store its ID and last error.
Prevent future attempts to open during this invocation of
influxDB. This information is not persisted.

closes https://github.com/influxdata/influxdb/issues/23428
closes https://github.com/influxdata/influxdb/issues/23426

(cherry picked from commit 54ac7e54ed)

closes https://github.com/influxdata/influxdb/issues/23434
closes https://github.com/influxdata/influxdb/issues/23436
2022-06-14 13:01:11 -07:00
Brandon Pfeifer 841be3ca10
build: remove goreleaser for build workflow (#23423) 2022-06-14 15:55:23 -04:00
Sam Arnold a8054f8497
test: add openapi spec validation to OSS grace tests (#23452) 2022-06-14 15:17:53 -04:00
davidby-influx a9df3f8a7c
fix: fully clean up partially opened TSI (#23430) (#23454)
When one partition in a TSI fails to open, all previously opened
partitions should be cleaned up, and remaining partitions
should not be opened

closes https://github.com/influxdata/influxdb/issues/23427

(cherry picked from commit d3db48e93d)

closes https://github.com/influxdata/influxdb/issues/23432
2022-06-14 11:49:16 -07:00
Jeffrey Smith II d705841a00
feat: error when creating v1 auth with a nonexistent bucket id (#23422)
* feat: error when creating v1 auth with a nonexistent bucket id

* fix: only check for buckets

* refactor: test cleanup for clarity
2022-06-13 15:52:28 -04:00
Jeffrey Smith II a10adf6b0e
feat: add fields to tasks bucket to match cloud (#23406)
* feat: add name field to tasks bucket to match cloud (#23156)

* refactor: Cleanup function signature

* feat: add more fields
2022-06-08 14:19:00 -04:00
Dane Strandboge 910d5a2bac
build: upgrade Go to 1.18.3 (#23410) 2022-06-07 13:09:28 -05:00
davidby-influx 8c9768cdb7
fix: replace unprintable and invalid characters in errors (#23387) (#23395)
Replace unprintable and invalid characters with '?'
in logged errors.  Truncate consecutive runs of them to
only 3 repeats of '?'

closes https://github.com/influxdata/influxdb/issues/23386

(cherry picked from commit 0ae0bd6e2e)

closes https://github.com/influxdata/influxdb/issues/23389
2022-06-01 14:42:51 -07:00
Jamie Strandboge ab8be8016b
chore: update jsonparser to 1.1.1 and yaml.v3 to 3.0.1 (#23385)
* chore: update jsonparser to 1.1.1 and yaml.v3 to 3.0.1

Perform:

  $ go mod edit -require github.com/buger/jsonparser@v1.1.1
  $ go mod edit -require gopkg.in/yaml.v3@v3.0.1
  $ go mod tidy

* chore(tests): adjust for whitespace in test output
2022-06-01 11:20:37 -05:00
Sean Brickley 8f54774146
build(flux): update flux to v0.169.0 (#23384) 2022-05-31 14:05:57 -04:00
Dane Strandboge 9e20f9f3dc
feat: add signifier to replication user agent (#23370) 2022-05-31 11:50:53 -05:00
Jonathan A. Sternberg 2e9e174c24
fix(query/control): add all of the statistics from flux statistics instead of only metadata (#23375)
This changes the statistics merging to use the `Add` method on the
entire statistics struct instead of only the metadata. The purpose of
this is that we want to utilize the existing function for merging the
statistics so that additional properties can be added without modifying
the query controller.

At the same time, there are certain properties that are computed in the
controller and we want to ensure they aren't double counted if flux
starts computing these itself. So we blacklist certain attributes that
we compute so that if flux is modified to return these values, we just
ignore them until we change our own code to use those values.

In immediate terms, we're changing to use the `Add` method so that we
can add profiles to the statistics and have those profiles propagate to
the query controller. This property doesn't exist yet so we can't add it
and we don't want to add it after flux is modified because it could
break the operator profile.

But, we also don't want to only use `Add` because we want to move the
properties such as `TotalAllocated` and `TotalDuration` into flux itself
and to remove the controller. But, the controller needs to be compatible
with whatever changes we make to flux so that there's no circumstance
where functionality stops working.
2022-05-26 09:28:18 -05:00
Brandon Pfeifer afd0b99bdb
build: update changelogger to ignore case when parsing verbs (#23369) 2022-05-24 16:08:04 -04:00
Nathaniel Cook 6222ea2ef8
build(flux): update flux to v0.168.0 (#23363) 2022-05-23 16:44:33 -06:00
Brandon Pfeifer d9065071e9
chore: upgrade flux to v0.167.0 (#23348)
* fix(fluxtest): update Flux tests for new option support

The Flux test harness now allows inheriting options, this updates the
test cases with the new syntax and simplifies any tests that had to
duplicate the options.

* build(flux): update flux to v0.165.0

* chore: upgrade flux to v0.167.0

Co-authored-by: Nathaniel Cook <nvcook42@gmail.com>
Co-authored-by: Paul Hummer <paul@eventuallyanyway.com>
2022-05-17 15:59:44 -04:00
davidby-influx 9c33764b6d
fix: do not panic on cleaning up failed iterators (#21666) (#23319)
We have seen occasional panics in Iterators.Close()
when cleaning up after failed iterator creation.
This commit checks for nil on any iterator to be
closed, and now returns any errors generated by
that Close().

Closes https://github.com/influxdata/influxdb/issues/19579
Closes https://github.com/influxdata/influxdb/issues/19476

(cherry picked from commit acc4105b8c)

closes https://github.com/influxdata/influxdb/issues/23271
2022-04-29 14:21:21 -07:00
Jacob Marble 71a02c2d40
chore: remove previous semantic pull request config (#23305)
* chore: remove previous semantic pull request config

* chore: update pull request template, conventional commit version
2022-04-27 10:27:30 -04:00
Geoffrey Wossum 30a9fd43f6
fix: MeasurementsCardinality should not be less than 0 (#23304)
Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative numMeasurements value in
/debug/vars under some circumstances.

refs #23285

(cherry picked from commit 160cf678d5)
2022-04-26 23:37:09 -05:00
Jacob Marble 438eadc879
chore: use common semantic PR and commit message checks (#23300)
After this is merged, the old semantic checker can be disabled, and its config file removed from the repository.
2022-04-26 11:30:48 -07:00
Paul Hummer 1805f4b575
build(flux): update flux to v0.164.1 (#23280) 2022-04-19 10:03:18 -06:00
Dane Strandboge 05840ce2a6
fix(systemd): fix operator in host detection (#23276)
original PR: #22859
2022-04-14 15:14:10 -05:00
Alfonso Acosta c535994992
fix: remove controller 64bit misalignment (#23260)
See https://pkg.go.dev/sync/atomic#pkg-note-BUG fore more details
2022-04-14 14:22:47 -05:00
Nathaniel Cook 24f64a735f
fix(annotations): skip flaky annotation tests (#23275)
See https://github.com/influxdata/influxdb/issues/23272
2022-04-14 11:00:29 -06:00
Dane Strandboge 82d1123e78
build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
Paul Hummer cf1f2e2414
build(flux): update flux to v0.164.0 (#23269) 2022-04-13 13:43:17 -06:00
Jonathan A. Sternberg bb849050b1
build(flux): update flux to v0.163.0 (#23259) 2022-04-08 10:07:25 -05:00
Jonathan A. Sternberg 72c4c55609
build(flux): update flux to v0.162.0 (#23255) 2022-04-05 16:10:41 -05:00
Dane Strandboge 359fcc46b5
feat: add maximum age to replication queues (#23206)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2022-03-25 13:06:05 -05:00
Jonathan A. Sternberg 89916ec98a
build(flux): update flux to v0.161.0 (#23227) 2022-03-24 16:27:32 -05:00
Jonathan A. Sternberg 5231d2d197
feat(query): enable the mqtt pool dialer by default (#23226) 2022-03-24 12:35:10 -05:00
Phil Bracikowski 050449803a
fix(models): reset provided slice correctly (#23223)
A preallocated slice needs to be cleared to be used with append,
otherwise the existing elements will be seen in the result and this does
not appear to be the intention. The bug doesn't seem to have caused
issues as no callsites use a preallocated slice.
2022-03-24 07:37:48 -07:00
Jamie Strandboge e304ef9764
fix: add write permissions check for DELETE and DROP MEASUREMENT (#23219)
We previously allowed read tokens access to all of v1 query, including
InfluxQL queries that made state changes to the DB, specifically,
'DELETE' and 'DROP MEASUREMENT'. This allowed tokens with only read
permissions to delete points via the legacy /query endpoint.
/api/v2/query was unaffected.

This adjusts the behavior to verify that the token has write permissions
when specifying 'DELETE' and 'DROP MEASUREMENT' InfluxQL queries. We
follow the same pattern as other existing v1 failure scenarios and
instead of failing hard with 401, we use ectx.Send() to send an error to
the user (with 200 status):

{"results":[{"statement_id":0,"error":"insufficient permissions"}]}

Returning in this manner is consistent with Cloud 2, which also returns
200 with "insufficient permissions" for these two InfluxQL queries.

To facilitate authorization unit tests, we add MustNewPermission() to
testing/util.go.

Closes: #22799
2022-03-24 07:28:38 -05:00
Jonathan A. Sternberg 5e3ea7b94c
refactor(flux): convert the allocator into an interface (#23214)
This follows the changes from influxdata/flux#4539.
2022-03-22 12:33:52 -05:00
Jamie Strandboge 2c930fd127
feat: add --hardening-enabled option to limit flux/pkger HTTP requests (#23207)
Flux HTTP and template fetching requests do not perform IP address
checks for local addresses. This behavior on the one hand allows SSRF
(Server Side Request Forgery) attacks via authenticated requests but on
the other hand is useful for scenarios that have legitimate requirements
to fetch from private addresses (eg, hosting templates internally or
performing flux queries to local resources during development).

To not break existing installations, the default behavior will remain
the same but a new --hardening-enabled option is added to influxd to
turn on IP address verification and limit both flux and template
fetching HTTP requests to non-private addresses. We plan to enable new
security features that aren't suitable for the default install with this
option.  Put another way, this new option is intended to be used to make
it easy to turn on all security options when running in production
environments. The 'Manage security and authorization' section of the
docs will also be updated for this option.

Specifically for flux, when --hardening-enabled is specified, we now
pass in PrivateIPValidator{} to the flux dependency configuration. The
flux url validator will then tap into the http.Client 'Control'
mechanism to validate the IP address since it is called after DNS lookup
but before the connection starts.

For pkger (template fetching), when --hardening-enabled is specified,
the template parser's HTTP client will be configured to also use
PrivateIPValidator{}. Note that /api/v2/stacks POST ('init', aka create)
and PATCH ('update') only store the new url to be applied later with
/api/v2/templates/apply. While it is possible to have InitStack() and
UpdateStack() mimic net.DialContext() to setup a go routine to perform a
DNS lookup and then loop through the returned addresses to verify none
are for a private IP before storing the url, this would add considerable
complexity to the stacks implementation. Since the stack's urls are
fetched when it is applied and the IP address is verified as part of
apply (see above), for now we'll keep this simple and not validate the
IPs of the stack's urls during init or update.

Lastly, update pkger/http_server_template_test.go's Templates() test for
disabled jsonnet to also check the contents of the 422 error (since the
flux validator also returns a 422 with different message). Also, fix the
URL in one of these tests to use a valid path.
2022-03-18 10:25:31 -04:00
Sam Arnold a40e12b615
feat: allow changing a password with `influxd recovery user update` (#23202)
Closes: #23158
2022-03-18 08:04:29 -04:00