Skip to content

Commit

Permalink
Merge pull request #1076 from awslabs/bump/2.52.0
Browse files Browse the repository at this point in the history
chore(release): 2.52.0
  • Loading branch information
biffgaut committed Feb 12, 2024
2 parents e1af866 + 467db42 commit c9ce18d
Show file tree
Hide file tree
Showing 3,496 changed files with 633,382 additions and 207,499 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
23 changes: 23 additions & 0 deletions .viperlightignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,26 @@ source/patterns/@aws-solutions-constructs/aws-alb-fargate/README.md:79
source/patterns/@aws-solutions-constructs/aws-alb-lambda/README.md:85
source/patterns/@aws-solutions-constructs/aws-route53-alb/README.md:60
source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/README.md:68
# ELB Log Reporting Account Incidents
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.template.json:1007
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/tree.json:1335
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.template.json:1034
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/tree.json:1380
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.template.json:1083
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/tree.json:1400
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.template.json:221
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/tree.json:254
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.template.json:1083
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/tree.json:1400
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.template.json:225
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/tree.json:254
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.template.json:225
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/tree.json:254
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.template.json:218
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/tree.json:277
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.template.json:868
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/tree.json:1153
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.template.json:214
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/tree.json:269
# compressed test web site
source/use_cases/aws-s3-static-website/test/integ.basic-deployment.js.snapshot/asset.3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.52.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.51.0...v2.52.0) (2024-02-12)

Built on CDK v2.127.0

### Bug Fixes

