Repository navigation
fix: skip VCS webhook repositories whose function or site was deleted - #13793
Merged
Merged
Conversation
The deletes worker removes the repository row after the resource, so a push arriving in between resolves an empty resource, queries deployments by a null sequence and fails the whole webhook with a 500 (Sentry CLOUD-3QWM). Skip that repository and keep handling the rest.
Contributor
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
HarshMN2345
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
POST /v1/vcs/github/eventsresolves each linked repository's function or site before creating a deployment. When the resource was deleted but the deletes worker has not yet removed the repository row, the lookup returns an empty document and the deployments query runs with a nullresourceInternalId, failing the whole webhook with a 500Invalid query. Fixes Sentry CLOUD-3QWM, 1.4k events since 9/5. Such repositories are now skipped, the same way non-matching branches are, and the remaining repositories in the payload are still processed.Test Plan
New E2E
testGitHubPushForDeletedFunctionIsSkippedinVCSGitHubConsoleClientTestcreates a VCS-linked function, deletes it and sends the push webhook, asserting 200. Runs in the VCS GitHub CI job, which has the GitHub app credentials.Checklist