solidusio / solidus_stripe

πŸ’³ Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

Protect against concurrent duplicated webhooks #285

Closed waiting-for-dev closed 1 year ago

waiting-for-dev commented 1 year ago

Summary

By acquiring an update lock on the payment, we can ensure that only one concurrent excecution of the webhook handler will manipulate it. That will avoid duplicated log entries and obscure exceptions.

Closes #188

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

codecov[bot] commented 1 year ago

Codecov Report

Merging #285 (7bd100c) into master (b04dedd) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #285   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files          27       27           
  Lines         489      489           
=======================================
  Hits          487      487           
  Misses          2        2           
Impacted Files Coverage Ξ”
...olidus_stripe/webhook/payment_intent_subscriber.rb 100.00% <100.00%> (ΓΈ)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

waiting-for-dev commented 1 year ago

Sorry, replaced by #286