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: upgrade cdk library dependency to 2.158.0 #2876

Merged
merged 68 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
03372cc
chore: upgrade cdk dependency to 2.158.0
phani-srikar Sep 13, 2024
bf0076b
chore: install and use nvm
phani-srikar Sep 17, 2024
7b63231
chore: use full version for nvm
phani-srikar Sep 17, 2024
d003c24
chore: testing linux build with nvm
phani-srikar Sep 23, 2024
98345ba
chore: fix version in cdk tests
phani-srikar Sep 24, 2024
9f714af
chore: update jsii files
phani-srikar Sep 24, 2024
83abde4
update: increase memory size
bobbyu99 Sep 25, 2024
0c50637
add: debug statement
bobbyu99 Sep 25, 2024
5f5087d
update: mem size back to 8096, use ps1 file for shell script
bobbyu99 Sep 25, 2024
b10f284
fix: path to Setup-NodeVersion.ps1
bobbyu99 Sep 25, 2024
8c1a948
fix: path to codebuild_specs/Setup-NodeVersion.ps1
bobbyu99 Sep 25, 2024
2053348
add: set runtime version
bobbyu99 Sep 25, 2024
88800ee
update: image
bobbyu99 Sep 25, 2024
37db1af
add: debug statement
bobbyu99 Sep 26, 2024
836b26d
Merge branch 'upgrade-cdk-2-158' of https://github.com/aws-amplify/am…
bobbyu99 Sep 26, 2024
110e021
update: use earlier code
bobbyu99 Sep 26, 2024
3058dc4
add: debug statements
bobbyu99 Sep 26, 2024
d4c8add
update: clean up code
bobbyu99 Sep 26, 2024
48ba3b2
update: use the correct image
bobbyu99 Sep 26, 2024
b0e1b1c
add: list installed node versions and used nodejs.install
bobbyu99 Sep 26, 2024
83c764e
restart: install nvm using choco
bobbyu99 Sep 26, 2024
452ac9c
add: back mem size variable
bobbyu99 Sep 26, 2024
9e1683b
add: nvm install and use 18.20.4
bobbyu99 Sep 26, 2024
0bba2ba
add: env var NVM_HOME and NVM_SYMLINK
bobbyu99 Sep 26, 2024
124b953
add: spawn powershell as admin
bobbyu99 Sep 26, 2024
71b6ebc
update: remove all other builds
bobbyu99 Sep 26, 2024
b24d006
add: debug statement
bobbyu99 Sep 26, 2024
7c1c96a
add: env var path
bobbyu99 Sep 26, 2024
d75f541
update: print env var
bobbyu99 Sep 27, 2024
330e286
add: commands
bobbyu99 Sep 27, 2024
0abb21f
update: env var set up
bobbyu99 Sep 27, 2024
d98e14d
add: refresh env var
bobbyu99 Sep 27, 2024
bbb0a52
update: more debug statement
bobbyu99 Sep 27, 2024
5abed4e
update
bobbyu99 Sep 27, 2024
e297ca2
revamp: find nvm.exe
bobbyu99 Sep 27, 2024
0cc643c
update: install nvm windows directly
bobbyu99 Sep 27, 2024
2eea425
update: launch new shell if current shell does not recognize nvm
bobbyu99 Sep 27, 2024
e331d39
update: install node in buildspec
bobbyu99 Sep 27, 2024
d756367
add: install and use node in build spec
bobbyu99 Sep 27, 2024
6a50523
update: use single quote to prevent interpreting \
bobbyu99 Sep 27, 2024
c92292f
add: 2 scripts, one for installing nvm, another for using nvm
bobbyu99 Sep 27, 2024
5e02869
fix: path error
bobbyu99 Sep 27, 2024
741df09
test: which way set env var
bobbyu99 Sep 27, 2024
6e39003
update: set up env var in pre_build
bobbyu99 Sep 27, 2024
df9e6dc
update: use choco in pre-build
bobbyu99 Sep 27, 2024
e118ade
fix: syntax error
bobbyu99 Sep 27, 2024
2e16557
update: build_windows working, running all tests
bobbyu99 Sep 27, 2024
55840d7
test: remove bootstrap in test code
palpatim Sep 27, 2024
0fbc1e1
Merge branch 'palpatim.test.remove-bootstrap' of https://github.com/a…
bobbyu99 Sep 28, 2024
5fab532
debug: _runGqlE2ETests
bobbyu99 Sep 30, 2024
76bcb13
update: debug_workflow
bobbyu99 Sep 30, 2024
99f38ff
update: debug_workflow
bobbyu99 Sep 30, 2024
31f9a9f
update: debug_workflow
bobbyu99 Sep 30, 2024
ffd6229
update: debug_workflow
bobbyu99 Sep 30, 2024
1254b7d
Merge branch 'main' into upgrade-cdk-2-158
bobbyu99 Sep 30, 2024
db4dcd1
add: debug statement
bobbyu99 Sep 30, 2024
64cdbc7
add: debug test
bobbyu99 Sep 30, 2024
ccfe2de
add: debug
bobbyu99 Sep 30, 2024
5f97868
update: use uuid for bucket name
bobbyu99 Sep 30, 2024
be8b82b
remove: use of uuid
bobbyu99 Oct 1, 2024
32e5435
add: debug statement
bobbyu99 Oct 1, 2024
194e045
update: use differrent bucket name
bobbyu99 Oct 1, 2024
bdf6079
add: mili second timestamp
bobbyu99 Oct 1, 2024
eda64f7
add: debug statement
bobbyu99 Oct 1, 2024
6e3e897
remove: debug statement
bobbyu99 Oct 1, 2024
0281a55
Merge branch 'main' into upgrade-cdk-2-158
bobbyu99 Oct 1, 2024
2aec482
Merge branch 'main' into upgrade-cdk-2-158
bobbyu99 Oct 2, 2024
332b6f7
remove: redundant code
bobbyu99 Oct 2, 2024
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: 2 additions & 0 deletions codebuild_specs/build_linux.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=8096
phases:
build:
commands:
Expand Down
9 changes: 8 additions & 1 deletion codebuild_specs/build_windows.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
version: 0.2
env:
shell: powershell.exe
variables:
NODE_OPTIONS: --max-old-space-size=8096
phases:
pre_build:
commands:
- choco install -fy nodejs-lts --version=18.20.4
- |
$nodeVersion = node -v
Write-Host "Node version: $nodeVersion"
build:
commands:
- yarn run production-build
- yarn build-tests

