-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[pkg/ottl] Introduce profiles based e2e tests #40931
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
[pkg/ottl] Introduce profiles based e2e tests #40931
Conversation
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 gives me so much confidence, thank you for taking to time to make all these.
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.
No changelog needed.
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.
Agreed, but I think we should add a change log for the bug this PR is fixing.
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.
Agreed, but I think we should add a change log for the bug this PR is fixing.
| } | ||
| } | ||
|
|
||
| func getAttributeValue[K ProfileContext](tCtx K, key string) pcommon.Value { |
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.
I'm a bit confused with this fix, is overriding the existing keys at the profile dictionary expected here? considering it would indirectly change the value for all other references? Last time we discussed it duplicating keys was expected (#39681 (comment)), have it changed? If I'm not mistaken, that described scenario won't happen anymore with this fix, and the dictionary table item will be updated.
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.
Good spot!
We definitely must not change any existing value in the dictionary attribute table here. Just pushed a fix for it and will later add tests that ensure that the dictionary attribute table isn't changed when adding or changing attributes.
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.
I will also change the changelog to bug_fix and amend the description.
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.
- amended the changelog
- added a validation of dictionary tables to ensure that existing entries are not changed by operations. Does it make sense to do the validation in other test functions as well?
The validator could possibly be moved into pprofiletest, maybe in a follow-up PR.
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.
Does it make sense to do the validation in other test functions as well?
Converters should not change telemetry data, so it should be fine as it's (although we know they can sneakily do it by leveraging references).
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! Thank you very much for working on that!
#### Description Introduce OTTL e2e tests based on profiles. The tests uncovered an issue in accessAttributesKey(), which is fixed in this PR. The e2e test have been requested [here](open-telemetry#39416 (comment)) by @TylerHelmuth. #### Link to tracking issue Fixes open-telemetry#40738 #### THIS PR WILL ONLY WORK ON TOP OF open-telemetry#39416. --------- Co-authored-by: Tyler Helmuth <[email protected]> Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
Description
Introduce OTTL e2e tests based on profiles.
The tests uncovered an issue in accessAttributesKey(), which is fixed in this PR.
The e2e test have been requested here by @TylerHelmuth.
Link to tracking issue
Fixes #40738
THIS PR WILL ONLY WORK ON TOP OF #39416.