Hey there, is any way to pool/ get a response that...
# pactflow
f
Hey there, is any way to pool/ get a response that says webhook finished executing after pactflow determines it needs to execute such a webhook?
the only reponse i get is after sometime getting the logs, getting a success:true for example
@Yousaf Nabi (pactflow.io)
y
the advised way would be polling the can-i-deploy endpoint for a verification result (success or failed) which is what the CLI does, if provided retry options. Alternatively there are webhook events you can register to be made aware of a verification success or failure of the provider job. the webhook just returns success if it got a success from the endpoint it calls (which triggers your provider job), it doesn’t know when the job has finished
(if the use case is triggering provider jobs)
f
Alternatively there are webhook events you can register to be made aware of a verification success or failure of the provider job.
which ones?
the use case is to wait for the webhook pipeline to finsih and a entry in matrix to exists
so we can then ask can-i-merge and can-i-deploy
especially the second one for test env
y
f
so how in a CI pipeline we could have that
y
you normally wouldn’t you would just use the cli, which polls the matrix endpoint [--retry-while-unknown=TIMES] # The number of times to retry while there is an unknown verification result (ie. the provider verification is likely still running) # Default: 0 [--retry-interval=SECONDS] # The time between retries in seconds. Use in conjuction with --retry-while-unknown # Default: 10
f
the same pipeline that triggered it
y
f
we already do that, but sometimes a problem occurs and it takes more time that that
wouldn't a proper pipeline pooling be better
GHA workflow
making it able to wait for 4/5 pipelines to finish
y
we already do that, but sometimes a problem occurs and it takes more time that that
would you not tweak the timeouts / retry values. You could have the job finish after publishing. Have a ci job which triggers off the back of a webhook for verification published, and runs can-i-deploy. Or add github verification status checks https://docs.pact.io/pact_broker/webhooks/template_library#github---publish-commit-status which will report back on the result. we support github and bitbucket commit status formats