[Bug] Fix usage of transaction provider when calling sync Add on Dynamo DB outbox#3536
Conversation
There was a problem hiding this comment.
Gates Failed
Prevent hotspot decline
(1 hotspot with Code Duplication)
Enforce advisory code health rules
(1 file with Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| DynamoDbOutbox.cs | 1 rule in this hotspot | 7.12 → 6.91 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| DynamoDbOutbox.cs | 1 advisory rule | 7.12 → 6.91 | Suppress |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| ) | ||
| { | ||
| AddAsync(message, requestContext, outBoxTimeout).ConfigureAwait(ContinueOnCapturedContext).GetAwaiter().GetResult(); | ||
| AddAsync(message, requestContext, outBoxTimeout, transactionProvider).ConfigureAwait(ContinueOnCapturedContext).GetAwaiter().GetResult(); |
There was a problem hiding this comment.
❌ Getting worse: Code Duplication
introduced similar code in: Add
There was a problem hiding this comment.
Gates Failed
Prevent hotspot decline
(1 hotspot with Code Duplication)
Enforce advisory code health rules
(1 file with Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| DynamoDbOutbox.cs | 1 rule in this hotspot | 7.12 → 6.91 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| DynamoDbOutbox.cs | 1 advisory rule | 7.12 → 6.91 | Suppress |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
…outbox (BrighterCommand#3536) Co-authored-by: Ian Cooper <ian_hammond_cooper@yahoo.co.uk>
Currently, when the synchronous
Addmethod is called on the DynamoDb outbox, it fails to pass on any transaction provider, if supplied. That means that when one is supplied, the transaction isn't used and the item is added straight to the outbox table.This PR fixes this by passing on the transaction provider. It also updates the DynamoDb transaction provider to correctly set the
LastResponseproperty, as this isn't being set currently when calling the synchronousCommitmethod.