Skip to content
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

ref(proguard): Deobfuscate view hierarchies as part of symbolication #74196

Merged
merged 7 commits into from
Jul 15, 2024

Conversation

loewenheim
Copy link
Contributor

@loewenheim loewenheim commented Jul 12, 2024

Depends on getsentry/symbolicator#1496.

This moves view hierarchy deobfuscation out of the plugin/preprocessor and into symbolication. That allows us to remove proguard processing from Sentry entirely and only have it in Symbolicator.

Since this means we would potentially want to send JVM events to Symbolicator that don't have exceptions or stacktraces, we have to be more lenient when detecting such events (see the change to is_jvm_event). I don't think this presents a problem—we still check if the event contains anything that needs to be symbolicated before we actually send it.

The bigger problem is that merely modifying the attachment_cache the way I'm doing right now doesn't appear to be enough to actually save the modified attachment. The current code where that happens in the preprocessor does just that, but I assume there is some point where the cache is persisted that we don't hit if we do this in symbolication. I need to understand this better. This was due to some trivial mistake or other that got fixed along the way.

@loewenheim loewenheim requested a review from a team July 12, 2024 12:42
@loewenheim loewenheim requested a review from a team as a code owner July 12, 2024 12:42
@loewenheim loewenheim marked this pull request as draft July 12, 2024 12:43
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 12, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in this file look much worse than they are. Basically we need to make the test compatible with Symbolicator, so it needs with set_sentry_option("system.url-prefix", live_server.url): at the beginning.

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 54.34783% with 21 lines in your changes missing coverage. Please review.

Project coverage is 78.15%. Comparing base (9d0b1e0) to head (63ff5ae).
Report is 190 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #74196    +/-   ##
========================================
  Coverage   78.14%   78.15%            
========================================
  Files        6650     6650            
  Lines      297301   297042   -259     
  Branches    51186    51112    -74     
========================================
- Hits       232326   232153   -173     
+ Misses      58708    58659    -49     
+ Partials     6267     6230    -37     
Files Coverage Δ
src/sentry/lang/java/plugin.py 100.00% <100.00%> (ø)
src/sentry/lang/java/utils.py 57.57% <100.00%> (-24.25%) ⬇️
src/sentry/lang/native/symbolicator.py 77.12% <ø> (-2.66%) ⬇️
src/sentry/lang/java/processing.py 42.07% <50.00%> (-41.67%) ⬇️

... and 121 files with indirect coverage changes

src/sentry/lang/java/processing.py Outdated Show resolved Hide resolved
src/sentry/lang/java/processing.py Show resolved Hide resolved
@loewenheim loewenheim marked this pull request as ready for review July 15, 2024 12:30
@loewenheim loewenheim requested a review from a team as a code owner July 15, 2024 12:30
@loewenheim loewenheim merged commit 43b5124 into master Jul 15, 2024
47 checks passed
@loewenheim loewenheim deleted the ref/proguard-view-hierarchy branch July 15, 2024 14:32
@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants