From 70f15aaf08b5821ae7ee3354e0fa0bd1829549f6 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Feb 2021 15:08:50 -0800 Subject: [PATCH 01/12] chore: upgrade aws-sdk to rc.9 --- packages/analytics/package.json | 10 +++++----- packages/core/package.json | 8 ++++---- packages/interactions/package.json | 2 +- packages/predictions/package.json | 14 +++++++------- packages/storage/package.json | 8 ++++---- .../storage/src/providers/axios-http-handler.ts | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/analytics/package.json b/packages/analytics/package.json index 747b6afcc09..c25b7212bb8 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -45,11 +45,11 @@ "dependencies": { "@aws-amplify/cache": "3.1.46", "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-firehose": "1.0.0-rc.4", - "@aws-sdk/client-kinesis": "1.0.0-rc.4", - "@aws-sdk/client-personalize-events": "1.0.0-rc.4", - "@aws-sdk/client-pinpoint": "1.0.0-rc.4", - "@aws-sdk/util-utf8-browser": "1.0.0-rc.3", + "@aws-sdk/client-firehose": "1.0.0-rc.9", + "@aws-sdk/client-kinesis": "1.0.0-rc.9", + "@aws-sdk/client-personalize-events": "1.0.0-rc.9", + "@aws-sdk/client-pinpoint": "1.0.0-rc.9", + "@aws-sdk/util-utf8-browser": "1.0.0-rc.8", "lodash": "^4.17.20", "uuid": "^3.2.1" }, diff --git a/packages/core/package.json b/packages/core/package.json index 40857a48e26..ec26ab74d3c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -55,10 +55,10 @@ }, "dependencies": { "@aws-crypto/sha256-js": "1.0.0-alpha.0", - "@aws-sdk/client-cognito-identity": "1.0.0-rc.4", - "@aws-sdk/credential-provider-cognito-identity": "1.0.0-rc.4", - "@aws-sdk/types": "1.0.0-rc.3", - "@aws-sdk/util-hex-encoding": "1.0.0-rc.3", + "@aws-sdk/client-cognito-identity": "1.0.0-rc.9", + "@aws-sdk/credential-provider-cognito-identity": "1.0.0-rc.9", + "@aws-sdk/types": "1.0.0-rc.8", + "@aws-sdk/util-hex-encoding": "1.0.0-rc.8", "universal-cookie": "^4.0.4", "zen-observable-ts": "0.8.19" }, diff --git a/packages/interactions/package.json b/packages/interactions/package.json index f377c1bc017..7f6d10b0a60 100644 --- a/packages/interactions/package.json +++ b/packages/interactions/package.json @@ -42,7 +42,7 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-lex-runtime-service": "1.0.0-rc.4" + "@aws-sdk/client-lex-runtime-service": "1.0.0-rc.9" }, "jest": { "globals": { diff --git a/packages/predictions/package.json b/packages/predictions/package.json index 1992b51bc24..dab839668d6 100644 --- a/packages/predictions/package.json +++ b/packages/predictions/package.json @@ -42,13 +42,13 @@ "dependencies": { "@aws-amplify/core": "3.8.13", "@aws-amplify/storage": "3.3.21", - "@aws-sdk/client-comprehend": "1.0.0-rc.4", - "@aws-sdk/client-polly": "1.0.0-rc.4", - "@aws-sdk/client-rekognition": "1.0.0-rc.4", - "@aws-sdk/client-textract": "1.0.0-rc.4", - "@aws-sdk/client-translate": "1.0.0-rc.4", - "@aws-sdk/eventstream-marshaller": "1.0.0-rc.3", - "@aws-sdk/util-utf8-node": "1.0.0-rc.3", + "@aws-sdk/client-comprehend": "1.0.0-rc.9", + "@aws-sdk/client-polly": "1.0.0-rc.9", + "@aws-sdk/client-rekognition": "1.0.0-rc.9", + "@aws-sdk/client-textract": "1.0.0-rc.9", + "@aws-sdk/client-translate": "1.0.0-rc.9", + "@aws-sdk/eventstream-marshaller": "1.0.0-rc.8", + "@aws-sdk/util-utf8-node": "1.0.0-rc.8", "uuid": "^3.2.1" }, "jest": { diff --git a/packages/storage/package.json b/packages/storage/package.json index 23f843130e3..3c9dfcbd721 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -42,10 +42,10 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-s3": "1.0.0-rc.4", - "@aws-sdk/s3-request-presigner": "1.0.0-rc.4", - "@aws-sdk/util-create-request": "1.0.0-rc.4", - "@aws-sdk/util-format-url": "1.0.0-rc.4", + "@aws-sdk/client-s3": "1.0.0-rc.9", + "@aws-sdk/s3-request-presigner": "1.0.0-rc.9", + "@aws-sdk/util-create-request": "1.0.0-rc.8", + "@aws-sdk/util-format-url": "1.0.0-rc.8", "axios": "0.21.1", "events": "^3.1.0", "sinon": "^7.5.0" diff --git a/packages/storage/src/providers/axios-http-handler.ts b/packages/storage/src/providers/axios-http-handler.ts index 592e94c0a3d..feebb586261 100644 --- a/packages/storage/src/providers/axios-http-handler.ts +++ b/packages/storage/src/providers/axios-http-handler.ts @@ -16,14 +16,14 @@ import { HttpHandler, HttpRequest, HttpResponse } from '@aws-sdk/protocol-http'; import { buildQueryString } from '@aws-sdk/querystring-builder'; import axios, { AxiosRequestConfig, Method } from 'axios'; import { ConsoleLogger as Logger } from '@aws-amplify/core'; -import { BrowserHttpOptions } from '@aws-sdk/fetch-http-handler'; +import { FetchHttpHandlerOptions } from '@aws-sdk/fetch-http-handler'; const logger = new Logger('axios-http-handler'); export const SEND_PROGRESS_EVENT = 'sendProgress'; export class AxiosHttpHandler implements HttpHandler { constructor( - private readonly httpOptions: BrowserHttpOptions = {}, + private readonly httpOptions: FetchHttpHandlerOptions = {}, private readonly emitter?: any ) {} From 2f4150c4feeaec8328f6263cae4b2b00b7cb11f5 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Feb 2021 15:09:24 -0800 Subject: [PATCH 02/12] integ testing --- .circleci/config.yml | 67 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33b63a48422..7f39b49c7be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -701,6 +701,7 @@ releasable_branches: &releasable_branches - ui-components/main - 1.0-stable - native + - aws-sdk-rc9-upgrade test_browsers: &test_browsers browser: [chrome, firefox] @@ -877,36 +878,36 @@ workflows: matrix: parameters: <<: *datastore_auth_scenarios - - deploy: - filters: - <<: *releasable_branches - requires: - - unit_test - - integ_react_predictions - - integ_react_datastore - - integ_react_storage - # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # - integ_react_storage_multipart_progress - - integ_react_storage_ui - - integ_react_interactions - - integ_angular_interactions - - integ_vue_interactions - - integ_amazon_cognito_identity_js - - integ_react_auth - - integ_angular_auth - - integ_vue_auth - - integ_rn_ios_storage - # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # - integ_rn_ios_storage_multipart_progress - - integ_rn_ios_push_notifications - - integ_rn_android_storage - # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # - integ_rn_android_storage_multipart_progress - - integ_datastore_auth - - post_release: - filters: - branches: - only: - - release - requires: - - deploy + # - deploy: + # filters: + # <<: *releasable_branches + # requires: + # - unit_test + # - integ_react_predictions + # - integ_react_datastore + # - integ_react_storage + # # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 + # # - integ_react_storage_multipart_progress + # - integ_react_storage_ui + # - integ_react_interactions + # - integ_angular_interactions + # - integ_vue_interactions + # - integ_amazon_cognito_identity_js + # - integ_react_auth + # - integ_angular_auth + # - integ_vue_auth + # - integ_rn_ios_storage + # # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 + # # - integ_rn_ios_storage_multipart_progress + # - integ_rn_ios_push_notifications + # - integ_rn_android_storage + # # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 + # # - integ_rn_android_storage_multipart_progress + # - integ_datastore_auth + # - post_release: + # filters: + # branches: + # only: + # - release + # requires: + # - deploy From d9d6c457d193548e63b207c0a8f2119afc3eb39f Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Feb 2021 15:30:59 -0800 Subject: [PATCH 03/12] chore: update aws-sdk to rc.10 --- packages/analytics/package.json | 8 ++++---- packages/core/package.json | 6 +++--- packages/interactions/package.json | 2 +- packages/predictions/package.json | 12 ++++++------ packages/storage/package.json | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/analytics/package.json b/packages/analytics/package.json index c25b7212bb8..9d353dc0dc9 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -45,10 +45,10 @@ "dependencies": { "@aws-amplify/cache": "3.1.46", "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-firehose": "1.0.0-rc.9", - "@aws-sdk/client-kinesis": "1.0.0-rc.9", - "@aws-sdk/client-personalize-events": "1.0.0-rc.9", - "@aws-sdk/client-pinpoint": "1.0.0-rc.9", + "@aws-sdk/client-firehose": "1.0.0-rc.10", + "@aws-sdk/client-kinesis": "1.0.0-rc.10", + "@aws-sdk/client-personalize-events": "1.0.0-rc.10", + "@aws-sdk/client-pinpoint": "1.0.0-rc.10", "@aws-sdk/util-utf8-browser": "1.0.0-rc.8", "lodash": "^4.17.20", "uuid": "^3.2.1" diff --git a/packages/core/package.json b/packages/core/package.json index ec26ab74d3c..d951a3b9f47 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -55,9 +55,9 @@ }, "dependencies": { "@aws-crypto/sha256-js": "1.0.0-alpha.0", - "@aws-sdk/client-cognito-identity": "1.0.0-rc.9", - "@aws-sdk/credential-provider-cognito-identity": "1.0.0-rc.9", - "@aws-sdk/types": "1.0.0-rc.8", + "@aws-sdk/client-cognito-identity": "1.0.0-rc.10", + "@aws-sdk/credential-provider-cognito-identity": "1.0.0-rc.10", + "@aws-sdk/types": "1.0.0-rc.10", "@aws-sdk/util-hex-encoding": "1.0.0-rc.8", "universal-cookie": "^4.0.4", "zen-observable-ts": "0.8.19" diff --git a/packages/interactions/package.json b/packages/interactions/package.json index 7f6d10b0a60..aeb2a258d0f 100644 --- a/packages/interactions/package.json +++ b/packages/interactions/package.json @@ -42,7 +42,7 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-lex-runtime-service": "1.0.0-rc.9" + "@aws-sdk/client-lex-runtime-service": "1.0.0-rc.10" }, "jest": { "globals": { diff --git a/packages/predictions/package.json b/packages/predictions/package.json index dab839668d6..6ca04712e78 100644 --- a/packages/predictions/package.json +++ b/packages/predictions/package.json @@ -42,12 +42,12 @@ "dependencies": { "@aws-amplify/core": "3.8.13", "@aws-amplify/storage": "3.3.21", - "@aws-sdk/client-comprehend": "1.0.0-rc.9", - "@aws-sdk/client-polly": "1.0.0-rc.9", - "@aws-sdk/client-rekognition": "1.0.0-rc.9", - "@aws-sdk/client-textract": "1.0.0-rc.9", - "@aws-sdk/client-translate": "1.0.0-rc.9", - "@aws-sdk/eventstream-marshaller": "1.0.0-rc.8", + "@aws-sdk/client-comprehend": "1.0.0-rc.10", + "@aws-sdk/client-polly": "1.0.0-rc.10", + "@aws-sdk/client-rekognition": "1.0.0-rc.10", + "@aws-sdk/client-textract": "1.0.0-rc.10", + "@aws-sdk/client-translate": "1.0.0-rc.10", + "@aws-sdk/eventstream-marshaller": "1.0.0-rc.10", "@aws-sdk/util-utf8-node": "1.0.0-rc.8", "uuid": "^3.2.1" }, diff --git a/packages/storage/package.json b/packages/storage/package.json index 3c9dfcbd721..5d60650cd4a 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -42,10 +42,10 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-s3": "1.0.0-rc.9", - "@aws-sdk/s3-request-presigner": "1.0.0-rc.9", - "@aws-sdk/util-create-request": "1.0.0-rc.8", - "@aws-sdk/util-format-url": "1.0.0-rc.8", + "@aws-sdk/client-s3": "1.0.0-rc.10", + "@aws-sdk/s3-request-presigner": "1.0.0-rc.10", + "@aws-sdk/util-create-request": "1.0.0-rc.10", + "@aws-sdk/util-format-url": "1.0.0-rc.10", "axios": "0.21.1", "events": "^3.1.0", "sinon": "^7.5.0" From 86db32a8248616b9e1f07804ffc62ec82ce0dbd2 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Feb 2021 15:51:57 -0800 Subject: [PATCH 04/12] chore: bump aws-sdk to 3.1.0 --- packages/analytics/package.json | 10 +++++----- packages/core/package.json | 8 ++++---- packages/interactions/package.json | 2 +- packages/predictions/package.json | 14 +++++++------- packages/storage/package.json | 8 ++++---- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/analytics/package.json b/packages/analytics/package.json index 9d353dc0dc9..782e814fae5 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -45,11 +45,11 @@ "dependencies": { "@aws-amplify/cache": "3.1.46", "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-firehose": "1.0.0-rc.10", - "@aws-sdk/client-kinesis": "1.0.0-rc.10", - "@aws-sdk/client-personalize-events": "1.0.0-rc.10", - "@aws-sdk/client-pinpoint": "1.0.0-rc.10", - "@aws-sdk/util-utf8-browser": "1.0.0-rc.8", + "@aws-sdk/client-firehose": "3.1.0", + "@aws-sdk/client-kinesis": "3.1.0", + "@aws-sdk/client-personalize-events": "3.1.0", + "@aws-sdk/client-pinpoint": "3.1.0", + "@aws-sdk/util-utf8-browser": "3.1.0", "lodash": "^4.17.20", "uuid": "^3.2.1" }, diff --git a/packages/core/package.json b/packages/core/package.json index d951a3b9f47..8c7a6c8236f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -55,10 +55,10 @@ }, "dependencies": { "@aws-crypto/sha256-js": "1.0.0-alpha.0", - "@aws-sdk/client-cognito-identity": "1.0.0-rc.10", - "@aws-sdk/credential-provider-cognito-identity": "1.0.0-rc.10", - "@aws-sdk/types": "1.0.0-rc.10", - "@aws-sdk/util-hex-encoding": "1.0.0-rc.8", + "@aws-sdk/client-cognito-identity": "3.1.0", + "@aws-sdk/credential-provider-cognito-identity": "3.1.0", + "@aws-sdk/types": "3.1.0", + "@aws-sdk/util-hex-encoding": "3.1.0", "universal-cookie": "^4.0.4", "zen-observable-ts": "0.8.19" }, diff --git a/packages/interactions/package.json b/packages/interactions/package.json index aeb2a258d0f..d1603959a9f 100644 --- a/packages/interactions/package.json +++ b/packages/interactions/package.json @@ -42,7 +42,7 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-lex-runtime-service": "1.0.0-rc.10" + "@aws-sdk/client-lex-runtime-service": "3.1.0" }, "jest": { "globals": { diff --git a/packages/predictions/package.json b/packages/predictions/package.json index 6ca04712e78..1d0adf5150a 100644 --- a/packages/predictions/package.json +++ b/packages/predictions/package.json @@ -42,13 +42,13 @@ "dependencies": { "@aws-amplify/core": "3.8.13", "@aws-amplify/storage": "3.3.21", - "@aws-sdk/client-comprehend": "1.0.0-rc.10", - "@aws-sdk/client-polly": "1.0.0-rc.10", - "@aws-sdk/client-rekognition": "1.0.0-rc.10", - "@aws-sdk/client-textract": "1.0.0-rc.10", - "@aws-sdk/client-translate": "1.0.0-rc.10", - "@aws-sdk/eventstream-marshaller": "1.0.0-rc.10", - "@aws-sdk/util-utf8-node": "1.0.0-rc.8", + "@aws-sdk/client-comprehend": "3.1.0", + "@aws-sdk/client-polly": "3.1.0", + "@aws-sdk/client-rekognition": "3.1.0", + "@aws-sdk/client-textract": "3.1.0", + "@aws-sdk/client-translate": "3.1.0", + "@aws-sdk/eventstream-marshaller": "3.1.0", + "@aws-sdk/util-utf8-node": "3.1.0", "uuid": "^3.2.1" }, "jest": { diff --git a/packages/storage/package.json b/packages/storage/package.json index 5d60650cd4a..54eef11c15d 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -42,10 +42,10 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-s3": "1.0.0-rc.10", - "@aws-sdk/s3-request-presigner": "1.0.0-rc.10", - "@aws-sdk/util-create-request": "1.0.0-rc.10", - "@aws-sdk/util-format-url": "1.0.0-rc.10", + "@aws-sdk/client-s3": "3.1.0", + "@aws-sdk/s3-request-presigner": "3.1.0", + "@aws-sdk/util-create-request": "3.1.0", + "@aws-sdk/util-format-url": "3.1.0", "axios": "0.21.1", "events": "^3.1.0", "sinon": "^7.5.0" From 5df61126fbe9bc6677e2d9ed6f9b05b3dc79f95a Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Feb 2021 16:17:18 -0800 Subject: [PATCH 05/12] upgrade to aws-sdk 3.4.0 --- packages/analytics/package.json | 10 +++++----- .../analytics/src/Providers/AWSPinpointProvider.ts | 2 +- packages/core/package.json | 8 ++++---- packages/interactions/package.json | 2 +- packages/predictions/package.json | 14 +++++++------- packages/storage/package.json | 8 ++++---- .../src/providers/AWSS3ProviderManagedUpload.ts | 2 -- 7 files changed, 22 insertions(+), 24 deletions(-) diff --git a/packages/analytics/package.json b/packages/analytics/package.json index 782e814fae5..076bde856a6 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -45,11 +45,11 @@ "dependencies": { "@aws-amplify/cache": "3.1.46", "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-firehose": "3.1.0", - "@aws-sdk/client-kinesis": "3.1.0", - "@aws-sdk/client-personalize-events": "3.1.0", - "@aws-sdk/client-pinpoint": "3.1.0", - "@aws-sdk/util-utf8-browser": "3.1.0", + "@aws-sdk/client-firehose": "3.4.0", + "@aws-sdk/client-kinesis": "3.4.0", + "@aws-sdk/client-personalize-events": "3.4.0", + "@aws-sdk/client-pinpoint": "3.4.0", + "@aws-sdk/util-utf8-browser": "3.4.0", "lodash": "^4.17.20", "uuid": "^3.2.1" }, diff --git a/packages/analytics/src/Providers/AWSPinpointProvider.ts b/packages/analytics/src/Providers/AWSPinpointProvider.ts index cd4a2682049..29b4c95ecd1 100644 --- a/packages/analytics/src/Providers/AWSPinpointProvider.ts +++ b/packages/analytics/src/Providers/AWSPinpointProvider.ts @@ -21,12 +21,12 @@ import { getAmplifyUserAgent, } from '@aws-amplify/core'; import { + EventsBatch, PinpointClient, PutEventsCommand, PutEventsCommandInput, UpdateEndpointCommand, } from '@aws-sdk/client-pinpoint'; -import { EventsBatch } from '@aws-sdk/client-pinpoint/models'; import Cache from '@aws-amplify/cache'; import { diff --git a/packages/core/package.json b/packages/core/package.json index 8c7a6c8236f..8ef2e831af5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -55,10 +55,10 @@ }, "dependencies": { "@aws-crypto/sha256-js": "1.0.0-alpha.0", - "@aws-sdk/client-cognito-identity": "3.1.0", - "@aws-sdk/credential-provider-cognito-identity": "3.1.0", - "@aws-sdk/types": "3.1.0", - "@aws-sdk/util-hex-encoding": "3.1.0", + "@aws-sdk/client-cognito-identity": "3.4.0", + "@aws-sdk/credential-provider-cognito-identity": "3.4.0", + "@aws-sdk/types": "3.4.0", + "@aws-sdk/util-hex-encoding": "3.4.0", "universal-cookie": "^4.0.4", "zen-observable-ts": "0.8.19" }, diff --git a/packages/interactions/package.json b/packages/interactions/package.json index d1603959a9f..68f89874709 100644 --- a/packages/interactions/package.json +++ b/packages/interactions/package.json @@ -42,7 +42,7 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-lex-runtime-service": "3.1.0" + "@aws-sdk/client-lex-runtime-service": "3.4.0" }, "jest": { "globals": { diff --git a/packages/predictions/package.json b/packages/predictions/package.json index 1d0adf5150a..4f0da180238 100644 --- a/packages/predictions/package.json +++ b/packages/predictions/package.json @@ -42,13 +42,13 @@ "dependencies": { "@aws-amplify/core": "3.8.13", "@aws-amplify/storage": "3.3.21", - "@aws-sdk/client-comprehend": "3.1.0", - "@aws-sdk/client-polly": "3.1.0", - "@aws-sdk/client-rekognition": "3.1.0", - "@aws-sdk/client-textract": "3.1.0", - "@aws-sdk/client-translate": "3.1.0", - "@aws-sdk/eventstream-marshaller": "3.1.0", - "@aws-sdk/util-utf8-node": "3.1.0", + "@aws-sdk/client-comprehend": "3.4.0", + "@aws-sdk/client-polly": "3.4.0", + "@aws-sdk/client-rekognition": "3.4.0", + "@aws-sdk/client-textract": "3.4.0", + "@aws-sdk/client-translate": "3.4.0", + "@aws-sdk/eventstream-marshaller": "3.4.0", + "@aws-sdk/util-utf8-node": "3.4.0", "uuid": "^3.2.1" }, "jest": { diff --git a/packages/storage/package.json b/packages/storage/package.json index 54eef11c15d..4fe38fbfc84 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -42,10 +42,10 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-s3": "3.1.0", - "@aws-sdk/s3-request-presigner": "3.1.0", - "@aws-sdk/util-create-request": "3.1.0", - "@aws-sdk/util-format-url": "3.1.0", + "@aws-sdk/client-s3": "3.4.0", + "@aws-sdk/s3-request-presigner": "3.4.0", + "@aws-sdk/util-create-request": "3.4.0", + "@aws-sdk/util-format-url": "3.4.0", "axios": "0.21.1", "events": "^3.1.0", "sinon": "^7.5.0" diff --git a/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts b/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts index 59176fe59c6..4aea64c97e0 100644 --- a/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts +++ b/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts @@ -31,7 +31,6 @@ import { } from '@aws-sdk/client-s3'; import { AxiosHttpHandler, SEND_PROGRESS_EVENT } from './axios-http-handler'; import * as events from 'events'; -import { parseUrl } from '@aws-sdk/url-parser-node'; import { streamCollector } from '@aws-sdk/fetch-http-handler'; const logger = new Logger('AWSS3ProviderManagedUpload'); @@ -350,7 +349,6 @@ export class AWSS3ProviderManagedUpload { ...localTestingConfig, requestHandler: new AxiosHttpHandler({}, emitter), customUserAgent: getAmplifyUserAgent(), - urlParser: parseUrl, }); client.middlewareStack.remove(SET_CONTENT_LENGTH_HEADER); return client; From 9cbf6b933cccfb71d67e3b250559919c41f452e3 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 11:21:02 -0800 Subject: [PATCH 06/12] bump to 3.4.1 --- packages/analytics/package.json | 10 +++++----- packages/core/package.json | 8 ++++---- packages/interactions/package.json | 2 +- packages/predictions/package.json | 14 +++++++------- packages/storage/package.json | 8 ++++---- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/analytics/package.json b/packages/analytics/package.json index 076bde856a6..c3eab6c1aea 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -45,11 +45,11 @@ "dependencies": { "@aws-amplify/cache": "3.1.46", "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-firehose": "3.4.0", - "@aws-sdk/client-kinesis": "3.4.0", - "@aws-sdk/client-personalize-events": "3.4.0", - "@aws-sdk/client-pinpoint": "3.4.0", - "@aws-sdk/util-utf8-browser": "3.4.0", + "@aws-sdk/client-firehose": "3.4.1", + "@aws-sdk/client-kinesis": "3.4.1", + "@aws-sdk/client-personalize-events": "3.4.1", + "@aws-sdk/client-pinpoint": "3.4.1", + "@aws-sdk/util-utf8-browser": "3.4.1", "lodash": "^4.17.20", "uuid": "^3.2.1" }, diff --git a/packages/core/package.json b/packages/core/package.json index 8ef2e831af5..c66a9fcbb87 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -55,10 +55,10 @@ }, "dependencies": { "@aws-crypto/sha256-js": "1.0.0-alpha.0", - "@aws-sdk/client-cognito-identity": "3.4.0", - "@aws-sdk/credential-provider-cognito-identity": "3.4.0", - "@aws-sdk/types": "3.4.0", - "@aws-sdk/util-hex-encoding": "3.4.0", + "@aws-sdk/client-cognito-identity": "3.4.1", + "@aws-sdk/credential-provider-cognito-identity": "3.4.1", + "@aws-sdk/types": "3.4.1", + "@aws-sdk/util-hex-encoding": "3.4.1", "universal-cookie": "^4.0.4", "zen-observable-ts": "0.8.19" }, diff --git a/packages/interactions/package.json b/packages/interactions/package.json index 68f89874709..7df10d4c1e9 100644 --- a/packages/interactions/package.json +++ b/packages/interactions/package.json @@ -42,7 +42,7 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-lex-runtime-service": "3.4.0" + "@aws-sdk/client-lex-runtime-service": "3.4.1" }, "jest": { "globals": { diff --git a/packages/predictions/package.json b/packages/predictions/package.json index 4f0da180238..321d5b791f3 100644 --- a/packages/predictions/package.json +++ b/packages/predictions/package.json @@ -42,13 +42,13 @@ "dependencies": { "@aws-amplify/core": "3.8.13", "@aws-amplify/storage": "3.3.21", - "@aws-sdk/client-comprehend": "3.4.0", - "@aws-sdk/client-polly": "3.4.0", - "@aws-sdk/client-rekognition": "3.4.0", - "@aws-sdk/client-textract": "3.4.0", - "@aws-sdk/client-translate": "3.4.0", - "@aws-sdk/eventstream-marshaller": "3.4.0", - "@aws-sdk/util-utf8-node": "3.4.0", + "@aws-sdk/client-comprehend": "3.4.1", + "@aws-sdk/client-polly": "3.4.1", + "@aws-sdk/client-rekognition": "3.4.1", + "@aws-sdk/client-textract": "3.4.1", + "@aws-sdk/client-translate": "3.4.1", + "@aws-sdk/eventstream-marshaller": "3.4.1", + "@aws-sdk/util-utf8-node": "3.4.1", "uuid": "^3.2.1" }, "jest": { diff --git a/packages/storage/package.json b/packages/storage/package.json index 4fe38fbfc84..b2da39e2e99 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -42,10 +42,10 @@ "homepage": "https://aws-amplify.github.io/", "dependencies": { "@aws-amplify/core": "3.8.13", - "@aws-sdk/client-s3": "3.4.0", - "@aws-sdk/s3-request-presigner": "3.4.0", - "@aws-sdk/util-create-request": "3.4.0", - "@aws-sdk/util-format-url": "3.4.0", + "@aws-sdk/client-s3": "3.4.1", + "@aws-sdk/s3-request-presigner": "3.4.1", + "@aws-sdk/util-create-request": "3.4.1", + "@aws-sdk/util-format-url": "3.4.1", "axios": "0.21.1", "events": "^3.1.0", "sinon": "^7.5.0" From 6e44f5ab2979c2f03ebedf82b74ded7c0d0f72e6 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 11:30:27 -0800 Subject: [PATCH 07/12] add middleware --- .../src/providers/AWSS3ProviderManagedUpload.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts b/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts index 4aea64c97e0..2d801ef93e3 100644 --- a/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts +++ b/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts @@ -139,6 +139,19 @@ export class AWSS3ProviderManagedUpload { this.params ); const s3 = await this._createNewS3Client(this.opts); + + s3.middlewareStack.add( + next => (args: any) => { + if (this.params.ContentType && args.request && args.request.headers) { + args.request.headers['Content-Type'] = this.params.ContentType; + } + return next(args); + }, + { + step: 'build', + } + ); + const response = await s3.send(createMultiPartUploadCommand); logger.debug(response.UploadId); return response.UploadId; From 0d645fa18250686b4c72441961807696224d1b95 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 11:33:12 -0800 Subject: [PATCH 08/12] temp --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c6c8b72dfd..d4fba8de3ea 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "publish:1.0-stable": "lerna publish --conventional-commits --yes --dist-tag=stable-1.0 --message 'chore(release): Publish [ci skip]'", "publish:ui-components/main": "lerna publish --canary --force-publish \"*\" --yes --dist-tag=ui-preview --preid=ui-preview --exact", "publish:native": "lerna publish --canary --force-publish \"*\" --yes --dist-tag=native --preid=native --exact", - "publish:verdaccio": "lerna publish --no-push --canary minor --dist-tag=unstable --preid=unstable --exact --force-publish --yes" + "publish:verdaccio": "lerna publish --no-push --canary minor --dist-tag=verdaccio --preid=verdaccio --exact --force-publish --yes" }, "husky": { "hooks": { From ddf1f6d2fe33ff9e8fee9d25d13141c0367a12fc Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 11:51:37 -0800 Subject: [PATCH 09/12] add middleware --- package.json | 2 +- .../src/providers/AWSS3ProviderManagedUpload.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d4fba8de3ea..5c6c8b72dfd 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "publish:1.0-stable": "lerna publish --conventional-commits --yes --dist-tag=stable-1.0 --message 'chore(release): Publish [ci skip]'", "publish:ui-components/main": "lerna publish --canary --force-publish \"*\" --yes --dist-tag=ui-preview --preid=ui-preview --exact", "publish:native": "lerna publish --canary --force-publish \"*\" --yes --dist-tag=native --preid=native --exact", - "publish:verdaccio": "lerna publish --no-push --canary minor --dist-tag=verdaccio --preid=verdaccio --exact --force-publish --yes" + "publish:verdaccio": "lerna publish --no-push --canary minor --dist-tag=unstable --preid=unstable --exact --force-publish --yes" }, "husky": { "hooks": { diff --git a/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts b/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts index 2d801ef93e3..018d2de5036 100644 --- a/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts +++ b/packages/storage/src/providers/AWSS3ProviderManagedUpload.ts @@ -140,9 +140,17 @@ export class AWSS3ProviderManagedUpload { ); const s3 = await this._createNewS3Client(this.opts); + // @aws-sdk/client-s3 seems to be ignoring the `ContentType` parameter, so we + // are explicitly adding it via middleware. + // https://github.com/aws/aws-sdk-js-v3/issues/2000 s3.middlewareStack.add( next => (args: any) => { - if (this.params.ContentType && args.request && args.request.headers) { + if ( + this.params.ContentType && + args && + args.request && + args.request.headers + ) { args.request.headers['Content-Type'] = this.params.ContentType; } return next(args); From 2a155a647160dcc2fce42a4baccf81611ef3c859 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 12:32:02 -0800 Subject: [PATCH 10/12] remove CCI testing --- .circleci/config.yml | 67 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f39b49c7be..33b63a48422 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -701,7 +701,6 @@ releasable_branches: &releasable_branches - ui-components/main - 1.0-stable - native - - aws-sdk-rc9-upgrade test_browsers: &test_browsers browser: [chrome, firefox] @@ -878,36 +877,36 @@ workflows: matrix: parameters: <<: *datastore_auth_scenarios - # - deploy: - # filters: - # <<: *releasable_branches - # requires: - # - unit_test - # - integ_react_predictions - # - integ_react_datastore - # - integ_react_storage - # # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # # - integ_react_storage_multipart_progress - # - integ_react_storage_ui - # - integ_react_interactions - # - integ_angular_interactions - # - integ_vue_interactions - # - integ_amazon_cognito_identity_js - # - integ_react_auth - # - integ_angular_auth - # - integ_vue_auth - # - integ_rn_ios_storage - # # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # # - integ_rn_ios_storage_multipart_progress - # - integ_rn_ios_push_notifications - # - integ_rn_android_storage - # # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # # - integ_rn_android_storage_multipart_progress - # - integ_datastore_auth - # - post_release: - # filters: - # branches: - # only: - # - release - # requires: - # - deploy + - deploy: + filters: + <<: *releasable_branches + requires: + - unit_test + - integ_react_predictions + - integ_react_datastore + - integ_react_storage + # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 + # - integ_react_storage_multipart_progress + - integ_react_storage_ui + - integ_react_interactions + - integ_angular_interactions + - integ_vue_interactions + - integ_amazon_cognito_identity_js + - integ_react_auth + - integ_angular_auth + - integ_vue_auth + - integ_rn_ios_storage + # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 + # - integ_rn_ios_storage_multipart_progress + - integ_rn_ios_push_notifications + - integ_rn_android_storage + # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 + # - integ_rn_android_storage_multipart_progress + - integ_datastore_auth + - post_release: + filters: + branches: + only: + - release + requires: + - deploy From c4b4caf3f40a4eb56ae8de5aec8140524a6048f1 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 12:35:13 -0800 Subject: [PATCH 11/12] update bundle sizes --- .github/actions/bundle-size-action/webpack/package.json | 8 ++++---- .github/actions/bundle-size-action/webpack4/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/bundle-size-action/webpack/package.json b/.github/actions/bundle-size-action/webpack/package.json index 485aa245ad8..ff593366b50 100644 --- a/.github/actions/bundle-size-action/webpack/package.json +++ b/.github/actions/bundle-size-action/webpack/package.json @@ -31,11 +31,11 @@ }, { "path": "dist/Amplify+Auth.js.min.js", - "maxSize": "70kB" + "maxSize": "75kB" }, { "path": "dist/Amplify+Auth+Storage.js.min.js", - "maxSize": "110kB" + "maxSize": "115kB" }, { "path": "dist/Amplify+Storage.js.min.js", @@ -43,11 +43,11 @@ }, { "path": "dist/withSSRContext.js.min.js", - "maxSize": "140kB" + "maxSize": "145kB" }, { "path": "dist/withSSRContext+Storage.js.min.js", - "maxSize": "175kB" + "maxSize": "180kB" } ] }, diff --git a/.github/actions/bundle-size-action/webpack4/package.json b/.github/actions/bundle-size-action/webpack4/package.json index 779d595bcae..28cac33a403 100644 --- a/.github/actions/bundle-size-action/webpack4/package.json +++ b/.github/actions/bundle-size-action/webpack4/package.json @@ -27,7 +27,7 @@ }, { "path": "dist/Amplify+Auth.js.min.js", - "maxSize": "200kB" + "maxSize": "215kB" } ] }, From abe342e899a998c74f584990f8e785d69b3f2bd0 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Wed, 10 Feb 2021 13:24:18 -0800 Subject: [PATCH 12/12] require multi-part integ tests for deploy --- .circleci/config.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33b63a48422..2e138a68f2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -885,8 +885,7 @@ workflows: - integ_react_predictions - integ_react_datastore - integ_react_storage - # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # - integ_react_storage_multipart_progress + - integ_react_storage_multipart_progress - integ_react_storage_ui - integ_react_interactions - integ_angular_interactions @@ -896,12 +895,10 @@ workflows: - integ_angular_auth - integ_vue_auth - integ_rn_ios_storage - # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # - integ_rn_ios_storage_multipart_progress + - integ_rn_ios_storage_multipart_progress - integ_rn_ios_push_notifications - integ_rn_android_storage - # Removing this until AWS SDK issue is resolved: https://github.com/aws/aws-sdk-js-v3/issues/2000 - # - integ_rn_android_storage_multipart_progress + - integ_rn_android_storage_multipart_progress - integ_datastore_auth - post_release: filters: