-
Notifications
You must be signed in to change notification settings - Fork 818
feat: added name validation scheme as a config field and flag as well #6733
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?
feat: added name validation scheme as a config field and flag as well #6733
Conversation
Signed-off-by: Abhishek Anand <[email protected]>
2186312
to
146188f
Compare
I am working on the tests for this. |
Signed-off-by: Abhishek Anand <[email protected]>
Added test for name validation scheme in |
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.
Thanks @av153k. Great work and I think it is on the right track. Just few comments
…andled empty name validation scheme and related tests Signed-off-by: Abhishek Anand <[email protected]>
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.
Can you also update changelog?
What would be the version of this change, though? |
… in the config file and CLI flag, along with corresponding tests. Signed-off-by: Abhishek Anand <[email protected]>
Signed-off-by: Abhishek Anand <[email protected]>
pkg/cortex/cortex.go
Outdated
case prom_config.UTF8ValidationConfig: | ||
model.NameValidationScheme = model.UTF8Validation | ||
default: | ||
fmt.Errorf("invalid name validation scheme") |
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.
This needs to be returned
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.
Okay. I will add that. Anything else apart from this? Also after this is done, can you please point me to a few issues that you think I can take up on. Thank you.
Signed-off-by: Abhishek Anand <[email protected]>
Signed-off-by: Abhishek Anand <[email protected]>
There was some issue with the generated doc I guess. Will switch to WSL since I am using windows and then push one more commit with generated docs. |
Please fix lint and unit test. You can also run those tests locally and see if they are able to pass |
Signed-off-by: Abhishek Anand <[email protected]>
I had to add back the validation check in the config.validate() for name validation scheme. I though about removing that specific test but felt its much better to add the validation logic. I am working on the lint issues. |
@yeya24 Do I have to add the test for race cases or will that be in a separate PR? |
I am trying Actually now, just stuck here. |
What this PR does:
name_validation_scheme
as yaml flag andname.validation.scheme
as a flagWhich issue(s) this PR fixes:
Fixes #6702
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]