-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(taskworker): Make process_profile worker support uncompressed payloads #95692
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
Conversation
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.
Bug: Payload Decoding Error Handling Regression
The decode_payload
function introduces inconsistent error handling. The uncompressed payload path (compressed_profile=False
) lacks try/catch
blocks for b64decode
and msgpack.unpackb
operations. Consequently, failures in these operations will not be logged or tracked with metrics, unlike the compressed path which retains this error handling. This regression can lead to unhandled exceptions and hinders debugging.
src/sentry/profiles/task.py#L115-L117
sentry/src/sentry/profiles/task.py
Lines 115 to 117 in d53bc4f
raise | |
else: | |
return msgpack.unpackb(b64decode(encoded.encode("utf-8")), use_list=False) |
Was this report helpful? Give feedback by reacting with 👍 or 👎
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #95692 +/- ##
==========================================
+ Coverage 75.45% 83.88% +8.43%
==========================================
Files 10563 10563
Lines 608872 608874 +2
Branches 23913 23913
==========================================
+ Hits 459394 510738 +51344
+ Misses 149091 97749 -51342
Partials 387 387 |
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. Inflight tasks won't have compressed_profile set, but the default value maintains backwards compatibility, and in a future deploy we can disable task layer compression.
The process_profiles worker code now supports uncompressed parameter payloads (#95692). This PR is responsible for removing double compression by changing the process_profile call site to send uncompressed tasks to taskworker as taskworker already handles zstd compression in its platform.
…yloads (#95692) The taskworker producer layer now supports zstd compression. This means that the zlib task level compression is no longer necessary here. In order to remove, this PR updates the worker code to take an optional parameter which decides whether or not the payload should be zlib decompressed. In a subsequent PR, the producer code will be updated to send uncompressed payloads
The process_profiles worker code now supports uncompressed parameter payloads (#95692). This PR is responsible for removing double compression by changing the process_profile call site to send uncompressed tasks to taskworker as taskworker already handles zstd compression in its platform.
…yloads (#95692) The taskworker producer layer now supports zstd compression. This means that the zlib task level compression is no longer necessary here. In order to remove, this PR updates the worker code to take an optional parameter which decides whether or not the payload should be zlib decompressed. In a subsequent PR, the producer code will be updated to send uncompressed payloads
The process_profiles worker code now supports uncompressed parameter payloads (#95692). This PR is responsible for removing double compression by changing the process_profile call site to send uncompressed tasks to taskworker as taskworker already handles zstd compression in its platform.
The taskworker producer layer now supports zstd compression. This means that the zlib task level compression is no longer necessary here. In order to remove, this PR updates the worker code to take an optional parameter which decides whether or not the payload should be zlib decompressed. In a subsequent PR, the producer code will be updated to send uncompressed payloads