-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[chore][pkg/stanza] - Fix Flaky test TestMatcher #36640
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VihasMakwana
added
the
Skip Changelog
PRs that do not require a CHANGELOG.md entry
label
Dec 3, 2024
evan-bradley
approved these changes
Dec 3, 2024
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 catch, thanks.
adrielp
approved these changes
Dec 3, 2024
cc: @odubajDT can you take a look? this is related to your recent work on file groupings. |
dmitryax
approved these changes
Dec 3, 2024
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 @VihasMakwana!
shivanthzen
pushed a commit
to shivanthzen/opentelemetry-collector-contrib
that referenced
this pull request
Dec 5, 2024
Fixes open-telemetry#36623 We're using a map to store groups and we then do a `for .. range` over keys. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6119d51a5a85565c409bb225027d6d1ab353aecc/pkg/stanza/fileconsumer/matcher/matcher.go#L200-L206 For maps, the ordering of keys is not guaranteed. Hence, the check fails. We should instead check with `assert.ElementsMatch` (which was previously the case, but open-telemetry#36518 changed it to `assert.Equal`)
ZenoCC-Peng
pushed a commit
to ZenoCC-Peng/opentelemetry-collector-contrib
that referenced
this pull request
Dec 6, 2024
Fixes open-telemetry#36623 We're using a map to store groups and we then do a `for .. range` over keys. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6119d51a5a85565c409bb225027d6d1ab353aecc/pkg/stanza/fileconsumer/matcher/matcher.go#L200-L206 For maps, the ordering of keys is not guaranteed. Hence, the check fails. We should instead check with `assert.ElementsMatch` (which was previously the case, but open-telemetry#36518 changed it to `assert.Equal`)
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this pull request
Dec 17, 2024
Fixes open-telemetry#36623 We're using a map to store groups and we then do a `for .. range` over keys. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6119d51a5a85565c409bb225027d6d1ab353aecc/pkg/stanza/fileconsumer/matcher/matcher.go#L200-L206 For maps, the ordering of keys is not guaranteed. Hence, the check fails. We should instead check with `assert.ElementsMatch` (which was previously the case, but open-telemetry#36518 changed it to `assert.Equal`)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #36623
We're using a map to store groups and we then do a
for .. range
over keys.opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher.go
Lines 200 to 206 in 6119d51
For maps, the ordering of keys is not guaranteed. Hence, the check fails.
We should instead check with
assert.ElementsMatch
(which was previously the case, but #36518 changed it toassert.Equal
)