Skip to content
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

Change default validation scheme to UTF8Validation #724

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

ywwg
Copy link
Member

@ywwg ywwg commented Nov 15, 2024

fixes #723

fixes #723

Signed-off-by: Owen Williams <owen.williams@grafana.com>
@ywwg ywwg force-pushed the owilliams/defaultscheme branch from 435605e to babb979 Compare November 15, 2024 19:27
@SuperQ
Copy link
Member

SuperQ commented Nov 16, 2024

Is there any coordination with client_golang we need here? This seems like it may be a transparent breaking change for some systems.

@ywwg
Copy link
Member Author

ywwg commented Nov 18, 2024

I'll test it out -- probably yes we want to coordinate releases

@SuperQ SuperQ requested review from bwplotka and ArthurSens December 4, 2024 23:04
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

Yea let's update client_golang straight away with this and explicitly set this if needed.

@bwplotka
Copy link
Member

Ok, this breaks in quite many places (client_golang, prometheus, outside users like Google), changing global and defer to change back does not scale really. We might consider fixing 0.62.0 and change all those functions to actually NOT use global cc @ywwg @SuperQ

@bwplotka
Copy link
Member

The challenge is UnmarshalJSON and so, plus doing this in backward compatible way. Unless we want to add more validation scheme OR the cases where legacy has to be used, it might be indeed easier to break everyone here ):

@bwplotka
Copy link
Member

Added big warning to release https://github.com/prometheus/common/releases/tag/v0.62.0

bwplotka added a commit to prometheus/client_golang that referenced this pull request Jan 20, 2025
common 0.62.0 switches NameValidationScheme global variable to UTF8Validation.
While relaxing validation this will likely yield test failures downstream.

It's unfortunate, but the alternatives were worse: prometheus/common#724

Good news is that client_golang should work with older common deps and callers can
easily change model.NameValidationScheme value to old value to solve any compatibility issues.

Signed-off-by: bwplotka <bwplotka@gmail.com>
bwplotka added a commit to prometheus/client_golang that referenced this pull request Jan 20, 2025
common 0.62.0 switches NameValidationScheme global variable to UTF8Validation.
While relaxing validation this will likely yield test failures downstream.

It's unfortunate, but the alternatives were worse: prometheus/common#724

Good news is that client_golang should work with older common deps and callers can
easily change model.NameValidationScheme value to old value to solve any compatibility issues.

Signed-off-by: bwplotka <bwplotka@gmail.com>
bwplotka added a commit to prometheus/client_golang that referenced this pull request Jan 20, 2025
common 0.62.0 switches NameValidationScheme global variable to UTF8Validation.
While relaxing validation this will likely yield test failures downstream.

It's unfortunate, but the alternatives were worse: prometheus/common#724

Good news is that client_golang should work with older common deps and callers can
easily change model.NameValidationScheme value to old value to solve any compatibility issues.

Signed-off-by: bwplotka <bwplotka@gmail.com>
bwplotka added a commit to prometheus/client_golang that referenced this pull request Jan 20, 2025
common 0.62.0 switches NameValidationScheme global variable to UTF8Validation.
While relaxing validation this will likely yield test failures downstream.

It's unfortunate, but the alternatives were worse: prometheus/common#724

Good news is that client_golang should work with older common deps and callers can
easily change model.NameValidationScheme value to old value to solve any compatibility issues.

Signed-off-by: bwplotka <bwplotka@gmail.com>
bwplotka added a commit to prometheus/client_golang that referenced this pull request Jan 20, 2025
common 0.62.0 switches NameValidationScheme global variable to UTF8Validation.
While relaxing validation this will likely yield test failures downstream.

It's unfortunate, but the alternatives were worse: prometheus/common#724

Good news is that client_golang should work with older common deps and callers can
easily change model.NameValidationScheme value to old value to solve any compatibility issues.

Signed-off-by: bwplotka <bwplotka@gmail.com>
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.

Change default validation mode to UTF-8
3 participants