-
Notifications
You must be signed in to change notification settings - Fork 700
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
Fix textfile crashes with duplicate metrics #759
Conversation
Just making sure I read this correctly: This PR will check for duplicates within each file (but not across multiple files), and drop the entire file in case there are duplicates? We would still expose those files that do not have duplicates, but set |
Yes, that's correct. Looking at the link you provided I realise this implementation is somewhat naive, as it won't detect duplicates in different files. |
The strictest/"most correct" would probably be to merge all textfiles, and then check the complete set for validity. If it is not valid, we reject the entire textfile collector results, and emit no metrics at all. |
It might be possible by stuffing each |
Signed-off-by: Ben Reedy <[email protected]>
I've got this working and passing CI, have a look and let me know if there's any concerns. |
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.
Nice! Some minor questions
Check all textfile metrics will be checked for duplicates. If duplicates are detected, drop all metrics and log error. Signed-off-by: Ben Reedy <[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.
Sorry, missed the push! Looks good, very nice work!
Fix textfile crashes with duplicate metrics
Resolves #755