Skip to content

Commit

Permalink
fix(amplify-provider-awscloudformation): handle throttling
Browse files Browse the repository at this point in the history
Update stack event monitor to handle throttling errors when polling for
stack events
  • Loading branch information
yuth authored and attilah committed Mar 5, 2021
1 parent f680033 commit 8ceb271
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
64 changes: 32 additions & 32 deletions .circleci/config.yml
Expand Up @@ -1025,37 +1025,37 @@ jobs:
environment:
TEST_SUITE: src/__tests__/plugin.test.ts
CLI_REGION: ap-northeast-1
migration-node-function-amplify_e2e_tests:
schema-iterative-update-locking-amplify_e2e_tests:
working_directory: ~/repo
docker: *ref_0
resource_class: large
steps: *ref_3
environment:
TEST_SUITE: src/__tests__/migration/node.function.test.ts
TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts
CLI_REGION: ap-southeast-1
api_4-amplify_e2e_tests:
migration-node-function-amplify_e2e_tests:
working_directory: ~/repo
docker: *ref_0
resource_class: large
steps: *ref_3
environment:
TEST_SUITE: src/__tests__/api_4.test.ts
TEST_SUITE: src/__tests__/migration/node.function.test.ts
CLI_REGION: ap-southeast-2
schema-iterative-update-locking-amplify_e2e_tests:
function_5-amplify_e2e_tests:
working_directory: ~/repo
docker: *ref_0
resource_class: large
steps: *ref_3
environment:
TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts
TEST_SUITE: src/__tests__/function_5.test.ts
CLI_REGION: us-east-2
function_5-amplify_e2e_tests:
api_4-amplify_e2e_tests:
working_directory: ~/repo
docker: *ref_0
resource_class: large
steps: *ref_3
environment:
TEST_SUITE: src/__tests__/function_5.test.ts
TEST_SUITE: src/__tests__/api_4.test.ts
CLI_REGION: us-west-2
schema-iterative-update-4-amplify_e2e_tests_pkg_linux:
working_directory: ~/repo
Expand Down Expand Up @@ -1667,44 +1667,44 @@ jobs:
TEST_SUITE: src/__tests__/plugin.test.ts
CLI_REGION: ap-northeast-1
steps: *ref_4
migration-node-function-amplify_e2e_tests_pkg_linux:
schema-iterative-update-locking-amplify_e2e_tests_pkg_linux:
working_directory: ~/repo
docker: *ref_0
resource_class: large
environment:
AMPLIFY_DIR: /home/circleci/repo/out
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux
TEST_SUITE: src/__tests__/migration/node.function.test.ts
TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts
CLI_REGION: ap-southeast-1
steps: *ref_4
api_4-amplify_e2e_tests_pkg_linux:
migration-node-function-amplify_e2e_tests_pkg_linux:
working_directory: ~/repo
docker: *ref_0
resource_class: large
environment:
AMPLIFY_DIR: /home/circleci/repo/out
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux
TEST_SUITE: src/__tests__/api_4.test.ts
TEST_SUITE: src/__tests__/migration/node.function.test.ts
CLI_REGION: ap-southeast-2
steps: *ref_4
schema-iterative-update-locking-amplify_e2e_tests_pkg_linux:
function_5-amplify_e2e_tests_pkg_linux:
working_directory: ~/repo
docker: *ref_0
resource_class: large
environment:
AMPLIFY_DIR: /home/circleci/repo/out
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux
TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts
TEST_SUITE: src/__tests__/function_5.test.ts
CLI_REGION: us-east-2
steps: *ref_4
function_5-amplify_e2e_tests_pkg_linux:
api_4-amplify_e2e_tests_pkg_linux:
working_directory: ~/repo
docker: *ref_0
resource_class: large
environment:
AMPLIFY_DIR: /home/circleci/repo/out
AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux
TEST_SUITE: src/__tests__/function_5.test.ts
TEST_SUITE: src/__tests__/api_4.test.ts
CLI_REGION: us-west-2
steps: *ref_4
workflows:
Expand Down Expand Up @@ -1792,11 +1792,11 @@ workflows:
- hostingPROD-amplify_e2e_tests
- amplify-app-amplify_e2e_tests
- init-amplify_e2e_tests
- schema-iterative-update-locking-amplify_e2e_tests
- function_5-amplify_e2e_tests
- predictions-amplify_e2e_tests
- schema-predictions-amplify_e2e_tests
- amplify-configure-amplify_e2e_tests
- function_5-amplify_e2e_tests
- api_4-amplify_e2e_tests
- function_3-amplify_e2e_tests
- containers-api-amplify_e2e_tests
- interactions-amplify_e2e_tests
Expand All @@ -1812,22 +1812,22 @@ workflows:
- schema-key-amplify_e2e_tests
- analytics-amplify_e2e_tests
- notifications-amplify_e2e_tests
- migration-node-function-amplify_e2e_tests
- schema-iterative-update-locking-amplify_e2e_tests
- schema-auth-10-amplify_e2e_tests
- hosting-amplify_e2e_tests
- tags-amplify_e2e_tests
- api_4-amplify_e2e_tests
- migration-node-function-amplify_e2e_tests
- done_with_pkg_linux_e2e_tests:
context: amplify-cli-ecr
requires:
- hostingPROD-amplify_e2e_tests_pkg_linux
- amplify-app-amplify_e2e_tests_pkg_linux
- init-amplify_e2e_tests_pkg_linux
- schema-iterative-update-locking-amplify_e2e_tests_pkg_linux
- function_5-amplify_e2e_tests_pkg_linux
- predictions-amplify_e2e_tests_pkg_linux
- schema-predictions-amplify_e2e_tests_pkg_linux
- amplify-configure-amplify_e2e_tests_pkg_linux
- function_5-amplify_e2e_tests_pkg_linux
- api_4-amplify_e2e_tests_pkg_linux
- function_3-amplify_e2e_tests_pkg_linux
- containers-api-amplify_e2e_tests_pkg_linux
- interactions-amplify_e2e_tests_pkg_linux
Expand All @@ -1843,11 +1843,11 @@ workflows:
- schema-key-amplify_e2e_tests_pkg_linux
- analytics-amplify_e2e_tests_pkg_linux
- notifications-amplify_e2e_tests_pkg_linux
- migration-node-function-amplify_e2e_tests_pkg_linux
- schema-iterative-update-locking-amplify_e2e_tests_pkg_linux
- schema-auth-10-amplify_e2e_tests_pkg_linux
- hosting-amplify_e2e_tests_pkg_linux
- tags-amplify_e2e_tests_pkg_linux
- api_4-amplify_e2e_tests_pkg_linux
- migration-node-function-amplify_e2e_tests_pkg_linux
- amplify_migration_tests_latest:
context: amplify-cli-ecr
filters:
Expand Down Expand Up @@ -1978,7 +1978,7 @@ workflows:
filters: *ref_5
requires:
- schema-auth-7-amplify_e2e_tests
- schema-iterative-update-locking-amplify_e2e_tests:
- function_5-amplify_e2e_tests:
context: amplify-cli-ecr
filters: *ref_5
requires:
Expand Down Expand Up @@ -2028,7 +2028,7 @@ workflows:
filters: *ref_5
requires:
- auth_4-amplify_e2e_tests
- function_5-amplify_e2e_tests:
- api_4-amplify_e2e_tests:
context: amplify-cli-ecr
filters: *ref_5
requires:
Expand Down Expand Up @@ -2208,7 +2208,7 @@ workflows:
filters: *ref_5
requires:
- schema-searchable-amplify_e2e_tests
- migration-node-function-amplify_e2e_tests:
- schema-iterative-update-locking-amplify_e2e_tests:
context: amplify-cli-ecr
filters: *ref_5
requires:
Expand Down Expand Up @@ -2253,7 +2253,7 @@ workflows:
filters: *ref_5
requires:
- schema-auth-8-amplify_e2e_tests
- api_4-amplify_e2e_tests:
- migration-node-function-amplify_e2e_tests:
context: amplify-cli-ecr
filters: *ref_5
requires:
Expand Down Expand Up @@ -2310,7 +2310,7 @@ workflows:
filters: *ref_6
requires:
- schema-auth-7-amplify_e2e_tests_pkg_linux
- schema-iterative-update-locking-amplify_e2e_tests_pkg_linux:
- function_5-amplify_e2e_tests_pkg_linux:
context: amplify-cli-ecr
filters: *ref_6
requires:
Expand Down Expand Up @@ -2364,7 +2364,7 @@ workflows:
filters: *ref_6
requires:
- auth_4-amplify_e2e_tests_pkg_linux
- function_5-amplify_e2e_tests_pkg_linux:
- api_4-amplify_e2e_tests_pkg_linux:
context: amplify-cli-ecr
filters: *ref_6
requires:
Expand Down Expand Up @@ -2560,7 +2560,7 @@ workflows:
filters: *ref_6
requires:
- schema-searchable-amplify_e2e_tests_pkg_linux
- migration-node-function-amplify_e2e_tests_pkg_linux:
- schema-iterative-update-locking-amplify_e2e_tests_pkg_linux:
context: amplify-cli-ecr
filters: *ref_6
requires:
Expand Down Expand Up @@ -2609,7 +2609,7 @@ workflows:
filters: *ref_6
requires:
- schema-auth-8-amplify_e2e_tests_pkg_linux
- api_4-amplify_e2e_tests_pkg_linux:
- migration-node-function-amplify_e2e_tests_pkg_linux:
context: amplify-cli-ecr
filters: *ref_6
requires:
Expand Down
Expand Up @@ -139,7 +139,11 @@ export class StackEventMonitor {
if (e.code === 'ValidationError' && e.message === `Stack [${this.stackName}] does not exist`) {
return;
}
throw e;
if (e.code === 'Throttling') {
// ignore throttling error
} else {
throw e;
}
}

events.reverse();
Expand Down

0 comments on commit 8ceb271

Please sign in to comment.