Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/compat-vl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
needs: vl-matrix-source
runs-on: ubuntu-latest
# Each version runs the range-metric table on top of the compatibility
# checks; bound a hung stack well below the 6 hour default.
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -102,10 +105,11 @@ jobs:
- name: Run VictoriaLogs compatibility score
env:
VICTORIALOGS_IMAGE: victoriametrics/victoria-logs:${{ matrix.vl_version }}
# The score plus the two checks whose outcome depends on how the
# The score plus the checks whose outcome depends on how the
# VictoriaLogs version words or stores things: OTLP severity as
# detected_level, and the status of rejected queries (parse errors).
run: go test -v -tags=e2e -run '^(TestSetup_IngestLogs|TestVLTrackScore|TestCompat_DetectedLevelQueryRange|TestCompat_RejectedQueryStatusParity)$' ./test/e2e-compat/
# detected_level, the status of rejected queries (parse errors), and the
# range-metric table compared with Loki (bucket edges, offsets, unwrap).
run: go test -v -tags=e2e -timeout=25m -run '^(TestSetup_IngestLogs|TestVLTrackScore|TestCompat_DetectedLevelQueryRange|TestCompat_RejectedQueryStatusParity|TestCompat_Unwrap.*|TestRangeMetric.*|TestGrafanaClickout_.*)$' ./test/e2e-compat/
- name: Tear down matrix stack
if: always()
working-directory: test/e2e-compat
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Breaking Changes

- **The supported VictoriaLogs floor is v1.49.0: VictoriaLogs v1.48.0 and older
are no longer supported.** Supported is v1.49.0 (the latest v1.4x release) and
every v1.5x release. `-backend-min-version` now defaults to `v1.49.0` (was
`v1.40.0`), in the flag, the Go fallback used when it is empty and the Helm
value `extraArgs.backend-min-version`; `logsql.MinSupportedMinor` is 49. A
deployment on VictoriaLogs v1.40 to v1.48 stops at startup with an error that
names `-backend-allow-unsupported-version`: upgrade VictoriaLogs to v1.49.0 or
newer. A Helm release that pins an older `backend-min-version` still starts
against an older backend, with a warning on every start; a version below the
floor is unsupported and untested, and the proxy no longer carries the
fallbacks that served it (see Changed). `-backend-allow-unsupported-version=true`
starts the proxy against such a backend at the operator's risk, and
`-backend-version-strict=true` still turns a missing or too old version into a
startup failure.

### Changed

- **Supported and tested VictoriaLogs versions are named in the README and the
compatibility docs.** Tested in CI: v1.49.0, v1.50.0, v1.51.1, v1.52.0 and
v1.53.0, every supported minor at its latest patch that has a published image
(v1.52.1 has none, so v1.52.0); pull requests keep the v1.52.0 pin. The
support window in `compatibility-matrix.json` is now "the latest v1.4x release
plus every v1.5x release" (was "the latest two lines, three releases each"):
v1.47.0 and v1.48.0 leave the matrix and v1.50.0 joins it.
`TestVictoriaLogsSupportPolicy` enforces the rule: the floor, the lowest
matrix version, the `-backend-min-version` default (flag, Go fallback, Helm
value) and `logsql.MinSupportedMinor` agree, the matrix holds exactly one v1.4x
entry (the floor) and every v1.5x minor from v1.50 up once, the pin is a
tested version, and the README supported-versions table lists the same
versions.
- **The weekly VictoriaLogs matrix runs the range-metric table on every tested
version.** Besides the compatibility score and the two version-sensitive
checks, each version now runs `TestCompat_Unwrap*`, `TestRangeMetric*` and
`TestGrafanaClickout_*` against Loki (the checks that failed on VictoriaLogs
v1.40.0 because it ignores the `stats_query_range` `offset` argument), with an
explicit test and job timeout.
- **The fallbacks for VictoriaLogs before v1.49.0 are removed, and an unknown
backend version behaves as v1.49.0.** The `stats_query_range` `offset`
argument (v1.45) is always sent: the epoch-aligned-only tumbling and sliding
grids, the raw-row route for unaligned starts and the gate of the
`name_extracted` pushdown are gone (raw evaluation remains only where it does
not depend on the version: buckets below 1 ms, byte and row limits). The
metadata substring filter (v1.49) is always forwarded as `q` and
`filter=substring`; the proxy-side search window stays because it also serves
the label-values browse index and offset/limit paging. `ip()` filters always
use `ipv4_range()` (v1.45) for IPv4 and keep the regular expression only for
IPv6 and unparsable input. `logsql.Capabilities` no longer has `StatsRateSum`,
`FieldIPv4Range` or `MetadataSubstring`. The v1.50+ behaviour (dense pattern
windowing, column-index `field_values`, the v1.51 `coalesce` pipe and the
v1.52 parse-error echo) keeps its fallback down to v1.49.0. The background
`/metrics` version probe still retries every five minutes while the version
is unknown.

