Commit Graph

14811 Commits (v1.11.5)

Author SHA1 Message Date
Brandon Pfeifer 70acbd58a8
fix: correct dependencies in package builds (1.11) (#24670)
* chore: update ubuntu to 2204:current

* fix: install asciidoc with pip
2024-02-14 15:36:55 -05:00
Jack 8b9a9c63c5
fix: panic index out of range for invalid series keys (#24565) (#24595)
* chore: add scaffolding for naive solution

* feat: test case scaffolding

* fix: implement check for series key before proceeding

* fix: add validation for ReadSeriesKeyMeasurement usage

* refactor: explicit use of series key len

* feat: add remaining check to index

* feat: add check to remaining files

As the Len function is used as part of the parseSeriesKey, this also needs to be accounted for on the nil return from this function as it is used in different contexts

* feat: expand test cases

* chore: go fmt

* chore: update test failure message

* chore: impl feedback on unnecessary sz checks

* feat: expand test cases

* fix: nil series key check

In both sections for index.go there is a pre-existing length check against the series key which should catch invalid values, perhaps this explains why it hasn't cropped up in the reported panics. For even more safety, we can also skip a nil key because we know that subsequent calls will cause a panic where this key is attempted to be used

* fix: remove nil tags check

A key with no tags is valid, so we should not check for BOTH nil key and tags as a key could be nil, which is invalid, yet still have tags and therefore cause the check to pass which we do not want

* feat: extend test cases from feedback

* fix: extend checks for CompareSeriesKeys

* feat: add nilKeyHandler for shared key checking logic

* fix: logical error in nilKeyHandler

Prior to this, the else was always defaulted to at the end of the conditional branch, which causes unexpected behaviour and a failure of a bunch of tests.

* fix: return tags keep nil data

In a recent change to this, we agreed on a simple name == nil check for the actual data. As a follow on to this, I just realised that we don't actually want to nil back the tags, even if they're not checked, because having no tags is a valid input so we can simply return whatever we were passed unchanged.

* fix: use len == 0 for extra safety

* feat: extra test for blank series key
2024-01-23 17:07:52 +00:00
alespour 0d9f492ceb
chore: upgrade golang 1.20.10 -> 1.20.13 (#24592) 2024-01-23 10:26:50 -06:00
davidby-influx c7e3dc1171
chore: upgrade flux (#24505)
* chore: upgrade flux

* chore: execute "go generate" inside cross-builder (#24583)

---------

Co-authored-by: Brandon Pfeifer <bpfeifer@influxdata.com>
2024-01-19 17:37:14 -05:00
Geoffrey Wossum 6c833df06d
fix: prevent retention service creating orphaned shard files (#24544)
Under certain circumstances, the retention service can fail to delete shards from
the store in a timely manner. When the shard groups are pruned based on age, this
leaves orphaned shard files on the disk. The retention service will then not attempt
to remove the obsolete shard files because the meta store does not know about them.
This can cause excessive disk space usage for some users.

This corrects that by requiring shards files be deleted before they can be removed
from the meta store.

Backport via clean cherry-pick of #24530.

fixes: #24543

(cherry picked from commit 7bd3f89d18)
2024-01-04 14:08:38 -06:00
davidby-influx 7116861f37
fix: avoid SIGBUS when reading non-std series segment files (#24509) (#24515)
Some series files which are smaller than the standard
sizes cause SIGBUS in influx_inspect and influxd, because
entry iteration walks onto mapped memory not backed by the
the file.  Avoid walking off the end of the file while
iterating series entries in oddly sized files.

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

Co-authored-by: Geoffrey Wossum <gwossum@influxdata.com>
(cherry picked from commit 969abf3da2)

closes https://github.com/influxdata/influxdb/issues/24510
2023-12-11 16:22:32 -08:00
Brandon Pfeifer 7f8b2ab2bb
chore: upload artifacts to another bucket (#24491) 2023-11-27 17:22:07 -05:00
alespour 25a8d95191
build(deps): upgrade flux to v0.194.4 (#24445) 2023-11-03 08:18:48 -04:00
Brandon Pfeifer 30ea6380ec
chore: upgrade golang 1.19.10 -> 1.20.10 (#24412) 2023-10-12 12:46:00 -04:00
davidby-influx 734d25f3fd
fix: do not escape CSV output (#24311) (#24313)
CSV output is incorrectly escaped.
Add a boolean flag to tag output
functions to prevent this.

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

(cherry picked from commit 2dc3dcb3d1)

closes https://github.com/influxdata/influxdb/issues/24310
2023-06-29 13:35:38 -07:00
Brandon Pfeifer 02cdb0692b
chore: fix package permissions (1.11) (#24303)
* chore: replace "package builder" shell/docker implemention with python

* chore: remove unused packaging files
2023-06-26 12:23:45 -04:00
alespour a21b914c9c
chore: upgrade to Go 1.19.10 (#24294) 2023-06-20 09:57:38 -05:00
Brandon Pfeifer 37f6f82be4
chore: generate "influxdb.${CIRCLE_TAG}.digests" for each release (#24271) 2023-06-08 06:21:28 -04:00
Brandon Pfeifer fddbfe6a14
fix: execute "compact-series-file" at startup (1.11) (#24261)
* chore: delete unused signing script

* fix: execute "compact-series-file" at startup

* fix: add "INFLUXD_OPTS" to "influxd config" line

* fix: use CONFIG to store influxd config path
2023-06-05 15:02:42 -04:00
davidby-influx a03051adee
fix: series file index compaction (#23916) (#24259)
Series file indices monotonically grew even
when series were deleted.  Also stop
ignoring error in series index recovery

Partially closes https://github.com/influxdata/EAR/issues/3643

(cherry picked from commit 53856cdaae)
2023-06-01 10:58:52 -07:00
Brandon Pfeifer 87755184ff
chore: upgrade flux to v0.194.3 (#24253) 2023-05-30 19:02:16 -04:00
davidby-influx eaa4c95de2
fix: prevent world-writable MANIFEST files (#24235) (#24236)
When a new MANIFEST file is created, set
its permissions to 644, not 666

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

(cherry picked from commit aad79e471f)

closes https://github.com/influxdata/influxdb/issues/24234
2023-05-18 12:20:57 -07:00
davidby-influx e05cc9667e
fix: /api/v2/delete - user nil sources field, do not set measurement db or rp (#24223)
* fix: do not set measurement db or rp in V2 delete (#24141)

Setting the DB or RP in measurements extracted from
the predicate and used as sources causes Enterprise
/api/v2/delete to fail. The DB must explicitly be passed
to Store.Delete without being set in the measurement
struct passed as a source.

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

(cherry picked from commit c31e99574f)

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

* fix: use nil Sources field in /api/v2/delete (#24145)

An empty slice in Sources causes an empty
WHERE clause to be generated by
Statement.String(). Use a nil in the field
to omit the WHERE clause completely

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

(cherry picked from commit f365bb7e3a)

closes https://github.com/influxdata/influxdb/issues/24146
2023-05-03 09:37:36 -07:00
Brandon Pfeifer 2635d9af75
chore: use remote package signing (#24206) 2023-04-18 22:22:22 -04:00
Jamie Strandboge ba0109dd70
chore: upgrade to Go 1.19.8 (#24199) 2023-04-12 15:56:48 -05:00
Jamie Strandboge 7e09795f6a
chore: update to go 1.19.6 (#24116) 2023-03-01 15:42:39 -06:00
Jeffrey Smith II 906c090a48
fix(security): bump several dependencies to fix security issues (#24109) 2023-02-27 17:16:18 -05:00
Jeffrey Smith II 77994a1777
chore: go mod tidy (#24072) (#24074) 2023-02-01 13:22:02 -05:00
Jeffrey Smith II d228760b69
feat: add the ability to log queries killed by `query-timeout` (#23978) (#24048)
* feat: add the ability to log queries killed by `query-timeout`

* chore: update example config

* chore: improve logging details
2023-01-20 10:29:26 -05:00
Geoffrey Wossum 7c53a4c5de
chore: eliminate use of `golang.org/x/crypto/ssh/terminal` package (#24047)
The CLI code used a single function from the `golang.org/x/crypto/ssh/terminal`
package (`terminal.IsTerminal`) which is just a wrapper around the
`golang.org/x/term` package's `term.IsTerminal` function. Replacing this
call prevents unnecessary and non-FIPS crypto functions from being pulled
into the binary.

Backport of #24306

closes: #24037
(cherry picked from commit 955f78a2cd)
2023-01-17 17:02:32 -06:00
Geoffrey Wossum 3d993b1ecc
chore: eliminate use of `golang.org/x/crypto/ssh/terminal` package (#24039)
The CLI code used a single function from the `golang.org/x/crypto/ssh/terminal`
package (`terminal.IsTerminal`) which is just a wrapper around the
`golang.org/x/term` package's `term.IsTerminal` function. Replacing this
call prevents unnecessary and non-FIPS crypto functions from being pulled
into the binary.

Backport of #24306

closes: #24037
(cherry picked from commit 955f78a2cd)
2023-01-13 16:14:21 -06:00
davidby-influx 98ffc2097f
fix: support absolute file paths in check-schema (#23991) (#23995)
Absolute file paths in influx_inspect check-schema
cause an 'Invalid Argument' error. This was caused
fs.WalkDir using fs.ValidPath. Replacing with
filepath.WalkDir permits absolute paths.

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

(cherry picked from commit 144aca1f7f)

closes https://github.com/influxdata/influxdb/issues/23994
2022-12-19 13:47:09 -08:00
Jamie Strandboge ceabe684d4
chore: update Go to 1.19.4 (#23972) 2022-12-07 15:31:19 -06:00
Geoffrey Wossum ac350884d7
feat: include `crypto` diagnostics in `/debug/vars` output (#23948)
* feat: include `crypto` diagnostics in `/debug/vars` output

Pulls `crypto` diagnostics and includes them in `/debug/vars` output.
If no `crypto` diagnostics are available, then OSS crypto information will
be shown instead.

closes: #23947
2022-12-06 12:02:30 -06:00
Brandon Pfeifer e484c4d871
chore: upgrade Go to v1.19.3 (1.x) (#23941)
* chore: upgrade Go to 1.19.3

This re-runs ./generate.sh and ./checkfmt.sh to format and update
source code (this is primarily responsible for the huge diff.)

* fix: update tests to reflect sorting algorithm change
2022-11-28 12:15:47 -05:00
Brandon Pfeifer e68b64c57b
chore: make "flux-testing" public (#23935) 2022-11-21 14:10:10 -05:00
davidby-influx fd7e4aa0f7
chore: fix trace message text (#23917) 2022-11-16 08:40:10 -05:00
Brandon Pfeifer 5976e41d54
feat: upgrade flux to v0.188.0 (#23911)
* feat: upgrade flux to 0.171.0

Tests failing, safety commit

First step in https://github.com/influxdata/influxdb/issues/23815

* fix: remove "org" parameter" from writeOptSource

I attempted to implement the "orgOpt" argument in a similar fashion
to f6669f7512. However, it looks like Flux doesn't accept "org" as
a parameter to "load". It responds with:

Error calling function \"load\" @113:16-113:30: error calling function \"to\" @6:19-6:47: unused arguments [org]

This brings us from 194 passing to 570 passing.

* fix: temporarily disable broken flux tests

These tests expect rows to be stored in a certain order. However,
nothing is specifying the sort order. This has been fixed in a
later update to flux: (see 3d6f47ded).

Temporarily disable these tests until we include a fixed
version of the flux tests.

* chore: add tests from a492993012

This fixes "test-flux.sh" so it runs tests within the "flux/"
directory. This uncovered some other issues with the tests
located within "flux/". These also needed to be updated
to match the newer flux API.

* feat: upgrade flux to 0.172.0

This includes changes made in "cbbf4b27da". Since "test.go" in 2.x
diverged from 1.x, some modifications were required to make this
compatible.

* feat: upgrade flux to 0.173.0

* feat: upgrade flux to v0.174.0

* fix: Update the condition when reseting cursor (#23522)

Filters that contain `or` may change between cursor resets so we must remember to update the condition in the read cursor.

```flux
|> filter(fn: (r) => ((r["_field"] == "field1" and r["_value"]==true) or (r["_field"] == "field2" and r["_value"] == false)))
```

Closes https://github.com/influxdata/flux/issues/4804

* feat: upgrade flux to 0.174.1

* feat: upgrade flux to 0.175.0

* chore: remove end-to-end tests

These were removed in a492993 for 2.x. These tests prevent "go test ./..."
from completing. As stated in the original commit, these tests should now be
handled by the "fluxtest" harness.

* feat: upgrade flux to 0.176.0

Some tests needed to be disabled within the flux harness. This is a
result of enabling "Optimize Aggregate Window" in flux@05a1065f.
These tests are not present in 2.x. Therefore, I am unsure if
the breakage is resolved in a later commit.

* feat: upgrade flux to 0.177.0

* feat: upgrade flux to 0.178.0

* feat: upgrade flux to v0.179.0

This removes all invocations of "flux.RegisterOpSpec". According
to flux@e39096d5, "flux.RegisterOpSpec" does nothing in the
current version of flux and was removed.

* chore: update fluxtest skip list (#23633)

* chore: manually backport 785a465e9a

This removes the reference to "flux.Spec".

* build(flux): update flux to v0.181.0 (#23682)

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

* chore: skip more Flux acceptance tests

There are issues for each skip detailed in test-flux.sh.

* feat: upgrade flux to v0.185.0

This adds "FluxTesting" to the "HTTPD" configuration. This option is
hidden and disabled by default. When "FluxTesting" is set, it
enables the default testing flags for "Flux".

These flags allow the "vectorized float tests" and tests requiring
the "removeRedundantSortNodes" and "labelPolymorphism" flag
enabled to work. These changes are based off of d8553c002e.

flux@3d6f47ded is included within this version of Flux. Therefore
we can now include the "group_*" tests.

* feat: upgrade flux to 0.186.0

* feat: upgrade flux to 0.187.0

* feat: upgrade flux to 0.188.0

* fix: re-run ./generate.sh with updated protoc

* fix: restrict cores to match CircleCI documentation

Co-authored-by: davidby-influx <dbyrne@influxdata.com>
Co-authored-by: Markus Westerlind <marwes91@gmail.com>
Co-authored-by: Sean Brickley <sean@wabr.io>
Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>
2022-11-15 15:20:27 -05:00
davidby-influx be9a3d4a07
fix: :db/:rp -> :dbrp, fixed create bucket, update bucket (#23898) (#23900)
Fix URL processing for V2 buckets API, add error checking.

(cherry picked from commit 636fbb3f79)

Co-authored-by: Vlasta Hajek <vlastimil.hajek@bonitoo.io>
2022-11-11 14:19:05 -08:00
Sam Arnold 9e9f1be574
fix: remove dead iterator (#23888) 2022-11-09 16:24:01 -05:00
davidby-influx a2fca83af0
fix: don't write skipped shard messages to the line protocol output destination (#23727) (#23885)
This switches so that the message

    skipped missing file: /path/to/tsm.tsm

is written to stdErr instead of stdout (or the output file if `-out` has been provided)

(cherry picked from commit a9bf1d54c1)

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

Co-authored-by: Ben Tasker <88340935+btasker@users.noreply.github.com>
2022-11-09 09:58:45 -08:00
davidby-influx b0e44a4659
fix: listBuckets properly returns wrapped response (#23879) (#23884)
closes https://github.com/influxdata/influxdb/issues/23861

(cherry picked from commit e6e0fd2d9c)

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

Co-authored-by: Vlasta Hajek <vlastimil.hajek@bonitoo.io>
2022-11-09 09:57:46 -08:00
davidby-influx cc26b7653c
fix: remove breaking argument validation for _fieldKeys iterator (#23875)
New argument validation code for _fieldKeys system iterator 
broke Enterprise tests because it is misused all over the 
place. Back out the safety check.
2022-11-09 09:04:44 -08:00
davidby-influx f5da0f50f4
fix: Optimize SHOW FIELD KEY CARDINALITY (#23871)
Use the _fieldKeys system iterator

closes https://github.com/influxdata/influxdb/issues/23840
2022-11-08 08:32:10 -08:00
Sam Arnold 1d92b7a8fc
fix: response writer simplification (#23846)
Also a performance improvement for when we don't need to write
series keys that have no data.
2022-11-04 15:24:11 -04:00
davidby-influx bfccddc7b6
fix: log errors in continuous query statistics storage (#23822) 2022-10-19 08:33:44 -07:00
Jamie Strandboge d31e74c07c
chore: upgrade to Go 1.18.7 (#23821) 2022-10-18 14:30:47 -05:00
Brandon Pfeifer 1253ff8fea
chore: update to use scheduled pipeline (1.x) (#23808)
* chore: update to use scheduled pipeline

* chore: add documentation to scheduled pipelines
2022-10-18 12:21:09 -04:00
davidby-influx d862a82515
feat: add version number to debug/vars (#23795)
closes https://github.com/influxdata/influxdb/issues/23793
2022-10-13 11:49:30 -07:00
davidby-influx bc8d9ea9f3
fix: add tests for file rename across volumes (#23787)
Also move shared code from file_unix.go
2022-10-13 09:26:59 -07:00
davidby-influx 0913276ff0
fix: use copy when a rename spans volumes (#23785)
When a file rename fails with EXDEV
(cross device or volume error), copy the
file and delete the original instead

Differs from master branch by overwriting
existing files instead of erring.

closes https://github.com/influxdata/influxdb/issues/22997
2022-10-12 09:50:27 -07:00
Brandon Pfeifer 03ad3443ab
chore: upgrade to Go 1.18.6 (#23745) 2022-09-26 10:10:27 -04:00
davidby-influx b17f27a5d9
fix: incorrect error message concatenation (#23729) 2022-09-15 09:26:51 -07:00
davidby-influx 80c10c8c04
feat: optimize saving changes to fields.idx (#23701)
Instead of writing out the complete fields.idx
file when it changes, write out incremental
changes that will be applied to the file on
close and startup.

closes https://github.com/influxdata/influxdb/issues/23653
2022-09-14 13:14:09 -07:00
Brandon Pfeifer df6a5e68e0
chore: add protoc-gen script to releng (#23694) 2022-08-31 16:42:29 -04:00