Skip to content

fix(ruler): validate remote write config (backport k281) - #19921

Merged
ashwanthgoli merged 1 commit into
k281from
backport-19920-to-k281
Nov 19, 2025
Merged

fix(ruler): validate remote write config (backport k281)#19921
ashwanthgoli merged 1 commit into
k281from
backport-19920-to-k281

Conversation

@loki-gh-app

@loki-gh-app loki-gh-app Bot commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Backport e916944 from #19920


What this PR does / why we need it:

remote write config validation is missing in a few places. This also ensure that all relabling config have a valid NameValidationScheme set.

ruler panic: Invalid name validation scheme requested: unset
ruler
ruler goroutine 1264 [running]:
ruler github.com/prometheus/common/model.ValidationScheme.IsValidLabelName(0xc0054d5a7a?, {0xc000d24008?, 0x8?})
ruler     /src/enterprise-logs/vendor/github.com/prometheus/common/model/metric.go:203 +0xb4
ruler github.com/prometheus/prometheus/model/relabel.relabel(0xc00065fdc0, 0xc0008b3dc0)
ruler     /src/enterprise-logs/vendor/github.com/prometheus/prometheus/model/relabel/relabel.go:340 +0x4c5
ruler github.com/prometheus/prometheus/model/relabel.ProcessBuilder(...)

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
@loki-gh-app loki-gh-app Bot added backport size/S type/bug Somehing is not working as expected labels Nov 19, 2025
@loki-gh-app
loki-gh-app Bot requested a review from a team as a code owner November 19, 2025 09:09
@loki-gh-app
loki-gh-app Bot requested a review from ashwanthgoli November 19, 2025 09:09
@loki-gh-app loki-gh-app Bot added the type/bug Somehing is not working as expected label Nov 19, 2025
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Nov 19, 2025

@ashwanthgoli ashwanthgoli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ashwanthgoli
ashwanthgoli enabled auto-merge (squash) November 19, 2025 09:14
@ashwanthgoli
ashwanthgoli merged commit 737629f into k281 Nov 19, 2025
79 checks passed
@ashwanthgoli
ashwanthgoli deleted the backport-19920-to-k281 branch November 19, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport size/M type/bug Somehing is not working as expected

1 participant