polarsource / polar

An Open Source Lemon Squeezy alternative with better pricing! Get paid coding on your passion.
https://polar.sh
Apache License 2.0
2.69k stars 102 forks source link

Sentry: github.webhook.handle_pull_request.failed #653

Closed sentry-io[bot] closed 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: SERVER-2E

Funding

Fund with Polar

hult commented 1 year ago

We get quite a few of these, however, the event objects from github that we log are huge and the logging lib seems to cut them short, so I can't really see any meaningful data about them. Adding more logging in #669.

hult commented 1 year ago

Turns out some orgs (yiisoft, hult and zegloforko) had the app installed, but no installation id.

When we parse dependencies, they may be from an org/repo that is new to us, so we upserted them, but the upsert method overwrites any unspecified columns, so installation_id on the org was overwritten. Fixed in #682. Also re-inserting the installation id for those orgs, so they can make API calls.

hult commented 1 year ago

@zegl also found that we sync a maximum of 40 repos, which is why yiisoft only has 39 (one must have failed?) even though they installed the app for all of their 194 repos. This bug is probably caused by that rather than the thing above (even if that may have contributed as well). He's fixing in #683.