finos / cla-bot

cla-bot is a GitHub bot for automation of Contributor Licence Agreements (CLAs).
https://finos.github.io/cla-bot/
Apache License 2.0
45 stars 27 forks source link

Allow configurable timeout for UrlVerifier request #183

Closed jcampbell closed 4 years ago

jcampbell commented 4 years ago

Currently, the configFileFromUrlVerifier method does not specify a timeout value for request. In cases where the response can be high latency (e.g. using an AWS lambda or Google Cloud Function to resolve the contributor list), I'm observing that the cla-bot doesn't update a PR.

It appears that allowing such a configuration option would be a very minor change and I would be happy to create a PR if you're amenable to it.

ColinEberhardt commented 4 years ago

That sounds like a useful change, and we'd be very happy for you to contribute!

jcampbell commented 4 years ago

As I investigated this further, it appears that the most common timeout is actually from the lambda method itself rather than from any http requests; I'm afraid it's therefore probably appropriate to close this issue.

FWIW, I've begun to replicate some of the cla-bot functionality in python with just a bit more flexibility around what the return from a UrlVerifier can be. I'm not sure that's relevant for others.

ColinEberhardt commented 4 years ago

Thanks for the feedback

As I investigated this further, it appears that the most common timeout is actually from the lambda method itself rather than from any http requests

Just FYI, that is configurable. I tend to leave it at ~10 secs to limit costs!

jcampbell commented 4 years ago

Thank you! In fact, we've been using your GitHub application deployment of cla-bot so far, which has been fantastic, until I wanted to switch to using the google sheets API to resolve the contributors list. Unfortunately, that's where things became too slow for the (very reasonably set!) lambda timeout on your hosted app. I've set a higher timeout on the version we're now hosting which seems to be working great!