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

fix: improve task startup logic for Fargate #2428

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,8 @@ async function launchLeadTask(context) {
throw runErr;
}

await awaitOnEE(context.reporterEvents, 'prepack_end', 1000 * 60 * 1);

return context;
}

Expand Down Expand Up @@ -1853,6 +1855,10 @@ async function listen(context, ee) {
console.error('Error processing ensure directive');
}
}

if (body.type === 'leader' && body.msg === 'prepack_end') {
ee.emit('prepack_end');
}
});

r.on('stats', async (stats) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ check_dependencies () {
sync_test_data () {
mkdir "$TEST_DATA"
pushd "$TEST_DATA" >/dev/null
aws s3 sync "$s3_test_data_path" . >/dev/null
aws s3 sync --exclude node_modules_stream.zip "$s3_test_data_path" . >/dev/null

debug "$(pwd)"
debug "$(ls -a)"
Expand Down Expand Up @@ -179,6 +179,7 @@ install_dependencies () {
echo "Modules pre-packaged"
aws s3 mv "$s3_test_data_path/node_modules_stream.zip" "$s3_test_data_path/node_modules.zip"
send_message "leader npm prepack end `date +%s`" "debug"
send_message "prepack_end" "leader"
else
# wait until node_modules.zip is available and unzip, or timeout
# TODO: use aws s3api wait object-exists with a custom timeout
Expand Down
Loading