-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CUMULUS-1242: Throttle priority executions (#985)
* refactor sf-starter lambda to use async handler & add stub functions for throttling priority executions * update sf-starter lambda unit tests * add reference to SemaphoresTable for sqs2sf lambda * add test to show that sf-starter increments priority semaphore * add DynamoDb.put() helper * export DynamoDb utility from common package * refactor sf-semaphore-down tests to use DynamoDb.put * add unit tests for sf-starter lambda * add more unit tests * fix thrown error message for failed increment semaphore operation * update localstack to 0.9.2 to fix SQS testing issues * update handling of SQS message visibilityTimeout and allow 0 as a valid value * update sf-starter unit test to check number of SQS messages remaining * add sf-starter test for handling messages of multiple priority levels * separate handlers for processing normal and priority messages from SQS & add unit tests for incrementAndDispatch() * fix variable reference * update handling of visibility timeout for receiveSQSMessages * fix webpack entry for sf-semaphore-down lambda * revert localstack to version 0.8.7 * re-factor sf-starter to improve testability * update unit tests * fix error handling for missing priority key * remove unnecessary DynamoDb.put() helper * fix eslint issues * fix Consumer unit tests * add function docs * add sqs2sfThrottle lambda to deployment * remove redundant logging * update CHANGELOG * Update CHANGELOG.md Co-Authored-By: laurenfrederick <lauren@element84.com> * Update packages/api/lambdas/sf-starter.js Co-Authored-By: Marc <yjpa7145@users.noreply.github.com> * Update packages/api/lambdas/sf-starter.js Co-Authored-By: Marc <yjpa7145@users.noreply.github.com> * refactor incrementAndDispatch * fix unit test * explicitly disallow 0 as a timeLimit for sqs2sf lambda * fix internals of incrementAndDispatch & update test to mock startExecution() instead of dispatch() * remove unused import
- Loading branch information
Showing
12 changed files
with
530 additions
and
66 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.