pact-foundation / pact_broker

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

feat: implemented basic cache of 30 sec in can-i-merge badges #720

Closed pahnin closed 2 months ago

pahnin commented 2 months ago
mefellows commented 2 months ago

Thanks for doing this!

If this were on the can-i-merge API resource itself I’d say caching would be a bad idea, but given it’s on the badge resource I think we could even be a little more generous - perhaps 60s?

For example, if this was part of a CI/CD pipeline and the CLI was giving incorrect (in particular, a false positive) then that would be a problem.

I don’t expect people to be relying on this badge to unblock releases.

Would be interesting to test what impact it has in the dev environment if it helps the flicker, perhaps a small cache time is sufficient to solve that problem?