Skip to content

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

Merged
jesse-c merged 1 commit intomasterfrom
revert-1648-dependabot/pip/uvicorn-0.29.0
May 13, 2024
Merged

Revert "build(deps): bump uvicorn from 0.28.0 to 0.29.0"#1758
jesse-c merged 1 commit intomasterfrom
revert-1648-dependabot/pip/uvicorn-0.29.0

Conversation

@jesse-c
Copy link
Copy Markdown
Contributor

@jesse-c jesse-c commented May 13, 2024

Reverts #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

@jesse-c jesse-c self-assigned this May 13, 2024
@jesse-c jesse-c requested a review from mauicv May 13, 2024 13:30
@jesse-c jesse-c merged commit bcd8e7f into master May 13, 2024
@jesse-c jesse-c deleted the revert-1648-dependabot/pip/uvicorn-0.29.0 branch May 13, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants