SeldonIO / MLServer

An inference server for your machine learning models, including support for multiple frameworks, multi-model serving and more
https://mlserver.readthedocs.io/en/latest/
Apache License 2.0
695 stars 179 forks source link

Revert "build(deps): bump uvicorn from 0.28.0 to 0.29.0" #1758

Closed jesse-c closed 4 months ago

jesse-c commented 4 months ago

Reverts SeldonIO/MLServer#1648

This has temporarily broken some tests [1][2]. Will revert it and get it ready again.

[1] https://github.com/SeldonIO/MLServer/pull/1757/checks [2]

2024-05-13T12:19:37.4525274Z self = <mlserver.metrics.server._NoSignalServer object at 0x7f3c72791df0>
2024-05-13T12:19:37.4526191Z 
2024-05-13T12:19:37.4526423Z     @contextlib.contextmanager
2024-05-13T12:19:37.4527388Z     def capture_signals(self) -> Generator[None, None, None]:
2024-05-13T12:19:37.4528509Z         # Signals can only be listened to from the main thread.
2024-05-13T12:19:37.4529501Z         if threading.current_thread() is not threading.main_thread():
2024-05-13T12:19:37.4530392Z             yield
2024-05-13T12:19:37.4531284Z             return
2024-05-13T12:19:37.4532179Z         # always use signal.signal, even if loop.add_signal_handler is available
2024-05-13T12:19:37.4533516Z         # this allows to restore previous signal handlers later on
2024-05-13T12:19:37.4534790Z         original_handlers = {sig: signal.signal(sig, self.handle_exit) for sig in HANDLED_SIGNALS}
2024-05-13T12:19:37.4535789Z         try:
2024-05-13T12:19:37.4536375Z             yield
2024-05-13T12:19:37.4537038Z         finally:
2024-05-13T12:19:37.4537671Z             for sig, handler in original_handlers.items():
2024-05-13T12:19:37.4538614Z                 signal.signal(sig, handler)
2024-05-13T12:19:37.4539697Z         # If we did gracefully shut down due to a signal, try to
2024-05-13T12:19:37.4540844Z         # trigger the expected behaviour now; multiple signals would be
2024-05-13T12:19:37.4542113Z         # done LIFO, see https://stackoverflow.com/questions/48434964
2024-05-13T12:19:37.4543283Z         for captured_signal in reversed(self._captured_signals):
2024-05-13T12:19:37.4544333Z >           signal.raise_signal(captured_signal)
2024-05-13T12:19:37.4545407Z E           TypeError: an integer is required (got type NoneType)
2024-05-13T12:19:37.4546128Z 
2024-05-13T12:19:37.4546905Z .tox/mlserver/lib/python3.9/site-packages/uvicorn/server.py:328: TypeError