-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[processor/tailsampling] add missing sub policies to AND policy #11505
Conversation
Thanks for the contribution @tim-oster! We need the CLA signed, as per community guidelines |
@tim-oster could you add entry to the changelog? |
This looks good overall. I like how it cleans up things
Can you add this case to unit tests? |
I'll look at it in detail later, but I wanted to thank you for this refactoring. It was way overdue! @mottibec, would you be interested in reviewing this one as well? |
@pmm-sumo sorry for the delay! I added the two test cases and refactored the composite test so that it tests all of the implemented behavior. |
This reverts commit 2ce16d5.
Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
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.
Thank you for showing the tailsampling some love!
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@tim-oster, I understand this is very close to being ready. Do you still have interest in this one? |
@jpkrohling yes, absolutely. sorry for the delay. |
Ping me when it's ready for a review. |
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.
LGTM
@jpkrohling the changelog linter complains about |
@tim-oster, yes, please create one following the contribution guidelines. Basically, you'll just need to add a new file to the |
@jpkrohling sorry for the confusion. I already added the file, I meant if I should also create a new issue to track this change because otherwise I cannot link to it in the file in |
You can add this PR's number. GitHub will redirect to the PR if needed. |
@tim-oster @jpkrohling can we merge this? this will solve #13929 |
Description:
Added parsing support to AND policy for all sub policies mentioned in
AndCfg
(Latency was missing). Instead of copying the parsing code, I am suggesting a refactored approach that unifies all conversions in one place for better extensibility in the future.Furthermore, I added error handling for both the AND & COMPOSITE policy parsing. Without it, errors during parsing were ignored and nil
PolicyEvaluator
s were appended to the sub policies which caused the process to panic once it tried to evaluate any of the two composite policies.Link to tracking Issue:
Testing:
I ran the already existing tests to check if the config still parses correctly and fixed the COMPOSITE policy which contained invalid config.
Documentation: