-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reactivate ghapp usage in api #360
Conversation
This bug caused a little incident in Codecov. The actual issue is that we can't make DB queries syncronously from an async context. When getting the file content we have to get an adapter, and that - since the GithubAppInstallation work - required a query to the database to get the default GithubAppInstallation for an `owner`. That was the actual error that caused the incident. Error surfacing was terrible in that endpoint so I changed the `info` log from an `exception` one so we can have a stacktrace. To actually fix the error I actually created an async version of `get_adapter`. I scanned the code, but it seems that this instance is the only place where we actually use this.
Codecov ReportAttention:
📢 Thoughts on this report? Let us know! |
Codecov Report
@@ Coverage Diff @@
## main #360 +/- ##
=======================================
Coverage 96.08% 96.08%
=======================================
Files 632 632
Lines 16409 16470 +61
=======================================
+ Hits 15766 15826 +60
- Misses 643 644 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAttention:
Changes have been made to critical files, which contain lines commonly executed in production. Learn more
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
=======================================
+ Coverage 95.75 95.77 +0.02
=======================================
Files 747 747
Lines 16927 16987 +60
=======================================
+ Hits 16208 16268 +60
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
=======================================
Coverage 96.08% 96.08%
=======================================
Files 632 632
Lines 16409 16470 +61
=======================================
+ Hits 15766 15826 +60
- Misses 643 644 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
reactivate ghapp usage in api and fix bug when getting file contents.
This bug caused a little incident in Codecov.
The actual issue is that we can't make DB queries syncronously from an
async context.
When getting the file content we have to get an adapter,
and that - since the GithubAppInstallation work - required a query to
the database to get the default GithubAppInstallation for an
owner
.That was the actual error that caused the incident.
Error surfacing was terrible in that endpoint so I changed the
info
logfrom an
exception
one so we can have a stacktrace.To actually fix the error I actually created an async version of
get_adapter
.I scanned the code, but it seems that this instance is the only place where we
actually use this.
Purpose/Motivation
What is the feature? Why is this being done?
Links to relevant tickets
What does this PR do?
Include a brief description of the changes in this PR. Bullet points are your friend.
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.