Fan out the upgrade/downgrade test over each active LTS release so the
matrix jobs run in parallel and a single release failure does not mask
the others. A new list_lts_releases job reads the active LTS versions
from prometheus.io/download.json and feeds them to the matrix.
Add a --test.lts-version flag so TestVersionUpgrade can be restricted to
a single LTS release; when empty, all active LTS releases are tested.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
(cherry picked from commit 827d0f9ad3)
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Replace the two-source LTS discovery (docs-config.ts regex plus the
GitHub releases API) with a single fetch of prometheus.io/download.json,
which carries the LTS flag and per-OS/arch download URLs. The manifest
can mark more than one release as LTS, so fetch all of them and exercise
each as its own subtest.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
This is a followup to our previous commit where we made convert_classic_histograms_to_nhcb
configurable at discovery time. We add the other native histogram labels
too here.
Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
--enable-feature=xor2-encoding sets tsdb.Options.FloatChunkEncoding to
EncXOR2 (a concrete encoding value, not a feature-flag bool). ApplyConfig
uses this as the fallback when chunk_encoding.floats is absent. No global
mutable state is introduced in the config package.
Signed-off-by: Julien Pivotto <julien.pivotto@grafana.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
CheckServerStatus built the request URL by concatenating the
user-provided URL with the endpoint path:
serverURL.String() + checkEndpoint
When the URL ends with a slash (e.g. "http://localhost:9090/"), this
produces a doubled slash like "http://localhost:9090//-/healthy". The
Prometheus router registers "/-/healthy" and "/-/ready" exactly and
does not collapse repeated slashes, so the request 404s and
"promtool check healthy" / "promtool check ready" fail.
Use url.JoinPath to append the endpoint, which normalises the slash and
also handles a configured route prefix correctly. JoinPath returns a new
URL, so the original is left untouched for the error message.
Signed-off-by: kigland <shuaizhicheng336@gmail.com>
Adding this as a meta label makes it possible to dynamically configure
this setting through discovery labels.
This helps in usecases like K8S where we could enable this with a pod
annotation.
Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
Implement least(a, b) and greatest(a, b) as scalar-returning PromQL
functions backed by math.Min and math.Max respectively.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Adds CheckpointFromInMemorySeries option for agent.Options to enable a faster checkpoint implementation that skips segment re-read and just uses in-memory data instead.
* feat: impl agent-specific checkpoint dir
* feat: impl ActiveSeries interface
* feat: use new checkpoint impl
* feat: hide new checkpoint impl behind a feature flag
* feat: add benchmark
* feat: add benchstat case
* feat: use feature flag in bench
* feat: use same labels for persisted state and append
* feat: set WAL segment size
* feat: add checkpoint size metric and bump series size
* feat: wal replay test
* feat: expose new checkpoint opts in cmd flags
* feat: update cli doc
* add ActiveSeries and DeletedSeries doc
Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
Signed-off-by: Denys Sedchenko <9203548+x1unix@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
* test(cmd/prometheus): add TestFeatureFlagsDocumented and fix help text
Add TestFeatureFlagsDocumented to ensure the --enable-feature help text
in and docs/feature_flags.md list the same set of flags.
The help text was out of sync with the documentation:
- Flags present in docs but missing from help text: `auto-reload-config`,
`metadata-wal-records`, `otlp-native-delta-ingestion`,
`promql-delayed-name-removal`, `type-and-unit-labels`. Added them.
- Flags present in help text but missing from docs: `auto-gomaxprocs`,
`expand-external-labels`. Removed them.
The help text is now sorted for better readability and kept in sync
with the documentation.
Also, the parsing of an empty `--enable-feature` was changed to
print `msg="Unknown option for --enable-feature" option=""` instead of nothing.
Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>
* main.go remove default for --enable-feature to avoid unwanted
Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>
---------
Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>
The `--header` flag was already supported by `promtool query range` but was
missing from `promtool query instant`. This adds the same flag so users can
pass extra HTTP headers (e.g. `X-Scope-OrgID` for multi-tenant setups)
without needing to create an `--http.config.file`.
```
[ENHANCEMENT] promtool: Add `--header` flag to `query instant` command, matching existing `query range` behaviour.
```
Signed-off-by: Hoa <hoameomu@gmail.com>
Add Outscale VM service discovery using osc-sdk-go, including optional secret_key_file support, metrics, docs, and configuration examples. Document the default region (eu-west-2).
Signed-off-by: Aurelien Duboc <aurelienduboc96@gmail.com>
- Use an absolute path for the console templates directory to align with rules.
- Rewrite waitForPrometheus using require.Eventually for cleaner
error reporting and to fix a bug where the function could return nil
even when the server never became ready.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
The retention.percentage config field was typed as uint, which silently
truncated fractional values. Setting percentage: 1.5 in prometheus.yml
resulted in a retention of 1%, with no warning or error.
Remove the redundant MaxPercentage > 100 clamp in main.go; the config
UnmarshalYAML already returns an error for out-of-range values before
this code is reached.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
The debug flag in `promtool test rules` writes diagnostic output
using fmt.Printf to stdout, which can interfere with machine-parseable
output (e.g. JUnit XML via --junit-output) and piped workflows.
Redirect all DEBUG lines to stderr using fmt.Fprintf(os.Stderr, ...),
consistent with the existing error output pattern already present in
the file (line 78).
Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
Register the st-storage feature flag in the feature registry via
the TSDB options, consistent with how other TSDB features like
exemplar_storage and delayed_compaction are registered.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
chore(test): make failures in TestRemoteWrite_PerQueueMetricsAfterRelabeling more explicit/rich to help with debugging the test when it flakes for GOARCH=386
more explicit to help with debugging the test when it flakes for GOARCH=386
tried to make it fail in the CI running the following, in vain:
GOARCH=386 go test --timeout 4444444s --count=1000 --run=TestRemoteWrite_PerQueueMetricsAfterRelabeling ./cmd/prometheus/
Signed-off-by: machine424 <ayoubmrini424@gmail.com>