Issue 10746

Title
Missing timeout for external requests
Priority
bug
Status
resolved
Nosy list
ced, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2021-09-13.12:03:36 by ced, last changed 2 months ago by roundup-bot.

Messages

New changeset f9e3ab0d2ecf by Cédric Krier in branch 'default':
Add timeout configuration for requests
https://hg.tryton.org/tryton-env/rev/f9e3ab0d2ecf
New changeset 43e64de93efb by Cédric Krier in branch 'default':
Add timeout configuration for requests
https://hg.tryton.org/modules/stock_package_shipping_ups/rev/43e64de93efb
New changeset 1efc9a3e76a5 by Cédric Krier in branch 'default':
Add timeout configuration for requests
https://hg.tryton.org/modules/stock_package_shipping_sendcloud/rev/1efc9a3e76a5
New changeset a3c82d74e3b9 by Cédric Krier in branch 'default':
Add timeout configuration for requests
https://hg.tryton.org/modules/stock_package_shipping_dpd/rev/a3c82d74e3b9
New changeset 5bda04a14511 by Cédric Krier in branch 'default':
Add timeout configuration for requests
https://hg.tryton.org/modules/account_fr_chorus/rev/5bda04a14511
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-09-13.12:03:36

Many modules use the requests module to perform external HTTP requests. But they are all missing a timeout as suggested by the documentation.
So if the external service is not responding, the transaction could last for ever.
I propose to add configuration settings to each module named requests_timeout with a default value of 300. I think it is a pretty good default setting for most of the operations.
There are two exceptions for which I do not think we need to set such timeout configuration, it is the stripe and braintree library which already has their own default timeout setup by the provider. So I think we can rely on them to be good default and not need to be customized (which could still be with code).

History
Date User Action Args
2021-09-23 10:06:49roundup-botsetmessages: + msg70293
2021-09-23 10:06:46roundup-botsetmessages: + msg70292
2021-09-23 10:06:42roundup-botsetmessages: + msg70291
2021-09-23 10:06:39roundup-botsetmessages: + msg70290
2021-09-23 10:06:36roundup-botsetmessages: + msg70289
nosy: + roundup-bot
status: testing -> resolved
2021-09-13 12:20:23reviewbotsetmessages: + msg70047
nosy: + reviewbot
2021-09-13 12:04:39cedsetkeyword: + review
reviews: 371891002
status: in-progress -> testing
2021-09-13 12:03:36cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)