pact-foundation / pact_broker

Enables your consumer driven contracts workflow
http://pactflow.io
MIT License
702 stars 174 forks source link

Allow increase in timeout for webhooks #639

Open DavidJFowler opened 11 months ago

DavidJFowler commented 11 months ago

Pre issue-raising checklist

I have already (please mark the applicable with an x):

Software versions

pact-broker docker version: pactfoundation/pact-broker:2.112.0-pactbroker2.107.1

Expected behaviour

It should be possible to specify the timeout for executing a webhook in order to give services time to warm up etc.

Actual behaviour

The timeout is fixed at 15 seconds. If the webhook takes longer than this time to return a value it can get triggered multiple times in error.

YOU54F commented 11 months ago

Hey @DavidJFowler

You are indeed correct at it being fixed at 15 seconds

https://github.com/pact-foundation/pact_broker/blob/2115a968c1fea4d0a70d693520515b5ab8cc579a/lib/pact_broker/domain/webhook_request.rb#L50

would you be interested in submitting a pull request for this feature req? There is already an opt disable_ssl_verification, which is taken from the pact configuration options, so that might give you a decent pattern to follow

DavidJFowler commented 11 months ago

would you be interested in submitting a pull request for this feature req?

@YOU54F Thanks for the reply and the hint. I'd love to submit a PR, but I'm a stranger to Ruby and I just don't have the time.

bethesque commented 11 months ago

Good easy hacktober issue for someone who knows ruby.