CCM-12392: Allocation idempotency#574
Conversation
dfbf624 to
e1cfaab
Compare
54ba53d to
2a6c9b6
Compare
7a90a03 to
d938b0a
Compare
47a2ce5 to
40b7347
Compare
| expect(status).toBe("REJECTED"); | ||
| }); | ||
|
|
||
| test("Verify that supplier allocations are correctly updated for a volume group", async () => { |
There was a problem hiding this comment.
Can you please update this reflect allocation happens only once for multiple copies of same request
40b7347 to
35d8a5e
Compare
stevebux
left a comment
There was a problem hiding this comment.
Looks good to me, a few suggested changes
|
|
||
| export default function createSupplierAllocatorHandler(deps: Deps): SQSHandler { | ||
| return async (event: SQSEvent) => { | ||
| const getSupplierIdempotently = ( |
There was a problem hiding this comment.
I got a little confused by the naming here - this function is creating another function that gets the supplier idempotently, rather than doing it directly. Maybe call it createGetSupplierIdempotently and rename boundGetSupplierIdempotently below to just getSupplierIdempotently?
| const perAllocationFailure: AllocationMetrics = new Map(); | ||
| const volumeGroupAllocations: VolumeGroupAllocation = new Map(); | ||
|
|
||
| // create an idempotent function bound to this handler's batchItemFailures |
There was a problem hiding this comment.
This comment mentions batchItemFailures, but they're not bound to the function being created
7486aec to
d08117d
Compare
|



Description
Context
Type of changes
Checklist
DT3-Specific Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.