Skip to content

fix(ruler): validate remote write config - #19920

Merged
ashwanthgoli merged 3 commits into
mainfrom
relabel-validation
Nov 19, 2025
Merged

fix(ruler): validate remote write config#19920
ashwanthgoli merged 3 commits into
mainfrom
relabel-validation

Conversation

@ashwanthgoli

@ashwanthgoli ashwanthgoli commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

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
@ashwanthgoli
ashwanthgoli requested a review from a team as a code owner November 19, 2025 07:05
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Nov 19, 2025
@ashwanthgoli ashwanthgoli added size/S type/bug Somehing is not working as expected backport k281 and removed size/M labels Nov 19, 2025
@ashwanthgoli
ashwanthgoli merged commit e916944 into main Nov 19, 2025
73 checks passed
@ashwanthgoli
ashwanthgoli deleted the relabel-validation branch November 19, 2025 09:08
loki-gh-app Bot pushed a commit that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport k281 size/S type/bug Somehing is not working as expected

2 participants