You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
coroutine make_request was never awaited during sl pr pull #583
While running sl pr pull SOME_PR when HEAD points to an already landed pr (different from SOME_PR), I get the following:
warning: failed to read from Github for landed commits (RuntimeError('This event loop is already running')), not marking commits as landed
D:\a\sapling\sapling\eden\scm\edenscm\ext\github\pr_marker.py:49: RuntimeWarning: coroutine 'make_request' was never awaited
This is likely due to the use of sync_graphql calls while already in an asyncio loop in pr_marker.py
Hi @zsol, thanks for posting the issue and steps to reproduce it. Yes, the issue here is the nested async event loops, this was due to a recent change of moving pr_marker inline instead of as a separate hook.
We probably can solve it by using nest_asyncio, but I will check if we can eliminate the nested event loop next week. For now, you can add below config to your config file by running sl config -e to disable pr_marker, and run sl debugprmarker manually if you want to hide landed PRs.
[github]
hide-landed-commits=False
Below is the trace stack (simplified) of the nested event loop:
Activity
zzl0 commentedon Mar 25, 2023
Hi @zsol, thanks for posting the issue and steps to reproduce it. Yes, the issue here is the nested async event loops, this was due to a recent change of moving pr_marker inline instead of as a separate hook.
We probably can solve it by using nest_asyncio, but I will check if we can eliminate the nested event loop next week. For now, you can add below config to your config file by running
sl config -eto disable pr_marker, and runsl debugprmarkermanually if you want to hide landed PRs.Below is the trace stack (simplified) of the nested event loop:
zzl0 commentedon Apr 3, 2023
Fixed in 3f6cd0c
Made
pr_markerrun as apost-pullhook instead of running it as part of thepullfunction (via a high-order wrapper function).