Open manics opened 1 month ago
There's also some calls in proxy.py https://github.com/jupyterhub/kubespawner/blob/7ba57a8c915b190b24d514d91427620c08eb1353/kubespawner/proxy.py#L358-L360
@manics thanks for investigating this thoroughly -- I agree on the decision to await things now that I've seen the motivation in this issue!
Bug description
There are some calls to
asyncio.ensure_future(...)
that aren't awaited: https://github.com/jupyterhub/kubespawner/blob/621be0e68d9dea38ac899c6054f966dd68d1d028/kubespawner/spawner.py#L2803-L2805 https://github.com/jupyterhub/kubespawner/blob/621be0e68d9dea38ac899c6054f966dd68d1d028/kubespawner/spawner.py#L3252-L3257 https://github.com/jupyterhub/kubespawner/blob/621be0e68d9dea38ac899c6054f966dd68d1d028/kubespawner/spawner.py#L3379-L3382The docs for
asyncio.ensure_future
say the resulting Task will be scheduled, but also saysasyncio.create_task()
has a longer explanationI think we should either await those, save a reference to them, or add a comment to the code explaining why it isn't necessary.