Skip to content
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

fix: log error when runnable instantiation fails #3388

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

sauyon
Copy link
Contributor

@sauyon sauyon commented Jan 4, 2023

This works around an issue where Starlette handles exceptions in startup, hiding the actual issue from the user.

In production mode, this will double print the exception, but that doesn't seem like a particularly important problem, since this is an exception and the application fails to start anyway.

We should probably do a little more digging on the implementation of the ASGI lifespan protocol, but for now this should do.

@sauyon sauyon requested a review from a team as a code owner January 4, 2023 00:27
@sauyon sauyon requested review from ssheng and removed request for a team January 4, 2023 00:27
@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Merging #3388 (6a5b9ab) into main (96337f4) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3388      +/-   ##
==========================================
- Coverage   33.28%   33.26%   -0.02%     
==========================================
  Files         132      132              
  Lines       10654    10660       +6     
  Branches     1781     1781              
==========================================
  Hits         3546     3546              
- Misses       6868     6874       +6     
  Partials      240      240              
Impacted Files Coverage Δ
src/bentoml/_internal/runner/runner.py 57.02% <0.00%> (-2.98%) ⬇️

@aarnphm aarnphm merged commit c00bbb8 into bentoml:main Jan 4, 2023
@aarnphm aarnphm deleted the log-error branch January 4, 2023 04:28
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