* **npmlog:** update npmlog version ([#1075](https://github.com/awslabs/aws-solutions-constructs/issues/1075)) ([968639a](https://github.com/awslabs/aws-solutions-constructs/commit/968639ae3048dc933a6c6e7baf9013e0f41bd16a))

## [2.51.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.50.0...v2.51.0) (2024-01-30)

Built on CDK v2.118.0
Expand Down
12 changes: 4 additions & 8 deletions deployment/v2/align-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const nullVersionMarker = process.argv[2];
const targetSolutionsConstructsVersion = process.argv[3];

// these versions need to be sourced from a config file
const awsCdkLibVersion = '2.118.0';
const awsCdkLibVersion = '2.127.0';

for (const file of process.argv.splice(4)) {
const pkg = JSON.parse(fs.readFileSync(file).toString());
Expand All @@ -25,11 +25,6 @@ for (const file of process.argv.splice(4)) {
pkg.peerDependencies = updateDependencyVersionNumbers(pkg.peerDependencies || { }, '^');
pkg.devDependencies = updateDependencyVersionNumbers(pkg.devDependencies || { });

// This will be removed in the next PR when we remove cdk-integ
if (pkg.scripts) {
pkg.scripts["integ-assert"] = "cdk-integ-assert-v2";
}

console.error(`${file} => ${targetSolutionsConstructsVersion}`);
fs.writeFileSync(file, JSON.stringify(pkg, undefined, 2));

Expand All @@ -40,8 +35,9 @@ function updateDependencyVersionNumbers(section, orBetter = '') { let newdepend
if (name.startsWith('@aws-solutions-constructs')) {
newdependencies[name] = version.replace(nullVersionMarker, targetSolutionsConstructsVersion);
}
else if (name.startsWith('aws-cdk-lib')) {
newdependencies[name] = version.replace(nullVersionMarker, orBetter+awsCdkLibVersion);

else if (name.startsWith('aws-cdk-lib') || name === '@aws-cdk/integ-tests-alpha') {
newdependencies[name] = version.replace(nullVersionMarker, awsCdkLibVersion);
}
else {
newdependencies[name] = version;
Expand Down
4 changes: 2 additions & 2 deletions deployment/v2/align-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ files=$(find . -name package.json |\
grep -v node_modules)

if [ $# -eq 0 ]; then
echo "Updating ALL package.json for CDK v2"
echo "Syncing the version numbers for all packages"
${deployment_dir}/align-version.js ${nullVersionMarker} ${scRepoVersion} ${files}
else
echo "Reverting back CDK v2 updatesfrom ALL package.json files"
echo "Reverting version numbers by getting all package.json files from git"
# This command is required ONLY for the local development and it fails in CodePipeline
if [[ -z "${CODEBUILD_BUILD_ID+x}" ]]; then
git checkout `find . -name package.json | grep -v node_modules`
Expand Down
6 changes: 4 additions & 2 deletions deployment/v2/allow-partial-builds.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# ------------------------------------
#
# Runs the steps required to be able to build and test individual
Expand All @@ -12,13 +14,13 @@

# Obtains the current folder name (with no folder hierarchy)
# to assign to a variable
currentFolderName=${PWD##*/}
result=${PWD##*/} # to assign to a variable

# Some forgotten mysticism that allows us to check whether this
# script was invoked within a 'source' command. This is required
# so that it runs in the context of the window, not in a new context - thus
# ensuring the environment variables set by the script persist.
(return 0 2>/dev/null) && sourced=1 || sourced=0 (return 0 2>/dev/null) && sourced=1 || sourced=0
(return 0 2>/dev/null) && sourced=1 || sourced=0

if [ $sourced -ne 1 ]
then
Expand Down
13 changes: 8 additions & 5 deletions deployment/v2/build-cdk-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"
cd $deployment_dir/

echo "------------------------------------------------------------------------------"
echo "[Copy] CDK templates for all patterns into the deployment dir for CfnNagScan"
echo "[Copy] integration test snapshots for all patterns into the deployment dir for CfnNagScan"
echo "------------------------------------------------------------------------------"

echo "mkdir -p $dist_dir"
Expand All @@ -23,22 +23,25 @@ for subdir in $source_dir/patterns/\@aws-solutions-constructs/* ; do
cd $subdir/test

echo "Checking integ CFN templates in $subdir/test"
cnt=`find . -name "*expected.json" -type f | wc -l`
cnt=`find . -name "*.template.json" -type f | wc -l`
prefix=`basename $subdir`
if [ "$prefix" != "core" ]
then
if [ "$cnt" -eq "0" ]
then
echo "************** [ERROR] ************* Did not find any integ CFN templates in $subdir; please add at least one by writing an integ test case and running cdk-integ command to generate the CFN template for it"
echo "************** [ERROR] ************* Did not find any integ tests in $subdir; please add at least one by writing an integ test case and running 'npm run integ' command to generate the snapshot for it"
exit 1
fi
fi

echo "Copying templates from $subdir/test"
for i in `find . -name "*expected.json" -type f`; do
for i in `find . -name "*.template.json" -type f`; do
prefix=`basename $subdir`
suffix=`basename $i`
cp $subdir/test/$i $dist_dir/$prefix-$suffix.template
# integ-runner creates additional json files we want to skip
if [[ $i != *"DeployAssert"* ]]; then
cp $subdir/test/$i $dist_dir/$prefix-$suffix.template
fi
done
cd $source_dir
fi
Expand Down
14 changes: 2 additions & 12 deletions deployment/v2/build-patterns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ cd $source_dir/
export PATH=$source_dir/node_modules/.bin:$PATH
export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"

npm install -g @aws-cdk/integ-runner

echo "============================================================================================="
echo "installing..."
yarn install --frozen-lockfile

echo "============================================================================================="
echo "building cdk-integ-tools..."
cd $source_dir/tools/cdk-integ-tools
npm install
npm run build
npm link
cd $source_dir/

echo "============================================================================================="
echo "building..."
time lerna run $bail --stream $runtarget || fail
Expand All @@ -38,7 +32,3 @@ time lerna run --bail --stream jsii-pacmak || fail
echo "============================================================================================="
echo "reverting back versions and updates to package.json for CDK v2..."
/bin/bash $deployment_dir/align-version.sh revert

# echo "============================================================================================="
# echo "reverting back Import statements for CDK v2..."
# /bin/bash $deployment_dir/rewrite-imports.sh revert
34 changes: 0 additions & 34 deletions deployment/v2/edit-package-json.js

This file was deleted.

14 changes: 0 additions & 14 deletions deployment/v2/edit-package-json.sh

This file was deleted.

10 changes: 3 additions & 7 deletions deployment/v2/refresh-multiple-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ constructs_root_dir="$deployment_dir/../.."
source_dir="$deployment_dir/../../source"

echo "============================================================================================="
echo "aligning versions and updating package.json for CDK v2..."
echo "Syncing the version numbers for all packages"
/bin/bash $constructs_root_dir/deployment/v2/align-version.sh

bail="--bail"
Expand All @@ -116,11 +116,6 @@ yarn install --frozen-lockfile
# echo "updating Import statements for CDK v2..."
# /bin/bash $constructs_root_dir/rewrite-imports.sh

echo "============================================================================================="
echo "building cdk-integ-tools..."
cd $source_dir/tools/cdk-integ-tools
npm install
npm run build
npm link

cd $source_dir
Expand All @@ -132,9 +127,10 @@ for construct in $constructs; do

cd $constructs_root_dir/source/patterns/@aws-solutions-constructs/$construct
echo Running in $PWD
cdk-integ --no-clean &
integ-runner --update-on-failed --no-clean &
sleep 10
cd $constructs_root_dir/source/patterns/@aws-solutions-constructs
done
cd $constructs_root_dir
echo "Reverting version numbers by getting all package.json files from git"
./deployment/v2/align-version.sh revert
2 changes: 1 addition & 1 deletion source/lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"./patterns/@aws-solutions-constructs/*"
],
"rejectCycles": "true",
"version": "2.51.0"
"version": "2.52.0"
}
2 changes: 1 addition & 1 deletion source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"private": true,
"dependencies": {
"@aws-cdk/integ-tests-alpha": "0.0.0-alpha.0",
"@typescript-eslint/eslint-plugin": "^2.14.0",
"@typescript-eslint/parser": "^2.14.0",
"eslint": "^6.8.0",
Expand All @@ -27,7 +28,6 @@
"jsii-pacmak": "^1.92.0",
"tslint": "^5.20.1",
"typescript": "4.7.4",
"aws-cdk-migration": "^1.135.0",
"constructs": "^10.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ lib/*.js
test/*.js
*.d.ts
coverage
test/integ.*.js.snapshot/
test/cdk-integ.out.integ.*.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parallelRegions": [
"us-east-1"
],
"disable-update-workflow": true,
"update-on-failed": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"test": "jest --coverage",
"clean": "tsc -b --clean",
"watch": "tsc -b -w",
"integ": "cdk-integ",
"integ-no-clean": "cdk-integ --no-clean",
"integ-assert": "cdk-integ-assert-v2",
"integ": "integ-runner --update-on-failed",
"integ-no-clean": "integ-runner --update-on-failed --no-clean",
"integ-assert": "integ-runner",
"jsii": "jsii",
"jsii-pacmak": "jsii-pacmak",
"build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert",
Expand Down Expand Up @@ -53,6 +53,7 @@
}
},
"dependencies": {
"@aws-cdk/integ-tests-alpha": "0.0.0-alpha.0",
"@aws-solutions-constructs/core": "0.0.0",
"constructs": "^10.0.0"
},
Expand Down

0 comments on commit c9ce18d

Please sign in to comment.