wip(tests): Working example of broken testcase #94891
Draft
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.
TL;DR -> Trying to save a performance issue while within the
freeze_time
ctx will have inconsistent behaviour whether or not we are in the default 90 day retention, and whether or not the value it uses is dynamic. This odd behavior can lead to issues since writing tests and freezing today's date will cause the test to fail 90d from now :(I spent a while debugging this and noticed
normalize
seems like a relay function which overrides the event data's timestamp, but even if we skip normalization the event is not saved correctly, and cant be accessed withgroup.get_latest_event()
. I think another storage somewhere else is overriding the event timestamp when its inserted.I dont understand the how the storage and query mechanisms underneath work well enough to trace where exactly the retention days check is causing issues, so I wrote some failing tests to share with SMEs.