🐛 Fix FastAPI People GitHub Action: set HTTPX timeout for GraphQL query request#5222
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5222 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 539 539
Lines 13902 13902
=========================================
Hits 13902 13902 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
📝 Docs preview for commit 5e5352f at: https://62e93f5124c2231a962ef181--fastapi.netlify.app |
|
Should I drive with an environment variable instead of hard-coding 30? |
|
📝 Docs preview for commit 76cbeb1 at: https://62e943bddc072d1e10747d7a--fastapi.netlify.app |
|
@tiangolo this might be trivial. Stumbled upon actions tab and found that this action is failing for last 2 months, and this might fix it. Also there might be a need to configure a env variable (optional, defaults to 30). |
Removed redundant exceptions Removed repeated constant strings NO BREAKING CHANGES
This reverts commit 07882a1.
# Conflicts: # fastapi/security/http.py
|
📝 Docs preview for commit 9487385 at: https://62f0e65fac35f861ecd93ca7--fastapi.netlify.app |
iudeen
left a comment
There was a problem hiding this comment.
Hope this is okay! :)
|
📝 Docs preview for commit c6735f8 at: https://62fdbbf2362b7b55454f112a--fastapi.netlify.app |
|
📝 Docs preview for commit 45cab92 at: https://62fec0c48802d000a68820fe--fastapi.netlify.app |
|
📝 Docs preview for commit feb10df at: https://6305e6e06d6fbc5a5e9b9fad--fastapi.netlify.app |
|
📝 Docs preview for commit 8e8fe07 at: https://6308a074cf308e78b9e75037--fastapi.netlify.app |
|
📝 Docs preview for commit 45c172b at: https://6308d96970db72283dcc5e59--fastapi.netlify.app |
|
📝 Docs preview for commit e75dff0 at: https://6308e5cdfd6621375f0653de--fastapi.netlify.app |
|
📝 Docs preview for commit 4d7bfbb at: https://6312e999e31c9631267850f8--fastapi.netlify.app |
|
📝 Docs preview for commit 1ab76a1 at: https://6312f04e7f1ade5a2d6d8224--fastapi.netlify.app |
|
@tiangolo is this something you will be interested in? If not, we can close :) |
|
📝 Docs preview for commit 39f5fbb at: https://63146c8b00ed394bc6d435d5--fastapi.netlify.app |
|
📝 Docs preview for commit 92a1eab at: https://6314bb0567c58a7ae2aa7ce3--fastapi.netlify.app |
|
Nice, thank you @iudeen! 🙇 I updated it to simplify the code a bit. Thanks for your contribution! 🍰 |
Fixes an error that occurred in scheduled actions of FastAPI People.
I have tested using my token, and it works as expected. Results here (too big to paste 🥲)
Reason for the fix:
Since the query results are too big,
httpxdefault timeout of 5 seconds is not enough, resulting inReadTimeoutexception.This PR adds a configurable default timeout and read timeout. Even if its not set as environment variable, the
httpx_read_time_outdefaults to 30 seconds andhttpx_default_time_outdefaults tohttpxdefault, which is 5 seconds.