erp5_stripe: Use activity to store stripe session in ERP5
Creating Stripe Payment Session and HTTP Exchange in the same transaction can raise conflict errors and when it happens, we already created the session on the Stripe side. With this, when this happens, we receive one useless webhook to inform that the session has expired. Also, batch_mode was removed because we only use it in tests. The tests were updated to use like in production. This change will probably avoid the issue below: ``` ------ 2023-03-01 13:03:33,503 INFO Tracking queuing message: activity=SQLDict, object_path=/erp5/stripe_payment_session_module/20230301-1B990F0, method_id=immediateReindexObject, args=(), kw={}, activity_kw={'group_id': '', 'serialization_tag': '/erp5/stripe_payment_session_module/20230301-1B990F0', 'alternate_method_id': 'alternateReindexObject', 'group_method_id': 'portal_catalog/catalogObjectList'}, user_name=... ------ 2023-03-01 13:03:33,516 INFO Tracking queuing message: activity=SQLDict, object_path=/erp5/system_event_module/20230301-9DDE8DD8, method_id=immediateReindexObject, args=(), kw={}, activity_kw={'group_id': '', 'serialization_tag': '/erp5/system_event_module/20230301-9DDE8DD8', 'alternate_method_id': 'alternateReindexObject', 'group_method_id': 'portal_catalog/catalogObjectList'}, user_name=... ------ 2023-03-01 13:03:33,549 INFO ZPublisher.Conflict ReadConflictError at ......_startStripePaymentSession: database read conflict error (oid 0x06be91ef, serial this txn started with 0x03eec0ca6bdaf611 2023-03-01 10:50:25.278590, serial currently committed 0x03eec0d78f096a55 2023-03-01 11:03:33.524245) (12 conflicts (0 unresolved) since startup at Tue Jan 17 03:21:57 2023) ------ 2023-03-01 13:03:35,057 INFO Tracking queuing message: activity=SQLDict, object_path=/erp5/stripe_payment_session_module/20230301-1E233DB, method_id=immediateReindexObject, args=(), kw={}, activity_kw={'group_id': '', 'serialization_tag': '/erp5/stripe_payment_session_module/20230301-1E233DB', 'alternate_method_id': 'alternateReindexObject', 'group_method_id': 'portal_catalog/catalogObjectList'}, user_name=... ------ 2023-03-01 13:03:35,066 INFO Tracking queuing message: activity=SQLDict, object_path=/erp5/system_event_module/20230301-5C3B7E3, method_id=immediateReindexObject, args=(), kw={}, activity_kw={'group_id': '', 'serialization_tag': '/erp5/system_event_module/20230301-5C3B7E3', 'alternate_method_id': 'alternateReindexObject', 'group_method_id': 'portal_catalog/catalogObjectList'}, user_name=... ``` See merge request !1747
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
failed |
#568139
external
|
ERP5.CodingStyleTest-Master |
01:37:33
|
||||||
passed |
#568141
external
|
ERP5.PerformanceTest-Master |
00:26:58
|
||||||
failed |
#568136
external
|
ERP5.UnitTest-Master |
03:22:49
|
||||||
failed |
#568147
external
|
ERP5.UnitTest-Zope2 |
03:13:09
|
||||||
passed |
#568165
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:16:58
|
||||||
passed |
#568181
external
|
Wendelin.UnitTest-Master |
00:40:05
|
||||||
failed |
#568123
external
retried
|
ERP5.UnitTest-Zope2 |
|
||||||
failed |
#568124
external
retried
|
ERP5.UnitTest-Zope2 |
00:01:52
|
||||||
failed |
#568125
external
retried
|
ERP5.UnitTest-Zope2 |
00:02:40
|
||||||
canceled |
#568126
external
retried
|
ERP5.UnitTest-Zope2 |
00:54:02
|
||||||
failed |
#568131
external
retried
|
ERP5.UnitTest-Zope2 |
00:00:52
|
||||||
canceled |
#568132
external
retried
|
ERP5.UnitTest-Zope2 |
00:22:42
|
||||||
passed |
#568179
external
retried
|
Wendelin.UnitTest-Master |
|
||||||