Skip to content

Commit 8738a6e

Browse files
authored
Update to version v3.2.6
### Changed - Updated version of chartjs fromv v3.0.0 to v4 - Updated version of react from v17 to v18 - Updated version of react-dom from v17 to v18 - Removed moment.js as the library was in maintenance mode. Replaced with built-in javascript date and time - Updated Jmeter dependencies and taurus dependencis within the docker image to enhance the security of the docker image - Updated taurus version from v1.16.27 to v1.16.29 ### Fixed - Bug fix to resolve issue with graph not showing on scheduled tests [#158](#158) - Bug fix created by changes of the ECS account setting and enabling Tag Resource Authorization as default settings [#162](#162) - Bug fix to resolve issue with running the tests on OPT-IN regions [#163](#163)
2 parents 78caed5 + ff2d320 commit 8738a6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1023
-357
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.2.6] - 2024-03-06
9+
10+
### Changed
11+
12+
- Updated version of chartjs fromv v3.0.0 to v4
13+
- Updated version of react from v17 to v18
14+
- Updated version of react-dom from v17 to v18
15+
- Removed moment.js as the library was in maintenance mode. Replaced with built-in javascript date and time
16+
- Updated Jmeter dependencies and taurus dependencis within the docker image to enhance the security of the docker image
17+
- Updated taurus version from v1.16.27 to v1.16.29
18+
19+
### Fixed
20+
21+
- Bug fix to resolve issue with graph not showing on scheduled tests [#158](https://github.com/aws-solutions/distributed-load-testing-on-aws/issues/158)
22+
- Bug fix created by changes of the ECS account setting and enabling Tag Resource Authorization as default settings [#162](https://github.com/aws-solutions/distributed-load-testing-on-aws/issues/162)
23+
- Bug fix to resolve issue with running the tests on OPT-IN regions [#163](https://github.com/aws-solutions/distributed-load-testing-on-aws/issues/163)
24+
825
## [3.2.5] - 2024-01-11
926

1027
### Changed

NOTICE.txt renamed to NOTICE

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
Distributed Load Testing Reference Architecture
1+
Distributed Load Testing
2+
23
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
Licensed under the Apache License Version 2.0 (the "License"). You may not use this file except
5+
in compliance with the License. A copy of the License is located at http://www.apache.org/licenses/
6+
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
7+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the License for the
8+
specific language governing permissions and limitations under the License.
39

410
**********************
511
THIRD PARTY COMPONENTS
@@ -25,7 +31,7 @@ bootstrap under the Massachusetts Institute of Technology (MIT) license
2531
bootstrap-icons under the Massachusetts Institute of Technology (MIT) license
2632
brace under the Massachusetts Institute of Technology (MIT) license
2733
chart.js under the Massachusetts Institute of Technology (MIT) license
28-
chartjs-adapter-moment under the Massachusetts Institute of Technology (MIT) license
34+
chartjs-adapter-date-fns under the Massachusetts Institute of Technology (MIT) license
2935
constructs under the Apache License 2.0
3036
eslint under the Massachusetts Institute of Technology (MIT) license
3137
eslint-config-prettier under the Massachusetts Institute of Technology (MIT) license

VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.6

deployment/build-s3-dist.sh

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ declare -A templates=(
5858
)
5959

6060
cd ${source_dir}/infrastructure
61-
npm run clean
62-
npm install
61+
npm ci
6362

6463
for template in "${!templates[@]}"; do
6564
node_modules/aws-cdk/bin/cdk synth --asset-metadata false --path-metadata false -a "npx ts-node --prefer-ts-exts bin/${template}.ts" > ${templates[$template]}/${template}.template
@@ -76,9 +75,7 @@ done
7675

7776
# Setup solution utils package
7877
cd ${source_dir}/solution-utils
79-
rm -rf node_modules
80-
npm install --production
81-
rm -rf package-lock.json
78+
npm ci --production
8279

8380
# Creating custom resource resources for both stacks
8481
main_stack_custom_resource_files="index.js node_modules lib/*"
@@ -90,9 +87,7 @@ declare -a stacks=(
9087
)
9188

9289
cd ${source_dir}/custom-resource
93-
rm -rf node_modules/
94-
npm install --production
95-
rm package-lock.json
90+
npm ci --production
9691
for stack in "${stacks[@]}"; do
9792
cp ${stack}-index.js index.js
9893
files_to_zip=${stack}_stack_custom_resource_files
@@ -124,9 +119,7 @@ for package in "${packages[@]}"; do
124119
echo "Creating $package deployment package"
125120
echo "------------------------------------------------------------------------------"
126121
cd ${source_dir}/${package}
127-
rm -rf node_modules/
128-
npm install --production
129-
rm package-lock.json
122+
npm ci --production
130123
zip -q -r9 ${build_dist_dir}/${package}.zip *
131124
if [ $? -eq 0 ]
132125
then
@@ -156,8 +149,7 @@ echo "Building console"
156149
echo "------------------------------------------------------------------------------"
157150
cd ${source_dir}/console
158151
[ -e build ] && rm -r build
159-
[ -e node_modules ] && rm -rf node_modules
160-
npm install
152+
npm ci
161153
npm run build
162154
mkdir ${build_dist_dir}/console
163155
cp -r ./build/* ${build_dist_dir}/console/

deployment/ecr/distributed-load-testing-on-aws-load-tester/Dockerfile

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM blazemeter/taurus:1.16.27
1+
FROM blazemeter/taurus:1.16.29
22
# taurus includes python and pip
33
RUN /usr/bin/python3 -m pip install --upgrade pip
44
RUN pip install --no-cache-dir awscli
5-
RUN apt-get -y install xmlstarlet bc procps
5+
RUN apt-get -y install --no-install-recommends xmlstarlet bc procps
66

77
# Removing selenium and gatling from our image as they are not supported in DLT
88
RUN rm -rf /root/.bzt/selenium-taurus
@@ -25,16 +25,34 @@ WORKDIR /usr/local/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rbs-2.8.2/steep
2525
RUN sed -i 's/7.0.4/7.0.7.1/g' Gemfile.lock
2626
RUN gem install activesupport -v 7.0.7.1
2727

28-
# Replacing urllib3, Werkzeug and cryptography with more stable Versions to fix vulnerabilities
28+
# Fixing CVE-2023-36617
29+
WORKDIR /usr/local/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/specifications/default
30+
RUN sed -i 's/0.12.1/0.12.2.0/g' uri-0.12.1.gemspec
31+
RUN mv uri-0.12.1.gemspec uri-0.12.2.gemspec
32+
RUN gem install --default uri -v 0.12.2.0
33+
34+
# Replacing urllib3 with more stable Versions to resolve vulnerabilities
2935
RUN pip install urllib3==2.0.7
30-
RUN pip install Werkzeug==3.0.1
31-
RUN pip install cryptography==41.0.6
3236
RUN rm -rf /root/.bzt/python-packages/3.10.12/urllib3*
33-
RUN rm -rf /root/.bzt/python-packages/3.10.12/werkzeug*
34-
RUN rm -rf /root/.bzt/python-packages/3.10.12/cryptography*
3537
RUN cp -r /usr/local/lib/python3.10/dist-packages/urllib3* /root/.bzt/python-packages/3.10.12/
38+
39+
# Replacing Werkzeug with more stable version to resolve vulnerabilities
40+
RUN pip install Werkzeug==3.0.1
41+
RUN rm -rf /root/.bzt/python-packages/3.10.12/werkzeug*
3642
RUN cp -r /usr/local/lib/python3.10/dist-packages/werkzeug* /root/.bzt/python-packages/3.10.12/
43+
44+
# Replacing cryptography with more stable version to resolve vulnerabilities
45+
RUN pip install cryptography==42.0.5
46+
RUN rm -rf /root/.bzt/python-packages/3.10.12/cryptography*
3747
RUN cp -r /usr/local/lib/python3.10/dist-packages/cryptography* /root/.bzt/python-packages/3.10.12/
3848

49+
# Replacing Pillow with more stable version resolve CVE-2023-50447
50+
RUN rm -rf /root/.local/lib/python3.10/site-packages/Pillow*
51+
RUN pip install --upgrade pillow --target /root/.local/lib/python3.10/site-packages/
52+
53+
# Replaing aiohttp with more stable version to resolve CVE-2024-23334
54+
RUN rm -rf /usr/local/lib/python3.10/dist-packages/aiohttp*
55+
RUN pip install --upgrade aiohttp
56+
3957
WORKDIR /bzt-configs/
4058
ENTRYPOINT ["./load-test.sh"]

deployment/ecr/distributed-load-testing-on-aws-load-tester/jar_updater.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* batik-bridge v1.14 will be replaced with v1.17
1717
* batik-transcoder v1.14 will be replaced with v1.17
1818
* lets-plot-batik v2.2.1 will be replaced with 4.2.0
19+
* commons-net v3.8.0 will be replaced with v3.9.0
1920
2021
Also jmeter plugins manager will be updated to v1.10 to address CVEs and cmdrunner will be updated to v2.3 to accomodate with plugins manager.
2122
"""
@@ -29,7 +30,8 @@
2930
"batik-script": "org/apache/xmlgraphics/batik-script/1.17/batik-script-1.17.jar",
3031
"batik-bridge": "org/apache/xmlgraphics/batik-bridge/1.17/batik-bridge-1.17.jar",
3132
"batik-transcoder": "org/apache/xmlgraphics/batik-transcoder/1.17/batik-transcoder-1.17.jar",
32-
"lets-plot-batik": "org/jetbrains/lets-plot/lets-plot-batik/4.2.0/lets-plot-batik-4.2.0.jar"
33+
"lets-plot-batik": "org/jetbrains/lets-plot/lets-plot-batik/4.2.0/lets-plot-batik-4.2.0.jar",
34+
"commons-net": "commons-net/commons-net/3.9.0/commons-net-3.9.0.jar"
3335
}
3436
JMETER_VERSION = "5.5"
3537
JMETER_PLUGINS_MANAGER_VERSION = "1.10"

deployment/ecr/distributed-load-testing-on-aws-load-tester/load-test.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ echo "FILE_TYPE:: ${FILE_TYPE}"
1010
echo "PREFIX:: ${PREFIX}"
1111
echo "UUID:: ${UUID}"
1212
echo "LIVE_DATA_ENABLED:: ${LIVE_DATA_ENABLED}"
13+
echo "MAIN_STACK_REGION:: ${MAIN_STACK_REGION}"
1314

1415
sigterm_handler() {
1516
if [ $pypid -ne 0 ]; then
@@ -22,7 +23,7 @@ sigterm_handler() {
2223
trap 'sigterm_handler' SIGTERM
2324

2425
echo "Download test scenario"
25-
aws s3 cp s3://$S3_BUCKET/test-scenarios/$TEST_ID-$AWS_REGION.json test.json
26+
aws s3 cp s3://$S3_BUCKET/test-scenarios/$TEST_ID-$AWS_REGION.json test.json --region $MAIN_STACK_REGION
2627

2728
# download JMeter jmx file
2829
if [ "$TEST_TYPE" != "simple" ]; then
@@ -32,9 +33,9 @@ if [ "$TEST_TYPE" != "simple" ]; then
3233
cp $PWD/*.jar $JMETER_LIB_PATH
3334

3435
if [ "$FILE_TYPE" != "zip" ]; then
35-
aws s3 cp s3://$S3_BUCKET/public/test-scenarios/$TEST_TYPE/$TEST_ID.jmx ./
36+
aws s3 cp s3://$S3_BUCKET/public/test-scenarios/$TEST_TYPE/$TEST_ID.jmx ./ --region $MAIN_STACK_REGION
3637
else
37-
aws s3 cp s3://$S3_BUCKET/public/test-scenarios/$TEST_TYPE/$TEST_ID.zip ./
38+
aws s3 cp s3://$S3_BUCKET/public/test-scenarios/$TEST_TYPE/$TEST_ID.zip ./ --region $MAIN_STACK_REGION
3839
unzip $TEST_ID.zip
3940
# only looks for the first jmx file.
4041
JMETER_SCRIPT=`find . -name "*.jmx" | head -n 1`
@@ -100,7 +101,7 @@ if [ "$TEST_TYPE" != "simple" ]; then
100101
fi
101102

102103
echo "Uploading $p"
103-
aws s3 cp $f $p
104+
aws s3 cp $f $p --region $MAIN_STACK_REGION
104105
done
105106
fi
106107

@@ -114,11 +115,11 @@ if [ -f /tmp/artifacts/results.xml ]; then
114115
fi
115116

116117
echo "Uploading results, bzt log, and JMeter log, out, and err files"
117-
aws s3 cp /tmp/artifacts/results.xml s3://$S3_BUCKET/results/${TEST_ID}/${PREFIX}-${UUID}-${AWS_REGION}.xml
118-
aws s3 cp /tmp/artifacts/bzt.log s3://$S3_BUCKET/results/${TEST_ID}/bzt-${PREFIX}-${UUID}-${AWS_REGION}.log
119-
aws s3 cp /tmp/artifacts/jmeter.log s3://$S3_BUCKET/results/${TEST_ID}/jmeter-${PREFIX}-${UUID}-${AWS_REGION}.log
120-
aws s3 cp /tmp/artifacts/jmeter.out s3://$S3_BUCKET/results/${TEST_ID}/jmeter-${PREFIX}-${UUID}-${AWS_REGION}.out
121-
aws s3 cp /tmp/artifacts/jmeter.err s3://$S3_BUCKET/results/${TEST_ID}/jmeter-${PREFIX}-${UUID}-${AWS_REGION}.err
118+
aws s3 cp /tmp/artifacts/results.xml s3://$S3_BUCKET/results/${TEST_ID}/${PREFIX}-${UUID}-${AWS_REGION}.xml --region $MAIN_STACK_REGION
119+
aws s3 cp /tmp/artifacts/bzt.log s3://$S3_BUCKET/results/${TEST_ID}/bzt-${PREFIX}-${UUID}-${AWS_REGION}.log --region $MAIN_STACK_REGION
120+
aws s3 cp /tmp/artifacts/jmeter.log s3://$S3_BUCKET/results/${TEST_ID}/jmeter-${PREFIX}-${UUID}-${AWS_REGION}.log --region $MAIN_STACK_REGION
121+
aws s3 cp /tmp/artifacts/jmeter.out s3://$S3_BUCKET/results/${TEST_ID}/jmeter-${PREFIX}-${UUID}-${AWS_REGION}.out --region $MAIN_STACK_REGION
122+
aws s3 cp /tmp/artifacts/jmeter.err s3://$S3_BUCKET/results/${TEST_ID}/jmeter-${PREFIX}-${UUID}-${AWS_REGION}.err --region $MAIN_STACK_REGION
122123
else
123124
echo "An error occurred while the test was running."
124125
fi

deployment/run-unit-tests.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ run_tests() {
4545

4646
if [ $component_name = "solution-utils" ]
4747
then
48-
rm -rf coverage package-lock.json
48+
rm -rf coverage
4949
else
50-
rm -rf coverage node_modules package-lock.json
50+
rm -rf coverage node_modules
5151
fi
5252
}
5353

@@ -57,7 +57,6 @@ coverage_reports_top_path=$source_dir/test/coverage-reports
5757

5858
#install dependencies
5959
cd $source_dir
60-
npm run clean:all
6160
npm run install:all
6261

6362
#run prettier
@@ -85,7 +84,6 @@ else
8584
echo "******************************************************************************"
8685
exit 1
8786
fi
88-
npm run clean
8987

9088
# Run unit tests
9189
echo "Running unit tests"
@@ -101,6 +99,7 @@ declare -a packages=(
10199
"task-canceler"
102100
"task-runner"
103101
"task-status-checker"
102+
"console"
104103
)
105104

106105
for package in "${packages[@]}"; do

source/api-services/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
const scenarios = require("./lib/scenarios/");
5-
const metrics = require("./lib/metrics/");
6-
5+
const utils = require("solution-utils");
76
/**
87
* API Manager Class that gets API path and their method
98
* and calls the appropriate handler function to handle the request
@@ -51,10 +50,11 @@ class APIHandler {
5150
// Handle creating test
5251
else data = await scenarios.createTest(config);
5352
if (process.env.SEND_METRIC === "Yes") {
54-
await metrics.send({
55-
testTaskConfigs: config.testTaskConfigs,
56-
testType: config.testType,
57-
fileType: config.fileType,
53+
await utils.sendMetric({
54+
Type: "TaskCreate",
55+
TestType: config.testType,
56+
FileType: config.fileType || (config.testType === "simple" ? "none" : "script"),
57+
TaskCount: config.taskCount,
5858
});
5959
}
6060
return data;

source/api-services/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
process.env.TZ = "UTC";
45
module.exports = {
56
roots: ["<rootDir>/lib"],
67
testMatch: ["**/*.spec.js"],

0 commit comments

Comments
 (0)