fix: Update DATA_UPLOAD_MAX_MEMORY_SIZE to 25 MB #740
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose/Motivation
When looking through sentry issues, I saw one related to request body exceeding the max memory size, with ~800 events in the last 30 days. Looking at the stack trace, these all looked to be coming from the github webhook handler. Checking our current limit in API, it looks like our max size we currently allowed was set to 15MB; but then looking at the max github webhook size, they call out their size limit as 25MB. Anyone have any objections with increasing our max size allowed to 25MB to match with github? The value was set in API 4+ years ago and hasn't changed, it wouldn't surprise me if Github has increased their limits over time, but it also wouldn't surprise me if this was a design decision made purposefully either.
This PR updates the value to be 25MB, as well as updating the log for all webhook coming in from debug to info, so we can track roughly how many events we were dropping over time (pre/post)
Github webhooks are responsible for repository, owner, installations, commits, pulls, etc. so it's imperative that we don't drop any of these events if we can help it!
Sentry Issue -> mentions 6.6k events since we first noticed (March 2023)
Closes codecov/engineering-team#2235
References:
Links to relevant tickets
Notes to Reviewer
Anything to note to the team? Any tips on how to review, or where to start?
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.