-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve check for map with itembatcher
* fix: improve check for map with itembatcher * fix: add error code for item batcher errors --------- Co-authored-by: Torbjorn van Heeswijck <[email protected]>
- Loading branch information
Showing
5 changed files
with
107 additions
and
17 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/__tests__/definitions/invalid-map-item-batcher-dupe-subfields.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"Comment": "ItemBatcher can specify batchSize or path but not both", | ||
"StartAt": "Map", | ||
"States": { | ||
"Map": { | ||
"Type": "Map", | ||
"ItemBatcher": { | ||
"MaxItemsPerBatch": 2, | ||
"MaxItemsPerBatchPath": "$.batchByes", | ||
"MaxInputBytesPerBatch": 131072, | ||
"MaxInputBytesPerBatchPath": "$.batchByes" | ||
}, | ||
"ItemProcessor": { | ||
"ProcessorConfig": { | ||
"Mode": "DISTRIBUTED", | ||
"ExecutionType": "EXPRESS" | ||
}, | ||
"StartAt": "LambdaTask", | ||
"States": { | ||
"LambdaTask": { | ||
"Type": "Task", | ||
"Resource": "arn:aws:states:::lambda:invoke", | ||
"OutputPath": "$.Payload", | ||
"Parameters": { | ||
"Payload.$": "$", | ||
"FunctionName": "arn:aws:lambda:us-east-2:123456789012:function:processCSVData" | ||
}, | ||
"End": true | ||
} | ||
} | ||
}, | ||
"Label": "Map", | ||
"End": true | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/__tests__/definitions/valid-map-with-item-batcher.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"Comment": "ItemBatcher can specify batchSize or path but not both", | ||
"StartAt": "Map", | ||
"States": { | ||
"Map": { | ||
"Type": "Map", | ||
"ItemBatcher": { | ||
"MaxItemsPerBatch": 2, | ||
"MaxInputBytesPerBatch": 131072, | ||
"BatchInput": { | ||
"inputKey": "inputValue" | ||
} | ||
}, | ||
"ItemProcessor": { | ||
"ProcessorConfig": { | ||
"Mode": "DISTRIBUTED", | ||
"ExecutionType": "EXPRESS" | ||
}, | ||
"StartAt": "LambdaTask", | ||
"States": { | ||
"LambdaTask": { | ||
"Type": "Task", | ||
"Resource": "arn:aws:states:::lambda:invoke", | ||
"OutputPath": "$.Payload", | ||
"Parameters": { | ||
"Payload.$": "$", | ||
"FunctionName": "arn:aws:lambda:us-east-2:123456789012:function:processCSVData" | ||
}, | ||
"End": true | ||
} | ||
} | ||
}, | ||
"Label": "Map", | ||
"End": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters