VictoriaMetrics/lib/flagutil
Aliaksandr Valialkin f8aeb0e7fc
app/vlinsert: follow-up for 37ed1842ab
- Properly decode protobuf-encoded Loki request if it has no Content-Encoding header.
  Protobuf Loki message is snappy-encoded by default, so snappy decoding must be used
  when Content-Encoding header is missing.

- Return back the previous signatures of parseJSONRequest and parseProtobufRequest functions.
  This eliminates the churn in tests for these functions. This also fixes broken
  benchmarks BenchmarkParseJSONRequest and BenchmarkParseProtobufRequest, which consume
  the whole request body on the first iteration and do nothing on subsequent iterations.

- Put the CHANGELOG entries into correct places, since they were incorrectly put into already released
  versions of VictoriaMetrics and VictoriaLogs.

- Add support for reading zstd-compressed data ingestion requests into the remaining protocols
  at VictoriaLogs and VictoriaMetrics.

- Remove the `encoding` arg from PutUncompressedReader() - it has enough information about
  the passed reader arg in order to properly deal with it.

- Add ReadUncompressedData to lib/protoparser/common for reading uncompressed data from the reader until EOF.
  This allows removing repeated code across request-based protocol parsers without streaming mode.

- Consistently limit data ingestion request sizes, which can be read by ReadUncompressedData function.
  Previously this wasn't the case for all the supported protocols.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/8416
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8380
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8300
2025-03-15 00:11:58 +01:00
..
testdata all: allow dynamically reading *AuthKey flag values from files and urls 2024-01-22 01:23:23 +02:00
array.go all: add support for specifying multiple -httpListenAddr options 2024-02-09 03:22:49 +02:00
array_test.go all: add support for specifying multiple -httpListenAddr options 2024-02-09 03:22:49 +02:00
bytes.go app/vlinsert: follow-up for 37ed1842ab 2025-03-15 00:11:58 +01:00
bytes_test.go docs/CHANGELOG.md: support empty command-line flag values in short array notation 2024-02-07 20:55:01 +02:00
dict.go lib/flagutil/dict: properly update default value in case there is no key value set () 2024-10-17 11:11:45 -03:00
dict_test.go lib/flagutil/dict: properly update default value in case there is no key value set () 2024-10-17 11:11:45 -03:00
duration.go docs: follow-up after f0d1db81dc 2024-10-17 11:19:03 -03:00
duration_test.go lib/flagutil: rename Duration to RetentionDuration () 2024-10-17 11:18:45 -03:00
flag.go lib/flagutil: do not expose sensitive info (passwords, keys and urls) at /flags page 2021-10-20 00:51:15 +03:00
password.go lib/httpserver: skip basic auth check for additional request paths, which should call httpserver.CheckAuthFlag() 2024-07-16 01:08:41 +02:00
password_test.go fscore: rollback trailing space trim () 2024-09-29 14:48:36 +02:00
secret.go app/vmagent: substitute -remoteWrite.url with secret-url value in logs, since it may contain sensitive info such as passwords or auth tokens 2020-09-16 22:36:18 +03:00
usage.go lib/flagutil: make golangci-lint happy by using strings.TrimPrefix instead of manual prefix removal via strings.HasPrefix 2020-12-03 22:07:26 +02:00