Skip to content

fix(matchers/compat): use legacy name validation scheme in classic mode#4426

Merged
grobinson-grafana merged 2 commits intoprometheus:mainfrom
juliusmh:force_classic_name_validation
Jul 21, 2025
Merged

fix(matchers/compat): use legacy name validation scheme in classic mode#4426
grobinson-grafana merged 2 commits intoprometheus:mainfrom
juliusmh:force_classic_name_validation

Conversation

@juliusmh
Copy link
Contributor

@juliusmh juliusmh commented Jun 5, 2025

When importing alertmanager in a project with prometheus/common >= v0.62.0 in classic mode, calls to compat.IsValidLabelName use UTF8Validation scheme due to a new default for NameValidationScheme. This PR addresses this change by correctly using the legacy validation logic.
As a workaround, set model.NameValidationScheme to model.LegacyValidation.

Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
@juliusmh
Copy link
Contributor Author

The error seems unrelated to the changes done in this PR:

acceptance.go:178: failed to start alertmanager cluster: unable to get a successful response from the Alertmanager: Get "http://127.0.0.1:43857/api/v2/status": dial tcp 127.0.0.1:43857: connect: connection refused

@grobinson-grafana grobinson-grafana merged commit 4534c9a into prometheus:main Jul 21, 2025
11 checks passed
@juliusmh juliusmh deleted the force_classic_name_validation branch July 22, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants