-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(replays): Add additional parsing safety to integer and datetime column types #3352
Conversation
Codecov ReportBase: 90.75% // Head: 91.31% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3352 +/- ##
==========================================
+ Coverage 90.75% 91.31% +0.56%
==========================================
Files 704 702 -2
Lines 32335 32398 +63
==========================================
+ Hits 29345 29584 +239
+ Misses 2990 2814 -176
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
if callable(value) is None: | ||
# This exception can only be triggered through abuse. We choose not to suppress these | ||
# exceptions in favor of identifying the origin. | ||
raise ValueError(f'Integer "{value}" overflowed.') |
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.
Won't this cause the whole replay processing pipeline to stop if one org is causing the abuse?
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 particular error should trigger the replays DLQ (let me know if this assumption is incorrect). An exception raised after the processing step (e.g. the write step) caused INC-250. I don't believe this change introduces any pipeline risk.
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.
Looks good, nice to see the additional tests!
…column types (#3352) * Add additional parsing safety to integer and datetime column types * Add coverage for invalid segment_id, timestamp, and replay_start_timestamp fields * Add lazy evaluation for default argument * Mark _coerce_segment_id as private * Update tests to reflect private function * Replace _intify with int function
closes: https://github.com/getsentry/replay-backend/issues/193