Consolidate error messaging into result detail (#6950)

This commit is contained in:
Dan Albert 2019-11-14 11:18:38 -05:00 committed by GitHub
parent f4846b6fe4
commit dbbd9663b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 22 deletions

View File

@ -8,7 +8,7 @@ function execution_step {
} }
function collect_logs { function collect_logs {
execution_step "collect logs from remote nodes" execution_step "Collect logs from remote nodes"
rm -rf net/log rm -rf net/log
net/net.sh logs net/net.sh logs
for logfile in net/log/* ; do for logfile in net/log/* ; do
@ -56,9 +56,12 @@ function analyze_packet_loss {
function cleanup_testnet { function cleanup_testnet {
RC=$? RC=$?
if [[ $RC != 0 ]] ; then if [[ $RC != 0 ]] ; then
execution_step "Test failed while executing: $(eval echo "$@")" RESULT_DETAILS="
else Test failed during step:
execution_step "Test succeeded" ${STEP}
Failure occured when running the following command:
$(eval echo "$@")"
fi fi
FINISH_UNIX_MSECS="$(($(date +%s%N)/1000000))" FINISH_UNIX_MSECS="$(($(date +%s%N)/1000000))"
@ -148,7 +151,7 @@ function launchTestnet() {
set -x set -x
# shellcheck disable=SC2068 # shellcheck disable=SC2068
execution_step "create ${NUMBER_OF_VALIDATOR_NODES} ${CLOUD_PROVIDER} nodes" execution_step "Create ${NUMBER_OF_VALIDATOR_NODES} ${CLOUD_PROVIDER} nodes"
case $CLOUD_PROVIDER in case $CLOUD_PROVIDER in
gce) gce)
@ -199,10 +202,10 @@ function launchTestnet() {
;; ;;
esac esac
execution_step "configure database" execution_step "Configure database"
net/init-metrics.sh -e net/init-metrics.sh -e
execution_step "fetch reusable testnet keypairs" execution_step "Fetch reusable testnet keypairs"
if [[ ! -d net/keypairs ]] ; then if [[ ! -d net/keypairs ]] ; then
git clone git@github.com:solana-labs/testnet-keypairs.git net/keypairs git clone git@github.com:solana-labs/testnet-keypairs.git net/keypairs
# If we have provider-specific keys (CoLo*, GCE*, etc) use them instead of generic val* # If we have provider-specific keys (CoLo*, GCE*, etc) use them instead of generic val*
@ -216,7 +219,7 @@ function launchTestnet() {
net/net.sh stop net/net.sh stop
fi fi
execution_step "start ${NUMBER_OF_VALIDATOR_NODES} node test" execution_step "Start ${NUMBER_OF_VALIDATOR_NODES} node test"
if [[ -n $CHANNEL ]]; then if [[ -n $CHANNEL ]]; then
# shellcheck disable=SC2068 # shellcheck disable=SC2068
# shellcheck disable=SC2086 # shellcheck disable=SC2086
@ -231,13 +234,13 @@ function launchTestnet() {
--gpu-mode $startGpuMode --gpu-mode $startGpuMode
fi fi
execution_step "wait ${RAMP_UP_TIME} seconds for network throughput to stabilize" execution_step "Wait ${RAMP_UP_TIME} seconds for network throughput to stabilize"
sleep "$RAMP_UP_TIME" sleep "$RAMP_UP_TIME"
execution_step "wait ${TEST_DURATION_SECONDS} seconds to complete test" execution_step "Wait ${TEST_DURATION_SECONDS} seconds to complete test"
sleep "$TEST_DURATION_SECONDS" sleep "$TEST_DURATION_SECONDS"
execution_step "collect statistics about run" execution_step "Collect statistics about run"
declare q_mean_tps=' declare q_mean_tps='
SELECT ROUND(MEAN("median_sum")) as "mean_tps" FROM ( SELECT ROUND(MEAN("median_sum")) as "mean_tps" FROM (
SELECT MEDIAN(sum_count) AS "median_sum" FROM ( SELECT MEDIAN(sum_count) AS "median_sum" FROM (
@ -342,7 +345,7 @@ if [[ "$USE_PUBLIC_IP_ADDRESSES" = "true" ]] ; then
fi fi
if [[ -z $CHANNEL ]]; then if [[ -z $CHANNEL ]]; then
execution_step "downloading tar from build artifacts" execution_step "Downloading tar from build artifacts"
buildkite-agent artifact download "solana-release*.tar.bz2" . buildkite-agent artifact download "solana-release*.tar.bz2" .
fi fi

View File

@ -79,16 +79,6 @@ upload_results_to_slack() {
{ {
"type": "divider" "type": "divider"
}, },
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Test Status: \n\`\`\`$STEP\`\`\`"
}
},
{
"type": "divider"
},
{ {
"type": "section", "type": "section",
"text": { "text": {