Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

7h3-3mp7y-m4n
Copy link
Contributor

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

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@yeya24
Copy link
Contributor

yeya24 commented Jul 28, 2025

I think the test failure is expected. Please see #6733 (comment)

@7h3-3mp7y-m4n
Copy link
Contributor Author

For sure @yeya24 , I'll work on it!

Signed-off-by: 7h3-3mp7y-m4n <[email protected]>
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 29, 2025
model.NameValidationScheme = model.UTF8Validation
} else {
// nolint:staticcheck // SA1019: using deprecated NameValidationScheme intentionally for legacy validation testing
model.NameValidationScheme = model.LegacyValidation
Copy link
Contributor

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.

@yeya24
Copy link
Contributor

yeya24 commented Aug 14, 2025

Hey @7h3-3mp7y-m4n, sorry for the ping. Do you still plan to continue this PR?

@7h3-3mp7y-m4n
Copy link
Contributor Author

Hi @yeya24,
Apologies for the delay, I wasn’t feeling well. I’ll do my best to fix it by the end of today.
Thank you for the reminder! After all, it needs a minor fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make NameValidationScheme configurable
2 participants