sentry icon indicating copy to clipboard operation
sentry copied to clipboard

fix(replays): Add coverage and update implementation to handle malformed payload submissions

Open cmanallen opened this issue 1 year ago • 1 comments

This pull attempts to add coverage for every message permutation that can break ingestion. It also updates the implementation to satisfy the coverage.

cmanallen avatar Feb 12 '24 21:02 cmanallen

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/sentry/replays/usecases/ingest/init.py

Function Unhandled Issue
_ingest_recording JSONDecodeError: Parse error at offset 0: Invalid value. sentry.utils.json ...
Event Count: 222

Did you find this useful? React with a 👍 or 👎

sentry-io[bot] avatar Feb 12 '24 21:02 sentry-io[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (333527b) 81.39% compared to head (745cb1d) 81.40%. Report is 63 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #65032    +/-   ##
========================================
  Coverage   81.39%   81.40%            
========================================
  Files        5250     5252     +2     
  Lines      232080   232202   +122     
  Branches    45569    45601    +32     
========================================
+ Hits       188907   189014   +107     
- Misses      37288    37299    +11     
- Partials     5885     5889     +4     
Files Coverage Δ
src/sentry/api/endpoints/artifact_lookup.py 84.67% <100.00%> (ø)
src/sentry/api/endpoints/debug_files.py 83.33% <100.00%> (ø)
.../endpoints/organization_artifactbundle_assemble.py 81.03% <100.00%> (ø)
.../endpoints/project_artifact_bundle_file_details.py 93.75% <100.00%> (ø)
...try/api/endpoints/project_artifact_bundle_files.py 89.47% <100.00%> (ø)
src/sentry/features/__init__.py 100.00% <100.00%> (ø)
src/sentry/relay/projectconfig_cache/redis.py 93.02% <100.00%> (ø)
src/sentry/replays/consumers/recording.py 97.05% <100.00%> (+0.39%) :arrow_up:
src/sentry/replays/consumers/recording_buffered.py 96.09% <100.00%> (+2.59%) :arrow_up:
src/sentry/replays/usecases/ingest/__init__.py 91.91% <100.00%> (+4.91%) :arrow_up:
... and 4 more

... and 75 files with indirect coverage changes

codecov[bot] avatar Feb 12 '24 21:02 codecov[bot]