-
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
feat: trigger PR sync #655
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #655 +/- ##
=======================================
Coverage 91.54% 91.54%
=======================================
Files 621 621
Lines 16569 16574 +5
=======================================
+ Hits 15168 15173 +5
Misses 1401 1401
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #655 +/- ##
=======================================
Coverage 91.54% 91.54%
=======================================
Files 621 621
Lines 16569 16574 +5
=======================================
+ Hits 15168 15173 +5
Misses 1401 1401
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 #655 +/- ##
===========================================
Coverage 95.94000 95.94000
===========================================
Files 799 799
Lines 17886 17912 +26
===========================================
+ Hits 17160 17185 +25
- Misses 726 727 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
It's possible with a combination of not having webhooks and temporary errors when fetching info from the git provider that a PR will be left forever open. One solution is to make the PR view trigger a sync_pull task in the background. Notice that for the person that is actually viewing the PR it will probably be out of date, but if they refresh the page it will eventually be updated. closes: codecov/internal-issues#513
3c693c0
to
057cd7c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
return repository.pull_requests.filter(pullid=id).first() | ||
pull = repository.pull_requests.filter(pullid=id).first() | ||
if self._should_sync_pull(pull): | ||
TaskService().pulls_sync(repository.repoid, id) |
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.
Could the pulls_sync task leave the pull syncing indefinitely? I suppose there's a hard timeout, but trying to think if this could end up in another "stale" state
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.
Well even if the task does have an issue it doesn't matter for this request in particular because the calling of it only enqueues it for the workers. It's not blocking in any way.
It's possible with a combination of not having webhooks and temporary errors when
fetching info from the git provider that a PR will be left forever open.
One solution is to make the PR view trigger a sync_pull task in the background.
Notice that for the person that is actually viewing the PR it will probably be out of date,
but if they refresh the page it will eventually be updated.
closes: https://github.com/codecov/internal-issues/issues/513