feat(file-io): Handle duplicate file-io spans#43955
Conversation
wmak
commented
Feb 1, 2023
- Today when there are duplicate file spans blocking main thread, the number of file-io spans will change the fingerprinting. This change updates this so that regardless of the number of duplicates the fingerprint does not change
- Today when there are duplicate file spans blocking main thread, the number of file-io spans will change the fingerprinting. This change updates this so that regardless of the number of duplicates the fingerprint does not change
narsaynorath
left a comment
There was a problem hiding this comment.
That failing test seems related to this change, it makes sense that the hashes are different now and need updating
| problem = self.find_problems(event)[0] | ||
| assert problem.title == "File IO on Main Thread" | ||
|
|
||
| def test_duplicate_calls_do_not_change_callstackc(self): |
There was a problem hiding this comment.
| def test_duplicate_calls_do_not_change_callstackc(self): | |
| def test_duplicate_calls_do_not_change_callstack(self): |
🤔 actually I intentionally wrote this in a way to not change existing fingerprints (otherwise customers would see a bunch of new duplicates) But this test passed locally... going to look into it |
| call_stack_strings = set() | ||
| overall_stack = set() |
There was a problem hiding this comment.
Will this ever cause an issue as sets don't preserve order?
I.e you'll create new fingerprints for issues that already exists.
There was a problem hiding this comment.
Oh good catch, i'll probably have to remove duplicates from the list instead of just using a set 👍
Probably why it flaked earlier too
There was a problem hiding this comment.
Yup! Or just check if not in before insertion
There was a problem hiding this comment.
ok but hear me out, what about:
sorted(set(list), lambda x: list.index(x))
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |