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(lava_callback.py): Fix crash of lava_callback.py #871

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

nuclearcat
Copy link
Member

Stacktrace observed in production:
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kernelci/src/lava_callback.py", line 280, in callback
data = await request.json()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 251, in json
body = await self.body()
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 244, in body
async for chunk in self.stream():
File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 238, in stream
raise ClientDisconnect()
starlette.requests.ClientDisconnect

This should fix it and return error properly.

Stacktrace observed in production:
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kernelci/src/lava_callback.py", line 280, in callback
    data = await request.json()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 251, in json
    body = await self.body()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 244, in body
    async for chunk in self.stream():
  File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 238, in stream
    raise ClientDisconnect()
starlette.requests.ClientDisconnect

This should fix it and return error properly.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
@nuclearcat
Copy link
Member Author

Tested on staging

@nuclearcat nuclearcat added this pull request to the merge queue Nov 7, 2024
Merged via the queue into kernelci:main with commit 582e677 Nov 7, 2024
3 checks passed
@nuclearcat nuclearcat deleted the fix-crash branch November 7, 2024 10:00
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.

1 participant