Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
9ef9636
chore: bump memory size
aws-eddy Apr 12, 2023
3a3c25b
chore: testing heap size
aws-eddy Apr 12, 2023
ac53f8b
Update test.yml
aws-eddy Apr 12, 2023
3092c52
Update test.yml
aws-eddy Apr 12, 2023
f0533bd
adding mock_e2e to pr_workflow
aws-eddy Apr 12, 2023
48a9394
Update pr_workflow.yml
aws-eddy Apr 12, 2023
cabd20c
chore: adding retry options
aws-eddy Apr 12, 2023
6e6e1c1
chore: adding cleanup resources job
aws-eddy Apr 12, 2023
f9723fa
fix: file name is incorrect
aws-eddy Apr 12, 2023
10e1984
chore: test retry mechanism
aws-eddy Apr 12, 2023
3b5ca8b
chore: bump up memory size for mock_e2e
aws-eddy Apr 12, 2023
529454a
making debuggable
aws-eddy Apr 12, 2023
6f98ad7
Create build_image.yml
aws-eddy Apr 12, 2023
d39f134
Update build_image.yml
aws-eddy Apr 12, 2023
3441e79
Update build_image.yml
aws-eddy Apr 12, 2023
2896015
Update test.yml
aws-eddy Apr 13, 2023
879a487
Update pr_workflow.yml
aws-eddy Apr 13, 2023
6714d4e
Update pr_workflow.yml
aws-eddy Apr 13, 2023
c1a8f2f
Update pr_workflow.yml
aws-eddy Apr 13, 2023
a21b604
chore: remove retries
aws-eddy Apr 13, 2023
1269af4
chore: retry test-ci twice
aws-eddy Apr 13, 2023
e22955d
chore: adding ability to collect coverage
aws-eddy Apr 13, 2023
5489827
chore: running multiple times
aws-eddy Apr 13, 2023
b2741eb
chore: revert compute-type
aws-eddy Apr 12, 2023
c7044c8
chore: remove coverage
aws-eddy Apr 13, 2023
f4f2fda
chore: retry unit tests
aws-eddy Apr 13, 2023
03b03a5
Update build_image.yml
aws-eddy Apr 14, 2023
a8777a4
Update build_image.yml
aws-eddy Apr 14, 2023
6701936
Update test.yml
aws-eddy Apr 14, 2023
679eb34
chore: fixing cleanup-resources
aws-eddy Apr 14, 2023
5ed97ad
chore: remove a problematic line
aws-eddy Apr 14, 2023
b2a8076
chore: try to run unit test twice back to back
aws-eddy Apr 14, 2023
d9116cd
chore: adding debugger to mockE2e tests
aws-eddy Apr 14, 2023
00b34cb
chore: add breakpoint
aws-eddy Apr 14, 2023
f3dfb4b
Update pr_workflow.yml
aws-eddy Apr 15, 2023
de5c301
Update pr_workflow.yml
aws-eddy Apr 15, 2023
2be85af
chore: break up test due to memory issues
aws-eddy Apr 18, 2023
32815de
removing logging
aws-eddy Apr 18, 2023
63c62cb
chore:try again
aws-eddy Apr 18, 2023
4a9b807
chore: exposing garbage collector
aws-eddy Apr 18, 2023
d141f40
reduce number of parallel workers
aws-eddy Apr 18, 2023
07006b2
chore: reduce alloted memory size
aws-eddy Apr 18, 2023
94e8750
testing mock_e2e
aws-eddy Apr 18, 2023
7075da5
chore: try single test
aws-eddy Apr 18, 2023
0a41ed5
chore: try single test
aws-eddy Apr 18, 2023
f0f984f
chore: testing cleanup resources
aws-eddy Apr 18, 2023
d6b474a
reduce parallelicity
aws-eddy Apr 18, 2023
5ade223
Update e2e_workflow.yml
aws-eddy Apr 18, 2023
1eb3cc5
Update e2e_workflow.yml
aws-eddy Apr 18, 2023
0e3ff33
Update e2e_workflow.yml
aws-eddy Apr 18, 2023
b19a60b
Update e2e_workflow.yml
aws-eddy Apr 18, 2023
e4013ed
Update e2e_workflow.yml
aws-eddy Apr 18, 2023
ed48d95
chore: making changes
aws-eddy Apr 18, 2023
b0b823e
chore: publish PR workflow changes
aws-eddy Apr 18, 2023
3adfaf0
chore: PR Workflows
aws-eddy Apr 18, 2023
e4139f4
chore: add more memory to lint
aws-eddy Apr 18, 2023
80ce910
chore: add unit tests
aws-eddy Apr 18, 2023
b3601b9
chore: get lint to pass
aws-eddy Apr 18, 2023
4f5b1c5
chore: test e2e integration tests
aws-eddy Apr 19, 2023
f8cd10c
chore: clean
aws-eddy Apr 19, 2023
96ab27d
chore: fix error
aws-eddy Apr 19, 2023
c84f672
fix binaries problem
aws-eddy Apr 19, 2023
6f465d3
chore: trigger builds
aws-eddy Apr 19, 2023
8df2cef
chore: change name
aws-eddy Apr 19, 2023
074aa47
chore: add dependency on build_linux
aws-eddy Apr 19, 2023
04545bc
Update shared-scripts.sh
aws-eddy Apr 19, 2023
8525247
Update shared-scripts.sh
aws-eddy Apr 19, 2023
c049c18
Update integration_test.yml
aws-eddy Apr 19, 2023
47f5709
Update shared-scripts.sh
aws-eddy Apr 19, 2023
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
2 changes: 1 addition & 1 deletion .circleci/local_publish_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function setAwsAccountCredentials {
export AWS_SECRET_ACCESS_KEY_ORIG=$AWS_SECRET_ACCESS_KEY
export AWS_SESSION_TOKEN_ORIG=$AWS_SESSION_TOKEN
# introduce a delay of up to 1 minute to allow for more even spread aws list-accounts calls due to throttling
sleep $[ ( $RANDOM % 60 ) + 1 ]s
# sleep $ ( $RANDOM % 60 ) + 1 ]s
if [[ "$OSTYPE" == "msys" ]]; then
# windows provided by circleci has this OSTYPE
useChildAccountCredentials
Expand Down
26 changes: 26 additions & 0 deletions codebuild_specs/build_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
build:
commands:
- export BRANCH_TAG=${CODEBUILD_WEBHOOK_TRIGGER#branch/codebuild-image/*}
- export IMAGE_TAG=latest
- echo $IMAGE_TAG
- echo $PKG_BINARY_CACHE_BUCKET_NAME
- mkdir pkg-cache
- aws s3 sync s3://$PKG_BINARY_CACHE_BUCKET_NAME pkg-cache
- /bin/bash ./rename_to_fetched.sh
- ls pkg-cache/*
- echo Build started on `date`
- echo Building the Docker image...
- echo $CODEBUILD_SRC_DIR
- docker build --tag $IMAGE_REPO_NAME:$IMAGE_TAG .
- docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image...
- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
4 changes: 3 additions & 1 deletion codebuild_specs/cleanup_resources.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
version: 0.2
env:
shell: bash
variables:
NODE_OPTIONS: --max-old-space-size=5120
phases:
build:
commands:
- echo cleanup running
- source ./shared-scripts.sh && _cleanupResources
81 changes: 49 additions & 32 deletions codebuild_specs/e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ batch:
buildspec: codebuild_specs/build_linux.yml
env:
compute-type: BUILD_GENERAL1_LARGE
- identifier: build_windows
buildspec: codebuild_specs/build_windows.yml
env:
type: WINDOWS_SERVER_2019_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
image: aws/codebuild/windows-base:2019-2.0
- identifier: test
buildspec: codebuild_specs/test.yml
- identifier: cleanup_resources
buildspec: codebuild_specs/cleanup_resources.yml
depend-on:
- build_linux
- identifier: integration_test
buildspec: codebuild_specs/integration_test.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
Expand All @@ -36,8 +34,22 @@ batch:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: publish_to_local_registry
buildspec: codebuild_specs/publish_to_local_registry.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: test
buildspec: codebuild_specs/test.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: validate_cdk_version
buildspec: codebuild_specs/validate_cdk_version.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: verify_api_extract
Expand All @@ -50,12 +62,20 @@ batch:
buildspec: codebuild_specs/verify_yarn_lock.yml
depend-on:
- build_linux
- identifier: publish_to_local_registry
buildspec: codebuild_specs/publish_to_local_registry.yml

- identifier: build_windows
buildspec: codebuild_specs/build_windows.yml
env:
type: WINDOWS_SERVER_2019_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
image: aws/codebuild/windows-base:2019-2.0
- identifier: build_pkg_binaries_macos
buildspec: codebuild_specs/build_pkg_binaries_macos.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- publish_to_local_registry

- identifier: build_pkg_binaries_arm
buildspec: codebuild_specs/build_pkg_binaries_arm.yml
env:
Expand All @@ -68,18 +88,15 @@ batch:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- publish_to_local_registry
- identifier: build_pkg_binaries_macos
buildspec: codebuild_specs/build_pkg_binaries_macos.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- publish_to_local_registry
- identifier: build_pkg_binaries_win
buildspec: codebuild_specs/build_pkg_binaries_win.yml
env:
type: WINDOWS_SERVER_2019_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
image: aws/codebuild/windows-base:2019-2.0
depend-on:
- publish_to_local_registry

- identifier: upload_pkg_binaries
buildspec: codebuild_specs/upload_pkg_binaries.yml
env:
Expand All @@ -89,22 +106,22 @@ batch:
- build_pkg_binaries_linux
- build_pkg_binaries_macos
- build_pkg_binaries_win

- identifier: verify_versions_match
buildspec: codebuild_specs/verify_versions_match.yml
depend-on:
- publish_to_local_registry
- identifier: run_e2e_tests_linux
buildspec: codebuild_specs/run_e2e_tests_linux.yml
env:
compute-type: BUILD_GENERAL1_LARGE
debug-session: true
depend-on:
- upload_pkg_binaries
- identifier: run_e2e_tests_windows
buildspec: codebuild_specs/run_e2e_tests_windows.yml
env:
type: WINDOWS_SERVER_2019_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
image: aws/codebuild/windows-base:2019-2.0
depend-on:
- upload_pkg_binaries
# - identifier: run_e2e_tests_linux
# buildspec: codebuild_specs/run_e2e_tests_linux.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - upload_pkg_binaries
# - identifier: run_e2e_tests_windows
# buildspec: codebuild_specs/run_e2e_tests_windows.yml
# env:
# type: WINDOWS_SERVER_2019_CONTAINER
# compute-type: BUILD_GENERAL1_LARGE
# image: aws/codebuild/windows-base:2019-2.0
# depend-on:
# - upload_pkg_binaries
2 changes: 1 addition & 1 deletion codebuild_specs/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ env:
phases:
build:
commands:
- echo integration testing
- source ./circleci && ./shared-scripts.sh && _integrationTests
2 changes: 2 additions & 0 deletions codebuild_specs/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: 0.2
env:
shell: bash
variables:
NODE_OPTIONS: --max-old-space-size=5121
phases:
build:
commands:
Expand Down
3 changes: 2 additions & 1 deletion codebuild_specs/mock_e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ env:
shell: bash
variables:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
NODE_OPTIONS: --max-old-space-size=14000
NODE_OPTIONS: --max-old-space-size=5120
phases:
build:
commands:
- codebuild-breakpoint
- source ./shared-scripts.sh && _mockE2ETests
120 changes: 65 additions & 55 deletions codebuild_specs/pr_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,64 +18,74 @@ batch:
buildspec: codebuild_specs/build_linux.yml
env:
compute-type: BUILD_GENERAL1_LARGE
- identifier: lint
buildspec: codebuild_specs/lint.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: mock_e2e_tests
buildspec: codebuild_specs/mock_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
debug-session: true
depend-on:
- build_linux
- identifier: test
buildspec: codebuild_specs/test.yml
env:
compute-type: BUILD_GENERAL1_LARGE
debug-session: true
depend-on:
- build_linux
# - identifier: mock_e2e_tests
# buildspec: codebuild_specs/mock_e2e_tests.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - build_linux
# - identifier: validate_cdk_version
# buildspec: codebuild_specs/validate_cdk_version.yml
# depend-on:
# - build_linux
# - identifier: verify_api_extract
# buildspec: codebuild_specs/verify_api_extract.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - build_linux
# - identifier: verify_yarn_lock
# buildspec: codebuild_specs/verify_yarn_lock.yml
# depend-on:
# - build_linux
# - identifier: publish_to_local_registry
# buildspec: codebuild_specs/publish_to_local_registry.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - build_linux
# - identifier: build_pkg_binaries_arm
# buildspec: codebuild_specs/build_pkg_binaries_arm.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - publish_to_local_registry
# - identifier: build_pkg_binaries_linux
# buildspec: codebuild_specs/build_pkg_binaries_linux.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - publish_to_local_registry
# - identifier: build_pkg_binaries_macos
# buildspec: codebuild_specs/build_pkg_binaries_macos.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - publish_to_local_registry
# - identifier: build_pkg_binaries_win
# buildspec: codebuild_specs/build_pkg_binaries_win.yml
# env:
# compute-type: BUILD_GENERAL1_LARGE
# depend-on:
# - publish_to_local_registry
# - identifier: verify_versions_match
# buildspec: codebuild_specs/verify_versions_match.yml
# depend-on:
# - publish_to_local_registry
- identifier: publish_to_local_registry
buildspec: codebuild_specs/publish_to_local_registry.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: validate_cdk_version
buildspec: codebuild_specs/validate_cdk_version.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: verify_api_extract
buildspec: codebuild_specs/verify_api_extract.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: verify_yarn_lock
buildspec: codebuild_specs/verify_yarn_lock.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: build_pkg_binaries_arm
buildspec: codebuild_specs/build_pkg_binaries_arm.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- publish_to_local_registry
- identifier: build_pkg_binaries_linux
buildspec: codebuild_specs/build_pkg_binaries_linux.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- publish_to_local_registry
- identifier: build_pkg_binaries_macos
buildspec: codebuild_specs/build_pkg_binaries_macos.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- publish_to_local_registry
- identifier: build_pkg_binaries_win
buildspec: codebuild_specs/build_pkg_binaries_win.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- publish_to_local_registry
- identifier: verify_versions_match
buildspec: codebuild_specs/verify_versions_match.yml
depend-on:
- publish_to_local_registry
6 changes: 5 additions & 1 deletion codebuild_specs/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ version: 0.2
env:
shell: bash
variables:
NODE_OPTIONS: --max-old-space-size=14000
NODE_OPTIONS: --max-old-space-size=12000
phases:
build:
commands:
- codebuild-breakpoint
- node -e "console.log(require('v8').getHeapStatistics().total_available_size / 1024 / 1024)"
- source ./shared-scripts.sh && _testLinux
post_build:
commands:
- echo Finished unit testing
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
"setup-dev": "yarn dev-build && yarn rm-dev-link && yarn link-dev && yarn rm-aa-dev-link && yarn link-aa-dev",
"split-e2e-tests": "yarn ts-node ./scripts/split-e2e-tests.ts && git add .circleci/config.yml",
"test-changed": "nx affected --target=test",
"test-ci": "nx run-many --parallel=4 --target=test --all -- --ci --runInBand",
"test-ci": "nx run-many --parallel=3 --target=test --all --ci --runInBand",
"test-ci-1": "nx run-many --parallel=1 --target=test --all --exclude @aws-amplify/amplify-category-function:test --ci --runInBand",
"test-ci-2": "nx run --parallel=3 @aws-amplify/amplify-category-function:test --ci --runInBand",
"test": "nx run-many --target=test --all -- --runInBand",
"update-data-packages": "./scripts/update-data-dependencies.sh && yarn",
"update-test-timing-data": "ts-node ./scripts/cci-get-job-metrics.ts && ts-node ./scripts/cci-extract-test-timings-from-job-metrics.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jest.mock('../../../provider-utils/awscloudformation/utils/buildFunction', () =>
}));
const buildFunction_mock = buildFunction as jest.MockedFunction<typeof buildFunction>;

jest.retryTimes(2);
describe('awscloudformation function provider', () => {
beforeEach(() => jest.clearAllMocks());
it('opens the correct service console', () => {
Expand Down
Loading