artifacts:
files:
- 'shared-scripts.sh'
291 changes: 283 additions & 8 deletions dependency_licenses.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
"**/istanbul/async": "^2.6.4",
"**/jake/async": "^2.6.4",
"**/nth-check": "^2.0.1",
"aws-cdk-lib": "~2.152.0",
"aws-cdk-lib": "~2.158.0",
"lodash": "^4.17.21",
"node-fetch": "^2.6.7",
"cross-fetch": "^2.2.6",
Expand Down
87 changes: 72 additions & 15 deletions packages/amplify-data-construct/.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
},
"dependencies": {
"@aws-amplify/graphql-api-construct": "1.14.0",
"aws-cdk-lib": "^2.152.0",
"aws-cdk-lib": "^2.158.0",
"constructs": "^10.3.0"
},
"dependencyClosure": {
Expand Down Expand Up @@ -220,6 +220,36 @@
}
}
},
"@aws-cdk/cloud-assembly-schema": {
"targets": {
"dotnet": {
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png",
"namespace": "Amazon.CDK.CloudAssembly.Schema",
"packageId": "Amazon.CDK.CloudAssembly.Schema"
},
"go": {
"moduleName": "github.com/cdklabs/cloud-assembly-schema-go"
},
"java": {
"maven": {
"artifactId": "cdk-cloud-assembly-schema",
"groupId": "software.amazon.awscdk"
},
"package": "software.amazon.awscdk.cloudassembly.schema"
},
"js": {
"npm": "@aws-cdk/cloud-assembly-schema"
},
"python": {
"classifiers": [
"Framework :: AWS CDK",
"Framework :: AWS CDK :: 2"
],
"distName": "aws-cdk.cloud-assembly-schema",
"module": "aws_cdk.cloud_assembly_schema"
}
}
},
"aws-cdk-lib": {
"submodules": {
"aws-cdk-lib.alexa_ask": {
Expand Down Expand Up @@ -2290,6 +2320,19 @@
}
}
},
"aws-cdk-lib.aws_launchwizard": {
"targets": {
"dotnet": {
"package": "Amazon.CDK.AWS.LaunchWizard"
},
"java": {
"package": "software.amazon.awscdk.services.launchwizard"
},
"python": {
"module": "aws_cdk.aws_launchwizard"
}
}
},
"aws-cdk-lib.aws_lex": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -2784,6 +2827,19 @@
}
}
},
"aws-cdk-lib.aws_pcaconnectorscep": {
"targets": {
"dotnet": {
"package": "Amazon.CDK.AWS.PCAConnectorSCEP"
},
"java": {
"package": "software.amazon.awscdk.services.pcaconnectorscep"
},
"python": {
"module": "aws_cdk.aws_pcaconnectorscep"
}
}
},
"aws-cdk-lib.aws_personalize": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -3499,6 +3555,19 @@
}
}
},
"aws-cdk-lib.aws_ssmquicksetup": {
"targets": {
"dotnet": {
"package": "Amazon.CDK.AWS.SSMQuickSetup"
},
"java": {
"package": "software.amazon.awscdk.services.ssmquicksetup"
},
"python": {
"module": "aws_cdk.aws_ssmquicksetup"
}
}
},
"aws-cdk-lib.aws_sso": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -3746,19 +3815,7 @@
}
}
},
"aws-cdk-lib.cloud_assembly_schema": {
"targets": {
"dotnet": {
"namespace": "Amazon.CDK.CloudAssembly.Schema"
},
"java": {
"package": "software.amazon.awscdk.cloudassembly.schema"
},
"python": {
"module": "aws_cdk.cloud_assembly_schema"
}
}
},
"aws-cdk-lib.cloud_assembly_schema": {},
"aws-cdk-lib.cloudformation_include": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -3970,5 +4027,5 @@
},
"types": {},
"version": "1.10.2",
"fingerprint": "Ur2Iw+iIJolzSkulUyEDgbJ9aLqUExVDrAiHRMhbnL4="
"fingerprint": "naLvPjdr9z9wuDIK2e15PtMBvodNvsprfPj2tyr4FaA="
}
4 changes: 2 additions & 2 deletions packages/amplify-data-construct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
"devDependencies": {
"@types/fs-extra": "^8.0.1",
"@types/node": "^18.0.0",
"aws-cdk-lib": "2.152.0",
"aws-cdk-lib": "2.158.0",
"constructs": "10.3.0",
"jsii": "^5.4.23",
"jsii-pacmak": "^1.84.0",
Expand All @@ -294,7 +294,7 @@
"ts-node": "^8.10.1"
},
"peerDependencies": {
"aws-cdk-lib": "^2.152.0",
"aws-cdk-lib": "^2.158.0",
"constructs": "^10.3.0"
},
"stability": "stable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@aws-amplify/graphql-transformer-core": "3.1.2",
"@aws-amplify/graphql-transformer-interfaces": "4.1.1",
"@types/node": "^18.0.0",
"aws-cdk-lib": "2.152.0",
"aws-cdk-lib": "2.158.0",
"constructs": "10.3.0",
"ts-node": "^8.10.2"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.152.0 1`] = `
exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.158.0 1`] = `
Object {
"body": Object {
"data": Object {
Expand All @@ -14,7 +14,7 @@ Object {
}
`;

exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.152.0 2`] = `
exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.158.0 2`] = `
Object {
"body": Object {
"data": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ describe('CDK Auth Modes', () => {
test('Can be invoked with Admin Roles defined', async () => {
const templatePath = path.resolve(path.join(__dirname, 'backends', 'admin-role'));
const name = await initCDKProject(projRoot, templatePath, {
cdkVersion: '2.152.0', // Explicitly declaring this, since this version needs to match cognito idp
cdkVersion: '2.158.0', // Explicitly declaring this, since this version needs to match cognito idp
additionalDependencies: [
'esbuild', // required to bundle the lambda function
'@aws-cdk/aws-cognito-identitypool-alpha@2.152.0-alpha.0', // using alpha cognito idp resource for auth config
'@aws-cdk/aws-cognito-identitypool-alpha@2.158.0-alpha.0', // using alpha cognito idp resource for auth config
'@aws-crypto/sha256-js', // All remaining deps are required for the lambda to sign the request to appsync
'@aws-sdk/credential-provider-node',
'@aws-sdk/protocol-http',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('CDK GraphQL Transformer', () => {
deleteProjectDir(projRoot);
});

['2.152.0', 'latest'].forEach((cdkVersion) => {
['2.158.0', 'latest'].forEach((cdkVersion) => {
test(`CDK base case - aws-cdk-lib@${cdkVersion}`, async () => {
const templatePath = path.resolve(path.join(__dirname, 'backends', 'base-cdk'));
const name = await initCDKProject(projRoot, templatePath, { cdkVersion });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Data Construct', () => {
deleteProjectDir(projRoot);
});

['2.152.0', 'latest'].forEach((cdkVersion) => {
['2.158.0', 'latest'].forEach((cdkVersion) => {
test(`Data Construct - aws-cdk-lib@${cdkVersion}`, async () => {
const templatePath = path.resolve(path.join(__dirname, 'backends', 'data-construct'));
const name = await initCDKProject(projRoot, templatePath, { cdkVersion, construct: 'Data' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export type InitCDKProjectProps = {
* @returns a promise which resolves to the stack name
*/
export const initCDKProject = async (cwd: string, templatePath: string, props?: InitCDKProjectProps): Promise<string> => {
const { cdkVersion = '2.152.0', additionalDependencies = [] } = props ?? {};
const { cdkVersion = '2.158.0', additionalDependencies = [] } = props ?? {};

await spawn(getNpxPath(), ['cdk', 'init', 'app', '--language', 'typescript'], {
cwd,
Expand Down
87 changes: 72 additions & 15 deletions packages/amplify-graphql-api-construct/.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"zod": "^3.22.2"
},
"dependencies": {
"aws-cdk-lib": "^2.152.0",
"aws-cdk-lib": "^2.158.0",
"constructs": "^10.3.0"
},
"dependencyClosure": {
Expand Down Expand Up @@ -212,6 +212,36 @@
}
}
},
"@aws-cdk/cloud-assembly-schema": {
"targets": {
"dotnet": {
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png",
"namespace": "Amazon.CDK.CloudAssembly.Schema",
"packageId": "Amazon.CDK.CloudAssembly.Schema"
},
"go": {
"moduleName": "github.com/cdklabs/cloud-assembly-schema-go"
},
"java": {
"maven": {
"artifactId": "cdk-cloud-assembly-schema",
"groupId": "software.amazon.awscdk"
},
"package": "software.amazon.awscdk.cloudassembly.schema"
},
"js": {
"npm": "@aws-cdk/cloud-assembly-schema"
},
"python": {
"classifiers": [
"Framework :: AWS CDK",
"Framework :: AWS CDK :: 2"
],
"distName": "aws-cdk.cloud-assembly-schema",
"module": "aws_cdk.cloud_assembly_schema"
}
}
},
"aws-cdk-lib": {
"submodules": {
"aws-cdk-lib.alexa_ask": {
Expand Down Expand Up @@ -2282,6 +2312,19 @@
}
}
},
"aws-cdk-lib.aws_launchwizard": {
"targets": {
"dotnet": {
"package": "Amazon.CDK.AWS.LaunchWizard"
},
"java": {
"package": "software.amazon.awscdk.services.launchwizard"
},
"python": {
"module": "aws_cdk.aws_launchwizard"
}
}
},
"aws-cdk-lib.aws_lex": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -2776,6 +2819,19 @@
}
}
},
"aws-cdk-lib.aws_pcaconnectorscep": {
"targets": {
"dotnet": {
"package": "Amazon.CDK.AWS.PCAConnectorSCEP"
},
"java": {
"package": "software.amazon.awscdk.services.pcaconnectorscep"
},
"python": {
"module": "aws_cdk.aws_pcaconnectorscep"
}
}
},
"aws-cdk-lib.aws_personalize": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -3491,6 +3547,19 @@
}
}
},
"aws-cdk-lib.aws_ssmquicksetup": {
"targets": {
"dotnet": {
"package": "Amazon.CDK.AWS.SSMQuickSetup"
},
"java": {
"package": "software.amazon.awscdk.services.ssmquicksetup"
},
"python": {
"module": "aws_cdk.aws_ssmquicksetup"
}
}
},
"aws-cdk-lib.aws_sso": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -3738,19 +3807,7 @@
}
}
},
"aws-cdk-lib.cloud_assembly_schema": {
"targets": {
"dotnet": {
"namespace": "Amazon.CDK.CloudAssembly.Schema"
},
"java": {
"package": "software.amazon.awscdk.cloudassembly.schema"
},
"python": {
"module": "aws_cdk.cloud_assembly_schema"
}
}
},
"aws-cdk-lib.cloud_assembly_schema": {},
"aws-cdk-lib.cloudformation_include": {
"targets": {
"dotnet": {
Expand Down Expand Up @@ -8902,5 +8959,5 @@
}
},
"version": "1.14.0",
"fingerprint": "izzdFUzhDEGlYfYipZndJkvmkwoDkGn6UZivsangA2g="
"fingerprint": "u4jHwzwBKRAlcky7o7NnOthEdgdtKR1CtWBsGA5tXq4="
}
Loading
Loading