-
Notifications
You must be signed in to change notification settings - Fork 832
feat: support configurable name validation (legacy or UTF-8 schemes) #6916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>
I think the test failure is expected. Please see #6733 (comment) |
For sure @yeya24 , I'll work on it! |
pkg/distributor/distributor_test.go
Outdated
model.NameValidationScheme = model.UTF8Validation | ||
} else { | ||
// nolint:staticcheck // SA1019: using deprecated NameValidationScheme intentionally for legacy validation testing | ||
model.NameValidationScheme = model.LegacyValidation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be modifying model.NameValidationScheme
directly in the test case. Let's use the new config we added instead.
Hey @7h3-3mp7y-m4n, sorry for the ping. Do you still plan to continue this PR? |
Hi @yeya24, |
Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>
a47f8ce
to
528c4ad
Compare
Signed-off-by: Rashid Alam <115151332+7h3-3mp7y-m4n@users.noreply.github.com>
Hey @7h3-3mp7y-m4n, would you like to continue this PR? We need to update some code to adjust the change from Prometheus common library to fix lint. |
Okay, I'll do my best! |
What this PR does:
Adds
name_validation_scheme
as a YAML config field and-name.validation-scheme
as a CLI flag to configure the metric and label name validation mode. Supports legacy (default) and UTF-8 options.Which issue(s) this PR fixes:
Fixes #6702
Follow Up #6733
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]