The Ingest-Zip function will currently startup AWS infrastructure regardless of the contents or validity of an uploaded file ending in .zip This can lead to significant delay between when an invalid file is uploaded to when an error is displayed to the user.
This PR pre-parses the zip and calculated total entries before a CloudFormation call is initiated (the slowest part of the process) and does the following
Updates the total value before the stack is created
Skips CloudFormation creation if the total is 0
Unknowns
Should the IngestZip function set total = 0 & processingEnd = now() to handle it "gracefully"
Alternatively should the IngestZip function create a new BatchError
Context
The Ingest-Zip function will currently startup AWS infrastructure regardless of the contents or validity of an uploaded file ending in
.zip
This can lead to significant delay between when an invalid file is uploaded to when an error is displayed to the user.This PR pre-parses the zip and calculated total entries before a CloudFormation call is initiated (the slowest part of the process) and does the following
total
value before the stack is createdUnknowns
cc/ @nathanielrindlaub