-
Notifications
You must be signed in to change notification settings - Fork 10
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
1348 add gql language task #314
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #314 +/- ##
==========================================
- Coverage 98.11% 98.11% -0.01%
==========================================
Files 385 387 +2
Lines 32006 32104 +98
==========================================
+ Hits 31403 31499 +96
- Misses 603 605 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #314 +/- ##
==========================================
- Coverage 98.11% 98.11% -0.01%
==========================================
Files 385 387 +2
Lines 32006 32104 +98
==========================================
+ Hits 31403 31499 +96
- Misses 603 605 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
=======================================
Coverage 98.10% 98.10%
=======================================
Files 416 418 +2
Lines 32706 32804 +98
=======================================
+ Hits 32087 32184 +97
- Misses 619 620 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general 👍
I would like to ask why you decided to create a new task instead of modifying the old one? Just out of curiosity.
If this is meant to replace that one please add some comment on the beginning of sync_repo_languages.py
saying it's deprecated and replaced by the new one.
If that's not the case please add some comment there to explain when to use one or the other
@giovanni-guidini thanks for asking! I added a better description on the PR comment to explain this change, let me know if you still have questions. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
==========================================
- Coverage 98.11% 98.11% -0.01%
==========================================
Files 385 387 +2
Lines 32006 32104 +98
==========================================
+ Hits 31403 31499 +96
- Misses 603 605 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Add task to sync languages using GQL. Bulk of change is in tasks/sync_repo_languages_gql.py
Reasoning
We have the need to fetch the languages a repository has and up until now we've created a task to do so,
sync_repo_languages
, aimed to sync languages for all of our providers. We're switching the implementation from REST to GQL for Github as it helps decrease rate limit errors, and we're leaving the REST implementation for the remaining providers as this change did not anticipate making solutions for those providers at the moment (they are also less traffic).We're adding a brand new task rather than modifying the existing one because of the nature of how each task fetches it's information. The REST task calls the provider's API and fetches a repository's language based on a repository_id, while GQL uses an owner; the REST implementation makes N requests per N repos while the GQL makes M requests for M owners. The REST endpoint mainly decides whether to call or not it's provider's endpoint based on some parameters, while the GQL approach mainly decides which repository to synchronize
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.