Skip to content

feat(sourcebundle): Add callback to handle skipped files#864

Merged
szokeasaurusrex merged 4 commits intomasterfrom
szokeasaurusrex/skipping-sources
Sep 4, 2024
Merged

feat(sourcebundle): Add callback to handle skipped files#864
szokeasaurusrex merged 4 commits intomasterfrom
szokeasaurusrex/skipping-sources

Conversation

@szokeasaurusrex
Copy link
Copy Markdown
Member

Add a callback to SourceBundleWriter that is called every time we skip adding a file to the bundle due to a ReadFailed error.

Also, #861 missed another spot where the ReadFailed error can cause the write function to fail; this PR fixes that.

Closes #863
Fixes #860

Add a callback to SourceBundleWriter that is called every time we skip adding a file to the bundle due to a ReadFailed error.

Closes #863
#861 missed another spot where the ReadFailed error can cause the write function to fail; this commit fixes that.

Fixes #860
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 30, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6fb5a49

Copy link
Copy Markdown
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

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

This is an elegant way of doing it!

@szokeasaurusrex
Copy link
Copy Markdown
Member Author

This is an elegant way of doing it!

Yeah, many thanks to @jan-auer for helping me to come up with this idea! We are fully backwards compatible in this way

@szokeasaurusrex
Copy link
Copy Markdown
Member Author

@loewenheim I also had the idea that we could similarly add a with_filter function to add a filter callback on the SourceBundleWriter to be used with write_object, which would allow us to deprecate and eventually remove write_object_with_filter.

@loewenheim
Copy link
Copy Markdown
Contributor

@loewenheim I also had the idea that we could similarly add a with_filter function to add a filter callback on the SourceBundleWriter to be used with write_object, which would allow us to deprecate and eventually remove write_object_with_filter.

It's something to think about.

Co-authored-by: Jan Michael Auer <jan.auer@sentry.io>
@szokeasaurusrex szokeasaurusrex merged commit a66bcd1 into master Sep 4, 2024
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/skipping-sources branch September 4, 2024 11:51
@p0358
Copy link
Copy Markdown

p0358 commented Sep 4, 2024

Since #860 was closed, does that mean that sentry-cli also handles this now in some way already? What would be the behavior now when a file is to be skipped? Bail out, warning, or silent debug log? (assuming either option would now log the file name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indicate invalid files that SourceBundleWriter skips Uploading debug information files fails in v2.33.1

4 participants