Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merges main branch to extOverrides #8357

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d3896f0
chore(release): Publish [ci skip]
Sep 27, 2021
540f4a5
ci: improve parallelism, add windows for e2e tests (#8282)
johnpc Sep 27, 2021
bd74bfb
chore: add additional instance types to @searchable directive (#8284)
yuth Sep 27, 2021
7f04962
ci: support multi-account e2e cleanup (#8082)
johnpc Sep 28, 2021
93a28df
test: update pinpoint test region mapping (#8295)
edwardfoyle Sep 28, 2021
f1a8342
ci: improve parallelization (#8292)
johnpc Sep 28, 2021
07dce3e
test: fix cci pipeline flow (#8296)
edwardfoyle Sep 28, 2021
569c16c
test: remove aws cli win install step (#8299)
edwardfoyle Sep 28, 2021
1fc7a9a
fix: logic to display searchable instance warning (#8297)
josefaidt Sep 28, 2021
5c9e216
test: dont run geo e2e tests on windows (#8300)
edwardfoyle Sep 29, 2021
b122947
test: revert test timeout change (#8301)
edwardfoyle Sep 29, 2021
eaee9e5
Automatically retry CircleCi e2e tasks (#8306)
johnpc Sep 29, 2021
6e33684
test: fix gql e2e split test logic, remove unnecessary inter-job requ…
edwardfoyle Sep 29, 2021
67503f6
ci: remove retry wrapper on windows tests to prevent hanging (#8312)
johnpc Sep 30, 2021
5e0457c
ci: use powershell to run windows tests (#8314)
johnpc Sep 30, 2021
23bb7b5
ci: skip rate limited windows tests (#8319)
johnpc Sep 30, 2021
51e7242
chore(release): Publish [ci skip]
Oct 1, 2021
e410421
chore: add cloud-e2e script (#8334)
edwardfoyle Oct 1, 2021
ca20fd3
ci: add automatic retry of failed tasks (#8338)
johnpc Oct 1, 2021
b870948
test: update snapshot file to match renamed test file (#8333)
edwardfoyle Oct 1, 2021
a14383a
build: run circleci validator on split-e2e-tests (#8313)
johnpc Oct 2, 2021
42a32a9
ci: fix retry function (#8343)
edwardfoyle Oct 2, 2021
9781223
ci: track flaky tests in cloudwatch (#8339)
johnpc Oct 2, 2021
3168885
ci: fix cleanup script context (#8344)
edwardfoyle Oct 2, 2021
e3dc97c
feat: FF for override stacks (#8228)
akshbhu Sep 25, 2021
3c190b7
feat: root stack override (#8276)
akshbhu Sep 28, 2021
7166bbe
feat: adding rootstack types to overrides helper package (#8298)
akshbhu Sep 29, 2021
8f83207
feat: ddb overrides and flow refactor
kaustavghosh06 Oct 4, 2021
bc1c41f
fix: config.yml
akshbhu Oct 5, 2021
9b51139
fix: merge conflicts
akshbhu Oct 5, 2021
0f8e8d3
fix: version for overrides helper
akshbhu Oct 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
432 changes: 303 additions & 129 deletions .circleci/config.base.yml

Large diffs are not rendered by default.

17,494 changes: 15,065 additions & 2,429 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .circleci/exec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/bin/bash

exec "$@"
143 changes: 117 additions & 26 deletions .circleci/local_publish_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,142 @@ custom_registry_url=http://localhost:4873
default_verdaccio_package=verdaccio@5.1.2

function startLocalRegistry {
# Start local registry
tmp_registry_log=`mktemp`
echo "Registry output file: $tmp_registry_log"
(cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &)
# Wait for Verdaccio to boot
grep -q 'http address' <(tail -f $tmp_registry_log)
# Start local registry
tmp_registry_log=$(mktemp)
echo "Registry output file: $tmp_registry_log"
(cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &)
# Wait for Verdaccio to boot
grep -q 'http address' <(tail -f $tmp_registry_log)
}

function loginToLocalRegistry {
# Login so we can publish packages
(cd && npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r "$custom_registry_url")
# Login so we can publish packages
(cd && npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r "$custom_registry_url")
}

function unsetNpmRegistryUrl {
# Restore the original NPM and Yarn registry URLs
npm set registry "https://registry.npmjs.org/"
yarn config set registry "https://registry.npmjs.org/"
# Restore the original NPM and Yarn registry URLs
npm set registry "https://registry.npmjs.org/"
yarn config set registry "https://registry.npmjs.org/"
}

function unsetSudoNpmRegistryUrl {
# Restore the original NPM and Yarn registry URLs
sudo npm set registry "https://registry.npmjs.org/"
sudo yarn config set registry "https://registry.npmjs.org/"
# Restore the original NPM and Yarn registry URLs
sudo npm set registry "https://registry.npmjs.org/"
sudo yarn config set registry "https://registry.npmjs.org/"
}

function changeNpmGlobalPath {
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
}

function changeSudoNpmGlobalPath {
mkdir -p ~/.npm-global-sudo
npm config set prefix '~/.npm-global-sudo'
export PATH=~/.npm-global/bin:$PATH
mkdir -p ~/.npm-global-sudo
npm config set prefix '~/.npm-global-sudo'
export PATH=~/.npm-global/bin:$PATH
}

function setNpmRegistryUrlToLocal {
# Set registry to local registry
npm set registry "$custom_registry_url"
yarn config set registry "$custom_registry_url"
# Set registry to local registry
npm set registry "$custom_registry_url"
yarn config set registry "$custom_registry_url"
}

function setSudoNpmRegistryUrlToLocal {
# Set registry to local registry
sudo npm set registry "$custom_registry_url"
sudo yarn config set registry "$custom_registry_url"
# Set registry to local registry
sudo npm set registry "$custom_registry_url"
sudo yarn config set registry "$custom_registry_url"
}

function useChildAccountCredentials {
if [ -z "$USE_PARENT_ACCOUNT" ]; then
export AWS_PAGER=""
export ORGANIZATION_SIZE=$(aws organizations list-accounts | jq '.Accounts | length')
export CREDS=$(aws sts assume-role --role-arn arn:aws:iam::$(aws organizations list-accounts | jq -c -r ".Accounts [$(($RANDOM % $ORGANIZATION_SIZE))].Id"):role/OrganizationAccountAccessRole --role-session-name testSession$((1 + $RANDOM % 10000)) --duration-seconds 3600)
if [ -z $(echo $CREDS | jq -c -r '.AssumedRoleUser.Arn') ]; then
echo "Unable to assume child account role. Falling back to parent AWS account"
else
echo "Using account credentials for $(echo $CREDS | jq -c -r '.AssumedRoleUser.Arn')"
export AWS_ACCESS_KEY_ID=$(echo $CREDS | jq -c -r ".Credentials.AccessKeyId")
export AWS_SECRET_ACCESS_KEY=$(echo $CREDS | jq -c -r ".Credentials.SecretAccessKey")
export AWS_SESSION_TOKEN=$(echo $CREDS | jq -c -r ".Credentials.SessionToken")
fi
else
echo "Using parent account credentials."
fi
}

function retry {
MAX_ATTEMPTS=2
SLEEP_DURATION=5
n=0
until [ $n -ge $MAX_ATTEMPTS ]
do
echo "Attempting $@ with max retries $MAX_ATTEMPTS"
"$@" && break
n=$[$n+1]
echo "Attempt $n completed."
sleep $SLEEP_DURATION
done
if [ $n -ge $MAX_ATTEMPTS ]; then
echo "failed: ${@}" >&2
exit 1
fi

resetAwsAccountCredentials
aws cloudwatch put-metric-data --metric-name FlakyE2ETests --namespace amplify-cli-e2e-tests --unit Count --value $n --dimensions testFile=$TEST_SUITE
echo "Attempt $n succeeded."
}

function resetAwsAccountCredentials {
if [ -z "$AWS_ACCESS_KEY_ID_ORIG" ]; then
echo "AWS Access Key environment variable is already set"
else
export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_ORIG
fi
if [ -z "$AWS_SECRET_ACCESS_KEY_ORIG" ]; then
echo "AWS Secret Access Key environment variable is already set"
else
export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_ORIG
fi
if [ -z "$AWS_SESSION_TOKEN_ORIG" ]; then
echo "AWS Session Token environment variable is already set"
else
export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN_ORIG
fi
}

function setAwsAccountCredentials {
resetAwsAccountCredentials
export AWS_ACCESS_KEY_ID_ORIG=$AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY_ORIG=$AWS_SECRET_ACCESS_KEY
export AWS_SESSION_TOKEN_ORIG=$AWS_SESSION_TOKEN
if [[ "$OSTYPE" == "msys" ]]; then
# windows provided by circleci has this OSTYPE
useChildAccountCredentials
else
echo "OSTYPE is $OSTYPE"
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip >/dev/null
export PATH=$PATH:$(pwd)/aws/dist
useChildAccountCredentials
fi
}

function runE2eTest {
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
npm install -g @aws-amplify/cli
npm install -g amplify-app
amplify -v
amplify-app --version
setAwsAccountCredentials
cd $(pwd)/packages/amplify-e2e-tests
yarn run e2e --detectOpenHandles --maxWorkers=3 $TEST_SUITE
EXIT_CODE=$?
unsetNpmRegistryUrl
return $EXIT_CODE
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"test": "lerna run test",
"test-ci": "lerna run test --concurrency 1 -- --ci -i",
"e2e": "lerna run e2e",
"cloud-e2e": "CURR_BRANCH=$(git branch | awk '/\\*/{printf \"%s\", $2}') && UPSTREAM_BRANCH=run-e2e/$USER/$CURR_BRANCH && git push $(git remote -v | grep aws-amplify/amplify-cli | head -n1 | awk '{print $1;}') $CURR_BRANCH:$UPSTREAM_BRANCH --no-verify --force-with-lease && echo \"\n\n 🏃 E2E test are running at:\nhttps://app.circleci.com/pipelines/github/aws-amplify/amplify-cli?branch=$UPSTREAM_BRANCH\"",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --quiet",
"lint-fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
"clean": "lerna run clean && lerna exec yarn rimraf tsconfig.tsbuildinfo && lerna clean --yes && yarn rimraf node_modules",
"build": "lerna run build",
"build-tests": "lerna run build-tests",
"production-build": "yarn --frozen-lockfile && lerna run build --concurrency 3 --stream",
"dev-build": "yarn && lerna run build",
"production-build": "yarn --frozen-lockfile --cache-folder ~/.cache/yarn && lerna run build --concurrency 3 --stream",
"dev-build": "yarn --cache-folder ~/.cache/yarn && lerna run build",
"link-aa-dev": "cd packages/amplify-app && ln -s \"$(pwd)/bin/amplify-app\" \"$(yarn global bin)/amplify-app-dev\" && cd -",
"rm-aa-dev-link": "rm -f \"$(yarn global bin)/amplify-app-dev\"",
"link-dev": "cd packages/amplify-cli && ln -s \"$(pwd)/bin/amplify\" \"$(yarn global bin)/amplify-dev\" && cd -",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.0.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-app@3.0.12...amplify-app@3.0.13) (2021-09-27)

**Note:** Version bump only for package amplify-app





## [3.0.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-app@3.0.11...amplify-app@3.0.12) (2021-09-18)

**Note:** Version bump only for package amplify-app
Expand Down
6 changes: 3 additions & 3 deletions packages/amplify-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amplify-app",
"version": "3.0.12",
"version": "3.0.13",
"description": "Amplify CLI",
"repository": {
"type": "git",
Expand Down Expand Up @@ -30,8 +30,8 @@
"dependencies": {
"amplify-frontend-android": "2.15.4",
"amplify-frontend-flutter": "0.4.4",
"amplify-frontend-ios": "2.20.14",
"amplify-frontend-javascript": "2.24.1",
"amplify-frontend-ios": "2.20.15",
"amplify-frontend-javascript": "2.24.2",
"chalk": "^4.1.1",
"execa": "^5.1.1",
"fs-extra": "^8.1.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/amplify-category-analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.21.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-analytics@2.21.21...amplify-category-analytics@2.21.22) (2021-09-27)

**Note:** Version bump only for package amplify-category-analytics





## [2.21.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-analytics@2.21.20...amplify-category-analytics@2.21.21) (2021-09-18)

**Note:** Version bump only for package amplify-category-analytics
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-category-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amplify-category-analytics",
"version": "2.21.21",
"version": "2.21.22",
"description": "amplify-cli analytics plugin",
"repository": {
"type": "git",
Expand All @@ -15,7 +15,7 @@
"aws"
],
"dependencies": {
"amplify-cli-core": "1.29.0",
"amplify-cli-core": "1.30.0",
"fs-extra": "^8.1.0",
"inquirer": "^7.3.3",
"uuid": "^3.4.0"
Expand Down
21 changes: 21 additions & 0 deletions packages/amplify-category-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.32.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-api@2.31.23...amplify-category-api@2.32.0) (2021-09-27)


### Bug Fixes

* [#8223](https://github.com/aws-amplify/amplify-cli/issues/8223), conversion to typescript ([#8245](https://github.com/aws-amplify/amplify-cli/issues/8245)) ([096e6ca](https://github.com/aws-amplify/amplify-cli/commit/096e6ca19b94aa40ef249ea98d008380395afa16))


### Features

* Flag to allow schema changes that require table replacement ([#8144](https://github.com/aws-amplify/amplify-cli/issues/8144)) ([2d4e65a](https://github.com/aws-amplify/amplify-cli/commit/2d4e65acfd034d33c6fa8ac1f5f8582e7e3bc399))


### Reverts

* Revert "feat: Flag to allow schema changes that require table replacement (#8144)" (#8268) ([422dd04](https://github.com/aws-amplify/amplify-cli/commit/422dd04425c72aa7276e086d38ce4d5f4681f9f3)), closes [#8144](https://github.com/aws-amplify/amplify-cli/issues/8144) [#8268](https://github.com/aws-amplify/amplify-cli/issues/8268)





## [2.31.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-api@2.31.22...amplify-category-api@2.31.23) (2021-09-18)

**Note:** Version bump only for package amplify-category-api
Expand Down
8 changes: 4 additions & 4 deletions packages/amplify-category-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amplify-category-api",
"version": "2.31.23",
"version": "2.32.0",
"description": "amplify-cli api plugin",
"repository": {
"type": "git",
Expand Down Expand Up @@ -63,15 +63,15 @@
"@aws-cdk/region-info": "~1.124.0",
"@graphql-tools/merge": "^6.0.18",
"@octokit/rest": "^18.0.9",
"amplify-cli-core": "1.29.0",
"amplify-cli-core": "1.30.0",
"amplify-headless-interface": "1.10.0",
"amplify-util-headless-input": "1.5.4",
"chalk": "^4.1.1",
"constructs": "^3.3.125",
"fs-extra": "^8.1.0",
"graphql": "^14.5.8",
"graphql-relational-schema-transformer": "2.18.6",
"graphql-transformer-core": "6.29.7",
"graphql-relational-schema-transformer": "2.18.7",
"graphql-transformer-core": "6.30.0",
"inquirer": "^7.3.3",
"js-yaml": "^4.0.0",
"lodash": "^4.17.21",
Expand Down
12 changes: 12 additions & 0 deletions packages/amplify-category-auth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.38.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-auth@2.38.1...amplify-category-auth@2.38.2) (2021-09-27)


### Bug Fixes

* add missing await, fix import paths ([#8199](https://github.com/aws-amplify/amplify-cli/issues/8199)) ([51c4dd9](https://github.com/aws-amplify/amplify-cli/commit/51c4dd9c021d894fe2c06fc005e1e1960fe4529c))
* **amplify-category-auth:** update front end config on pull ([#8173](https://github.com/aws-amplify/amplify-cli/issues/8173)) ([da2b008](https://github.com/aws-amplify/amplify-cli/commit/da2b0083add2f5b10520efade8628080a34c8791))





## [2.38.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-auth@2.38.0...amplify-category-auth@2.38.1) (2021-09-20)


Expand Down
6 changes: 3 additions & 3 deletions packages/amplify-category-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amplify-category-auth",
"version": "2.38.1",
"version": "2.38.2",
"description": "amplify-cli authentication plugin",
"repository": {
"type": "git",
Expand All @@ -23,10 +23,10 @@
"test-watch": "jest --watch"
},
"dependencies": {
"amplify-cli-core": "1.29.0",
"amplify-cli-core": "1.30.0",
"amplify-headless-interface": "1.10.0",
"amplify-util-headless-input": "1.5.4",
"amplify-util-import": "1.5.12",
"amplify-util-import": "1.5.13",
"aws-cdk": "~1.124.0",
"aws-sdk": "^2.963.0",
"chalk": "^4.1.1",
Expand Down
16 changes: 16 additions & 0 deletions packages/amplify-category-function/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.35.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-function@2.34.7...amplify-category-function@2.35.0) (2021-09-27)


### Features

* Flag to allow schema changes that require table replacement ([#8144](https://github.com/aws-amplify/amplify-cli/issues/8144)) ([2d4e65a](https://github.com/aws-amplify/amplify-cli/commit/2d4e65acfd034d33c6fa8ac1f5f8582e7e3bc399))


### Reverts

* Revert "feat: Flag to allow schema changes that require table replacement (#8144)" (#8268) ([422dd04](https://github.com/aws-amplify/amplify-cli/commit/422dd04425c72aa7276e086d38ce4d5f4681f9f3)), closes [#8144](https://github.com/aws-amplify/amplify-cli/issues/8144) [#8268](https://github.com/aws-amplify/amplify-cli/issues/8268)





## [2.34.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-category-function@2.34.6...amplify-category-function@2.34.7) (2021-09-18)

**Note:** Version bump only for package amplify-category-function
Expand Down
6 changes: 3 additions & 3 deletions packages/amplify-category-function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amplify-category-function",
"version": "2.34.7",
"version": "2.35.0",
"description": "amplify-cli function plugin",
"repository": {
"type": "git",
Expand All @@ -22,7 +22,7 @@
"aws"
],
"dependencies": {
"amplify-cli-core": "1.29.0",
"amplify-cli-core": "1.30.0",
"amplify-function-plugin-interface": "1.9.1",
"archiver": "^5.3.0",
"aws-sdk": "^2.963.0",
Expand All @@ -32,7 +32,7 @@
"folder-hash": "^4.0.1",
"fs-extra": "^8.1.0",
"globby": "^11.0.3",
"graphql-transformer-core": "6.29.7",
"graphql-transformer-core": "6.30.0",
"inquirer": "^7.3.3",
"inquirer-datepicker": "^2.0.0",
"jstreemap": "^1.28.2",
Expand Down
Loading