5 Commits

Author SHA1 Message Date
alliasgher
ae063a499a util/runtime: simplify TestFsType comment per review
Remove issue reference and trim the comment down to the assertion's
intent, per @roidelapluie review.

Signed-off-by: alliasgher <alliasgher123@gmail.com>
2026-04-15 15:54:02 +05:00
alliasgher
6994b4cb4e util/runtime: simplify TestFsType to check != 0 instead of _MAGIC
Signed-off-by: alliasgher <alliasgher123@gmail.com>
2026-04-14 20:26:13 +05:00
Ali
48f4a41e38 util/runtime: skip TestFsType on unknown filesystems instead of accepting hex format
Rather than widening the assertion to accept raw hex codes, skip the
strict _MAGIC format check with t.Skipf when the filesystem is not in
the known map. The test still exercises the error paths and will run
fully on standard Linux/macOS filesystems.

Fixes prometheus/prometheus#18471

Signed-off-by: Ali <ali@kscope.ai>
2026-04-14 16:49:46 +05:00
Ali
366ee531bb util/runtime: let TestFsType tolerate filesystems absent from FsType map
FsType() returns the known magic-name string when the filesystem is
present in its internal map, and falls back to strconv.FormatInt(..., 16)
otherwise. The test was asserting the *MAGIC regex only, so it failed
whenever it happened to run on a filesystem not yet mapped — the
downstream Arch Linux packager hit this with a btrfs subvolume.

Extend the regex to accept either a magic-name or the numeric
lowercase-hex fallback, keeping the test stable across OS upgrades and
exotic filesystems.

Fixes #18471

Signed-off-by: Ali <alliasgher123@gmail.com>
2026-04-14 01:21:26 +05:00
Jérôme LOYET
696679e50c Add storage.tsdb.retention.percentage config
Signed-off-by: Jérôme LOYET <822436+fatpat@users.noreply.github.com>
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
2026-02-24 15:27:45 +01:00