getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.22k stars 4.21k forks source link

fix(debugfile): Recognize chunk-uploaded Proguard files #81131

Open szokeasaurusrex opened 7 hours ago

szokeasaurusrex commented 7 hours ago

The detect_dif_from_path function does not correctly identify Proguard files which are chunk uploaded because these files have a randomly-assigned temporary path, and the logic tries to guess whether the file is a Proguard file based on its path. However, the detect_dif_from_path function also takes an optional name option, which for chunk-uploaded files, is the file name that is specified by the client making the assemble call. This has not been a problem yet, since Sentry CLI does not support chunk uploading Proguard files, but we are adding support in https://github.com/getsentry/sentry-cli/issues/2196, and so we need to fix the backend to allow chunk uploads of Proguard files.

Here, we update the logic to check both the path and the name for potentially matching a Proguard file.

szokeasaurusrex commented 7 hours ago

@asottile-sentry I updated the tests per your suggestion. Please let me know whether this looks good now

codecov[bot] commented 6 hours ago

:x: 1 Tests Failed:

Tests completed Failed Passed Skipped
323 1 322 9
View the top 1 failed tests by shortest run time > > ```python > ::tests.sentry.models.test_debugfile > ``` > >
Stack Traces | 0s run time > > > > > ```python > > No failure message available > > ``` > >

To view more test analytics, go to the Test Analytics Dashboard Got feedback? Let us know on Github

szokeasaurusrex commented 5 hours ago

I have no stake in this particular model / implementation so you may want to get sign off from the actual owners

Agreed, do you know who the owners might be @asottile-sentry? There is no code owner assigned in GitHub, and it doesn't look like this file gets edited very often

asottile-sentry commented 5 hours ago

I have no stake in this particular model / implementation so you may want to get sign off from the actual owners

Agreed, do you know who the owners might be @asottile-sentry? There is no code owner assigned in GitHub, and it doesn't look like this file gets edited very often

have no idea -- which sdk generates these types of files? that would be my guess having no context (beyond probably reformatting this or fixing the types)

szokeasaurusrex commented 5 hours ago

I added @loewenheim and @Swatinem since these files get sent by Sentry CLI, and they were the previous maintainers before I took over. Looks like they have touched the file before