Commit Graph

35340 Commits (db/golang-1.23.5)

Author SHA1 Message Date
Brandon Pfeifer 88345c3e9d
chore: upgrade to go 1.21.6 (main-2.x) (#24709)
* chore: upgrade to go1.21.6

* fix: update deprecated test apparatus
2024-03-05 12:58:59 -05:00
Jamie Strandboge 02156eaf3f
fix: update logrus to 1.9.3 (#24716)
Closes #24708
2024-02-29 14:23:01 -06:00
Phil Bracikowski 5d801119c5
feat(tsm1/wal): encapsulate expiring WAL files in FileDisposer (#24611)
* feat(tsm1/wal): encapsulate expiring WAL files in FileDisposer

This changeset introduces an interface extension point named
FileDisposer to control what to do with WAL files when they are no
longer needed. Currently, the only implementation is to delete the file
which is the existing behavior.

* chore: accumulate errors

Since we're here, capture the previously ignored fs errors and pass up a
combined error (which the only callers log out).
2024-01-31 12:46:46 -08:00
Brandon Pfeifer afd7ced0c5
fix: update broken flux and perf tests (main-2.x) (#24617)
* chore: download repository key to file

* fix: broken perf tests

Some perf tests had to be temporarily disabled. Work is
needed in the pref_tests repositories to make them work
again.
2024-01-31 14:24:30 -05:00
Phil Bracikowski 713efbc164
fix(tsi1/partition/test): fix data race in test code (#24613)
* fix(tsi1/partition/test): fix data race in test code

TestPartition_Compact_Write_Fail test was not locking the partition
before changing the value of MaxLogFileSize. This PR exports the mutex
of the partition to allow the test to access it and lock. Alternatives
require more changes such as a Setter method if we need to hide the
mutex.

* fixes #24042, for #24040

* chore: complete renaming of mutex in file and fix flux test

The flux test is another failing test because it was using a relative
time range.
2024-01-30 20:01:20 -08:00
Jack 976ef20a32
fix: panic index out of range for invalid series keys [Port to main-2.x] (#24597)
* fix: cherry-pick to main-2.x
2024-01-23 17:09:10 +00:00
davidby-influx 0dc48b1260
fix: prevent retention service creating orphaned shard files (#24530) (#24547)
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.

fixes: #24529
(cherry picked from commit 7bd3f89d18)
closes https://github.com/influxdata/influxdb/issues/24545

Co-authored-by: Geoffrey Wossum <gwossum@influxdata.com>
2024-01-04 16:56:56 -08:00
davidby-influx a3fd489864
fix: corrrectly return 4XX errors instead of 5XX errors (#24519)
HTTP 5XX errors were being returned incorrectly from
BoltDB errors that were actually bad requests, e.g., 
names that were too long for buckets, users, and 
organizations. Map BoltDB errors to correct Influx 
errors and return 4XX errors where appropriate. Also 
add op codes to more errors
2023-12-27 08:21:09 -08:00
davidby-influx 8e8700f14f
fix: enable Secure when using TLS and enable HttpOnly (#24524)
Set the HttpOnly and, when TLS is enabled, 
Secure flags on cookies

closes: https://github.com/influxdata/influxdb/issues/24522
2023-12-20 11:48:24 -08:00
davidby-influx 081f95147e
fix: avoid SIGBUS when reading non-std series segment files (#24509) (#24520)
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/24511
2023-12-19 15:02:34 -08:00
Martin Hilton 924735a96d
build(flux): update flux to v0.194.5 (#24477) 2023-12-04 08:35:13 +00:00
davidby-influx 0ccd35c253
feat: write detailed logs from EDR failures (#24496)
To assist debugging of write failures
in Edge Data Replication, do not
write only the HTTP status code to
the log. Also include any messages
returned by the write recipient.

closes https://github.com/influxdata/influxdb/issues/24481
2023-11-30 11:31:53 -08:00
davidby-influx 13cf6be49e
feat: Add authenticating ID and user ID to request logging (#24474)
To allow rudimentary security auditing of logs,
add the authenticating ID and the user ID when
possible to the request logs. When a request is
authorized for V1 or V2 API, store the authorizer
object to be used by the logger up the call stack.

closes https://github.com/influxdata/influxdb/issues/24473
2023-11-22 12:28:58 -08:00
davidby-influx 4cd5e765b8
fix: handle MetricSlice to Points conversion errors (#24452) (#24453)
Correctly handle errors in converting MetricSlice
elements into model.Points. Add a test to verify
error handling.

(cherry picked from commit 19e5c0e1b7)
2023-11-08 09:19:50 -08:00
Martin Hilton 08b4361b36
build(deps): upgrade flux to v0.194.4 (#24431)
Update the flux version to v0.194.4.
2023-10-26 18:16:15 +01:00
Brandon Pfeifer 39012a8ed5
chore: upgrade golang 1.20.5 -> 1.20.10 (#24415) 2023-10-12 12:46:44 -04:00
Jeffrey Smith II 8576cad9e5 chore: rename master to main-2.x 2023-09-20 16:49:45 -04:00
Brandon Pfeifer b3b982d746
chore: update MacOS executor to M1 (#24372) 2023-09-20 14:30:21 -04:00
Brandon Pfeifer 75a8bcfae2
chore: replace "package builder" shell implemention with python (#24306) 2023-06-30 10:45:03 -04:00
Jeffrey Smith II a6bb6a85d6
fix: update ui to remove new data explorer (#24220) 2023-06-29 15:34:23 -04:00
alespour cc62221501
chore: upgrade to Go 1.20.5 (#24299) 2023-06-20 09:32:44 -05:00
cui fliter 46ec649b9c
chore: fix function name in comment (#24281) 2023-06-14 11:18:13 -04:00
Brandon Pfeifer 3dabfcdd08
fix: correct CHANGELOG.md upload destination (#24287)
This updates the job logic so that workflow condition is evaluated
by CircleCI rather than the shell. This also uses the "aws-s3" orb
for uploading to S3 (rather than awscli).
2023-06-13 20:00:45 -04:00
Brandon Pfeifer b352a179a2
fix: update terraform with newer version (#24284)
The terraform shipped with snap (in the older version of Ubuntu)
only supported public key encryption with ssh-rsa. New versions
of Linux started deprecating ssh-rsa, so this version bump
is required.
2023-06-13 16:55:37 -04:00
Brandon Pfeifer 2f3733c2cb
chore: generate "influxdb2.${CIRCLE_TAG}.digests" for each release (#24276) 2023-06-13 11:37:58 -04:00
Jeffrey Smith II 6219f98e1c
chore: Update the go version required (#24217) 2023-05-30 18:00:08 -04:00
Christopher M. Wolff 4acc733019
build(flux): update flux to v0.194.3 (#24252) 2023-05-30 14:21:20 -07:00
Brandon Pfeifer ba7f1a7ab6
chore: upgrade changelogger to latest version (#24244)
This allows changelogs to be built from "non-release" tags. These
changelogs use "UNRELEASED" as the first section header. Commits
from these sections are eventually rolled into a proper "release"
tag (e.g v2.7.0).
2023-05-26 12:09:44 -04:00
dependabot[bot] 398660438f
build(deps): bump github.com/docker/distribution (#24230)
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 15:03:30 -05:00
Christopher M. Wolff 3eb091d2e7
build(flux): update flux to v0.194.1 (#24203) 2023-04-17 15:09:43 -07:00
Brandon Pfeifer 49c7a7407a
feat: implement remote package signing (#24194) 2023-04-12 11:41:41 -04:00
Martin Hilton e237d01fc8
build(flux): update flux to v0.194.0 (#24186) 2023-04-11 10:56:17 +01:00
Brandon Pfeifer 1bb310e606
fix: use Amazon EC2 Image instead of CentOS EC2 Image (#24181) 2023-04-05 17:41:58 -04:00
Jeffrey Smith II 7616ca642b
chore: update to go 1.20.3 (#24180) 2023-04-05 11:29:13 -04:00
dependabot[bot] 85f725f8b9
build(deps): bump github.com/docker/docker (#24179)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.0+incompatible to 23.0.3+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.0...v23.0.3)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 10:03:06 -04:00
Jeffrey Smith II 01dda5d9f2
chore: update UI to latest version (#24171) 2023-04-04 12:13:29 -04:00
Jeffrey Smith II c854e53c2b
fix: chmod'ing the manifest is unnecessary (#24165) 2023-04-03 13:09:01 -04:00
dependabot[bot] eac0ee0acc
build(deps): bump github.com/opencontainers/runc from 1.1.3 to 1.1.5 (#24163)
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.3 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.3...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-29 14:36:44 -04:00
Eng Zer Jun 903d30d658
test: use `T.TempDir` to create temporary test directory (#23258)
* test: use `T.TempDir` to create temporary test directory

This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix failing TestSendWrite on Windows

=== FAIL: replications/internal TestSendWrite (0.29s)
    logger.go:130: 2022-06-23T13:00:54.290Z	DEBUG	Created new durable queue for replication stream	{"id": "0000000000000001", "path": "C:\\Users\\circleci\\AppData\\Local\\Temp\\TestSendWrite1627281409\\001\\replicationq\\0000000000000001"}
    logger.go:130: 2022-06-23T13:00:54.457Z	ERROR	Error in replication stream	{"replication_id": "0000000000000001", "error": "remote timeout", "retries": 1}
    testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\circleci\AppData\Local\Temp\TestSendWrite1627281409\001\replicationq\0000000000000001\1: The process cannot access the file because it is being used by another process.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix failing TestStore_BadShard on Windows

=== FAIL: tsdb TestStore_BadShard (0.09s)
    logger.go:130: 2022-06-23T12:18:21.827Z	INFO	Using data dir	{"service": "store", "path": "C:\\Users\\circleci\\AppData\\Local\\Temp\\TestStore_BadShard1363295568\\001"}
    logger.go:130: 2022-06-23T12:18:21.827Z	INFO	Compaction settings	{"service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
    logger.go:130: 2022-06-23T12:18:21.828Z	INFO	Open store (start)	{"service": "store", "op_name": "tsdb_open", "op_event": "start"}
    logger.go:130: 2022-06-23T12:18:21.828Z	INFO	Open store (end)	{"service": "store", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "77.3µs"}
    testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\circleci\AppData\Local\Temp\TestStore_BadShard1363295568\002\data\db0\rp0\1\index\0\L0-00000001.tsl: The process cannot access the file because it is being used by another process.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix failing TestPartition_PrependLogFile_Write_Fail and TestPartition_Compact_Write_Fail on Windows

=== FAIL: tsdb/index/tsi1 TestPartition_PrependLogFile_Write_Fail/write_MANIFEST (0.06s)
    testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\circleci\AppData\Local\Temp\TestPartition_PrependLogFile_Write_Failwrite_MANIFEST656030081\002\0\L0-00000003.tsl: The process cannot access the file because it is being used by another process.
    --- FAIL: TestPartition_PrependLogFile_Write_Fail/write_MANIFEST (0.06s)

=== FAIL: tsdb/index/tsi1 TestPartition_Compact_Write_Fail/write_MANIFEST (0.08s)
    testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\circleci\AppData\Local\Temp\TestPartition_Compact_Write_Failwrite_MANIFEST3398667527\002\0\L0-00000003.tsl: The process cannot access the file because it is being used by another process.
    --- FAIL: TestPartition_Compact_Write_Fail/write_MANIFEST (0.08s)

We must close the open file descriptor otherwise the temporary file
cannot be cleaned up on Windows.

Fixes: 619eb1cae6 ("fix: restore in-memory Manifest on write error")
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix failing TestReplicationStartMissingQueue on Windows

=== FAIL: TestReplicationStartMissingQueue (1.60s)
    logger.go:130: 2023-03-17T10:42:07.269Z	DEBUG	Created new durable queue for replication stream	{"id": "0000000000000001", "path": "C:\\Users\\circleci\\AppData\\Local\\Temp\\TestReplicationStartMissingQueue76668607\\001\\replicationq\\0000000000000001"}
    logger.go:130: 2023-03-17T10:42:07.305Z	INFO	Opened replication stream	{"id": "0000000000000001", "path": "C:\\Users\\circleci\\AppData\\Local\\Temp\\TestReplicationStartMissingQueue76668607\\001\\replicationq\\0000000000000001"}
    testing.go:1206: TempDir RemoveAll cleanup: remove C:\Users\circleci\AppData\Local\Temp\TestReplicationStartMissingQueue76668607\001\replicationq\0000000000000001\1: The process cannot access the file because it is being used by another process.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: update TestWAL_DiskSize

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix failing TestWAL_DiskSize on Windows

=== FAIL: tsdb/engine/tsm1 TestWAL_DiskSize (2.65s)
    testing.go:1206: TempDir RemoveAll cleanup: remove C:\Users\circleci\AppData\Local\Temp\TestWAL_DiskSize2736073801\001\_00006.wal: The process cannot access the file because it is being used by another process.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

---------

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-03-21 16:22:11 -04:00
anon8675309 96d6dc3d82
fix: Removed timeout which is hit with large databases or slow servers #22803 (#23400)
Co-authored-by: anon8675309 <m7gy7uav@duck.com>
2023-03-21 10:47:55 -04:00
L1Cafe 5a7ce078f5
fix: scraping failed when Content-Type header is not set (#24135)
Co-authored-by: L1Cafe <L1Cafe@donotemail.me>
2023-03-14 10:13:28 -04:00
Jeffrey Smith II e1d0102a6f
fix: add error message when attempting to delete by field (#24131)
* fix: add error message when attempting to delete by field

* test: add test for delete by field
2023-03-10 09:13:24 -05:00
Jeffrey Smith II b819edf095
fix: rename replication fields for better clarity (#24126)
* fix: rename replication fields for better clarity

* fix: dont rename, only add new field
2023-03-09 13:11:43 -05:00
Jeffrey Smith II 77fd64a975
fix: handle replication missing queue (#24123)
* fix: replications should startup after backup/restore

* chore: refactor

* test: improve logging and handle test better
2023-03-09 13:10:53 -05:00
Ikko Eltociear Ashimine 387d9007a7
chore: fix typo in functions.go (#24133)
intial -> initial
2023-03-09 12:40:17 -05:00
fuyou 22d698bd7e
fix(sec): upgrade containerd to 1.6.18 (#24129) 2023-03-09 12:39:30 -05:00
Jamie Strandboge 569e84d4a7
chore: use go 1.20.1 (#24114) 2023-03-01 15:49:27 -06:00
dependabot[bot] 23446cc371
build(deps): bump golang.org/x/net from 0.5.0 to 0.7.0 (#24112)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 12:30:15 -05:00
Christopher M. Wolff a035bcfb6e
build(flux): update flux to v0.193.0 (#24103) 2023-02-23 10:18:46 -08:00
wiedld 4fc73ea221
feat(monitor-ci/415): get oss-e2es working locally in UI repo (#24098)
* feat(monitor-ci/415): get oss-e2es working locally in UI repo

* chore: remove old, unused artifact directories

* fix: handle import cycle caused by trying to use the onboarding client

---------

Co-authored-by: Jeffrey Smith II <jsmith@influxdata.com>
2023-02-22 09:28:46 -05:00