## [2.18.1] - 2026-10-18

### Changed
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ LogQL→LogsQL translation is **4.7–15.5 µs per query** (arm64). For a 100–
| Selector `{app="nginx"}` | 4.7 µs | 18 |
| `rate({...}[5m])` | 6.1 µs | 45 |
| `sum(rate({...}[5m])) by (host)` | 8.9 µs | 48 |
| `ip("10.0.0.0/8")` filter (v1.45+, capability-aware) | 8.4 µs | 36 |
| `ip("10.0.0.0/8")` filter (native `ipv4_range()`) | 8.4 µs | 36 |
| Binary metric `sum(rate) / sum(rate)` | 12.5 µs | 76 |

Measured: `go test ./internal/translator/ -bench BenchmarkTranslate -benchmem -count=5` (Apple M5 Pro, Go 1.26, darwin/arm64).
Expand Down Expand Up @@ -167,6 +167,21 @@ Full cost worksheet, scaling projections, and EC2/GCP sizing tables: [Cost Model

---

## Supported versions

<!-- vl-support:start -->
| VictoriaLogs | Version |
|---|---|
| Supported | `v1.49.0` (the latest v1.4x release) and every v1.5x release |
| Tested in CI | `v1.49.0`, `v1.50.0`, `v1.51.1`, `v1.52.0`, `v1.53.0` |
| Pull-request CI pin | `v1.52.0` |
| Startup floor (`-backend-min-version`) | `v1.49.0` |
<!-- vl-support:end -->

The proxy refuses to start against a VictoriaLogs older than the floor unless `-backend-allow-unsupported-version=true` is set; such a version is unsupported and untested. Every supported minor is tested at its latest patch release that has a published image; the weekly matrix run includes the range-metric table compared with Loki. Loki, Grafana, Logs Drilldown and the Loki datasource plugin versions are listed in the [compatibility matrix](docs/compatibility-matrix.md); the VictoriaLogs policy and capability bands are in [VictoriaLogs compatibility](docs/compatibility-victorialogs.md).

---

## Quick Start

### Docker
Expand Down
4 changes: 2 additions & 2 deletions charts/loki-vl-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ extraArgs:
# 120s matches the binary default; explicit here so operators can widen it for
# very long-range log queries without hunting for the flag name.
backend-timeout: "120s"
backend-min-version: "v1.40.0"
backend-min-version: "v1.49.0"
backend-allow-unsupported-version: "false"
backend-version-check-timeout: "5s"
# Compression negotiation with VictoriaLogs backend.
Expand Down Expand Up @@ -338,7 +338,7 @@ extraArgs:
# compat-cache-enabled: "true" # enable Tier0 compatibility-edge cache
# compat-cache-max-percent: "10" # Tier0 share of L1 cache budget (max 50)
# backend-timeout: "120s" # upstream request timeout
# backend-min-version: "v1.40.0" # startup minimum supported VictoriaLogs version
# backend-min-version: "v1.49.0" # startup minimum supported VictoriaLogs version
# backend-allow-unsupported-version: "false" # allow older backend at your own risk
# backend-version-check-timeout: "5s" # startup backend version check timeout
# backend-version-strict: "false" # when true, /health failure, non-2xx, or missing/sub-min backend semver fails startup (default false: warn only); overrides --backend-allow-unsupported-version
Expand Down
2 changes: 1 addition & 1 deletion cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func run(
cbFailThreshold := fs.Int("cb-fail-threshold", 5, "Circuit breaker: failures within -cb-window-duration before opening")
cbOpenDuration := fs.Duration("cb-open-duration", 10*time.Second, "Circuit breaker: how long to stay open before allowing probe requests")
cbWindowDuration := fs.Duration("cb-window-duration", 30*time.Second, "Circuit breaker: sliding window for failure counting; failures older than this are discarded")
backendMinVersion := fs.String("backend-min-version", "v1.40.0", "Minimum VictoriaLogs version considered fully supported at startup (first minor of the oldest supported line; v1.4x and v1.5x are supported)")
backendMinVersion := fs.String("backend-min-version", "v1.49.0", "Minimum VictoriaLogs version considered fully supported at startup (v1.49.0, the latest v1.4x release; every v1.5x release is supported)")
backendAllowUnsupportedVersion := fs.Bool("backend-allow-unsupported-version", false, "Allow startup with backend versions lower than -backend-min-version (at your own risk). Ignored when --backend-version-strict=true.")
backendVersionCheckTimeout := fs.Duration("backend-version-check-timeout", 5*time.Second, "Timeout for startup backend version compatibility check")
backendVersionStrict := fs.Bool("backend-version-strict", false, "When true, /health failure, non-2xx response, or missing/sub-min backend semver causes startup to fail. Default false (warn only). Overrides --backend-allow-unsupported-version when both are set.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ gap:
area: 'internal/proxy ordered_json_metric.go stats pushdown (name_extracted labels) and translator.ExtractedLabelPipes'
loki: 'pkg/logql/log/parser.go:25 duplicateSuffix; pkg/logql/log/labels.go ParserHint/Extracted'
proxy: 'orderedJSONPushdownLabelOK refused name_extracted; raw-row evaluator answered (502 at the row limit)'
planned_test: 'TestCompat_ExtractedLabelMetricPushdown (test/e2e-compat, group core); proxy TestOrderedJSONExtractedMetricPushdownMatchesLoki, TestOrderedJSONExtractedMetricProbeKeepsRawEvaluator, TestLogfmtExtractedMetricPushdownMatchesLoki, TestOrderedJSONExtractedMetricDifferential, TestOrderedJSONExtractedMetricPushdownNeedsStatsRangeOffset; translator TestExtractedLabelPipes'
planned_test: 'TestCompat_ExtractedLabelMetricPushdown (test/e2e-compat, group core); proxy TestOrderedJSONExtractedMetricPushdownMatchesLoki, TestOrderedJSONExtractedMetricProbeKeepsRawEvaluator, TestLogfmtExtractedMetricPushdownMatchesLoki, TestOrderedJSONExtractedMetricDifferential, TestOrderedJSONExtractedMetricPushdownOnSupportedBackends; translator TestExtractedLabelPipes'
note: |
Gated off below VictoriaLogs v1.45 (versions/stats-bucket-label-v1.45), where the raw-row evaluator
answers as before. Open items: an ungrouped range metric stays on raw rows
Runs on every supported VictoriaLogs version: the stats_query_range offset arg it needs for bucket
edges is present from v1.45 (versions/stats-bucket-label-v1.45). Open items: an ungrouped range metric stays on raw rows
(semantics/extracted-ungrouped-metric-raw-rows); service_name_extracted and detected_level_extracted
stay on the raw evaluator (semantics/extracted-derived-labels-raw-evaluator); two differences against
Loki (semantics/extracted-metric-known-differences). Related, unchanged: semantics/unwrap-range-last-point
Expand Down
34 changes: 17 additions & 17 deletions conformance/registry/cases/versions/stats-bucket-label-v1.45.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: versions/stats-bucket-label-v1.45
title: Stats-bucket metrics put a line on a bucket edge one bucket late on VictoriaLogs before v1.45 (open)
title: Stats-bucket metrics put a line on a bucket edge one bucket late on VictoriaLogs before v1.45 (unsupported versions)
proves:
- window-bounds-and-step-alignment
- loki_api_v1_query_range
Expand All @@ -18,19 +18,19 @@ why: |
missing and the neighbours carry the wrong counts: `proxy "3"` where Loki
has `"2"`). Bisected on isolated stacks, one VictoriaLogs per release.

`supportsStatsRangeOffset` already makes the sliding window decline a start
that is not on the epoch grid below v1.45 (`slidingStatsBucket`), but an
aligned start still passes and an edge line is misplaced; the existing
pushdown of every `| json` metric, and the `name_extracted` pushdown before
it was gated, are affected. Real data rarely sits on a bucket edge (nanosecond
timestamps), so this shows on synthetic fixtures and second-aligned
generators.
Real data rarely sits on a bucket edge (nanosecond timestamps), so this shows
on synthetic fixtures and second-aligned generators.

The `name_extracted` stats pushdown is gated on `supportsStatsRangeOffset`
(v1.45+); older backends keep the raw-row evaluator these shapes had, which
is exact within `-manual-range-metric-row-limit`
(TestOrderedJSONExtractedMetricPushdownNeedsStatsRangeOffset). Not gated: the
other pushdowns.
Decision: supported VictoriaLogs starts at v1.49.0, so the `offset` arg is
present on every supported release and the proxy keeps no pre-v1.45
fallback: the version gate, the epoch-aligned-only bucket grids and the
raw-row routes that served those backends are removed, and an unknown
version behaves as v1.49.0
(TestSlidingRangeMetric_AnchoredBucketsOnFloorAndUnknownVersion,
TestOrderedJSONExtractedMetricPushdownOnSupportedBackends). A backend older
than v1.45 can still be started with `-backend-allow-unsupported-version`
and answers with the misplaced edge samples above; it is unsupported and
untested.
request:
method: GET
path: /loki/api/v1/query_range
Expand All @@ -49,12 +49,12 @@ compare:
expect: |
Loki's samples. v1.42.0 and v1.44.0 answer one bucket late for an edge line.
gap:
status: open
status: owner-kept
impact: edge
effort: M
area: 'stats-bucket relabel (internal/proxy range_metric_compat.go setSlidingStatsRangeParams / slidingStatsBucket; sliding_window_stats.go)'
loki: 'pkg/logql range vector (T-range, T]'
proxy: 'stats_query_range without offset aligns buckets to the epoch; the 1 ns edge shift is not applied'
planned_test: 'TestRangeMetricCompatibilityJSONFilterPushdown on VictoriaLogs v1.40-v1.44 (version matrix); fix by relabelling edge lines or declining the pushdown below v1.45'
note: 'Evidence: bisect v1.42.0 FAIL, v1.44.0 FAIL, v1.45.0 PASS, v1.46.0 PASS, v1.52.0 PASS. The v1.45.0 changelog entry for the offset arg is the introducing release.'
proxy: 'stats_query_range without offset aligns buckets to the epoch; the 1 ns edge shift is not applied (VictoriaLogs before v1.45, below the supported floor v1.49.0)'
planned_test: 'TestRangeMetricCompatibilityJSONFilterPushdown on every supported VictoriaLogs version (compat-vl vl-matrix job); TestSlidingRangeMetric_AnchoredBucketsOnFloorAndUnknownVersion'
note: 'Evidence: bisect v1.42.0 FAIL, v1.44.0 FAIL, v1.45.0 PASS, v1.46.0 PASS, v1.52.0 PASS. The v1.45.0 changelog entry for the offset arg is the introducing release; the supported floor is v1.49.0, so no fallback is kept for the earlier releases.'
clusters: []
3 changes: 1 addition & 2 deletions conformance/registry/generated/matrix-link.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@
},
"victorialogs": {
"matrix": [
"v1.47.0",
"v1.48.0",
"v1.49.0",
"v1.50.0",
"v1.51.1",
"v1.52.0",
"v1.53.0"
Expand Down
2 changes: 1 addition & 1 deletion conformance/registry/generated/wiring.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
"test/e2e-compat/unwrap_ungrouped_sum_test.go"
]
},
"registry_items": 320,
"registry_items": 317,
"routes_without_registry_item": [],
"test_to_items": {
"cmd/proxy/main_test.go": [
Expand Down
13 changes: 0 additions & 13 deletions conformance/registry/vl/capabilities/field-i-pv4-range.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions conformance/registry/vl/capabilities/metadata-substring.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions conformance/registry/vl/capabilities/stats-rate-sum.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion conformance/reports/compatibility-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Generated by `conformance/scripts/matrix_link.py`. Versions come from `test/e2e-
| grafana_loki_datasource_contract | `—` | 13.2.3, 13.2.1, 13.0.1, 12.4.12, 12.4.10, 12.4.2, 12.4.1 |
| logs_drilldown_contract | `2.6.0` | 2.5.2, 2.5.1, 2.5.0, 2.4.0, 2.3.0, 2.2.1, 2.2.0, 2.1.5, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.0.41, 1.0.40, 1.0.39, 1.0.38, 1.0.37, 1.0.36, 1.0.35, 1.0.34 |
| loki | `3.7.7` | 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4, 3.6.5, 3.6.6, 3.6.7, 3.6.8, 3.6.9, 3.6.10, 3.6.11, 3.6.12, 3.6.13, 3.6.14, 3.6.15, 3.6.16, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6 |
| victorialogs | `v1.52.0` | v1.47.0, v1.48.0, v1.49.0, v1.51.1, v1.53.0 |
| victorialogs | `v1.52.0` | v1.49.0, v1.50.0, v1.51.1, v1.53.0 |

## Tracks and their evidence

Expand Down
Loading
Loading